This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH] Fix check_GNU_style.sh for BSD / Mac OS X
- From: Alan Hayward <alan dot hayward at arm dot com>
- To: "gcc-patches at gcc dot gnu dot org" <gcc-patches at gcc dot gnu dot org>
- Date: Fri, 03 Jun 2016 16:41:21 +0100
- Subject: [PATCH] Fix check_GNU_style.sh for BSD / Mac OS X
- Authentication-results: sourceware.org; auth=none
check_GNU_style.sh fails to detect lines >80 chars on BSD / Mac OS X
systems.
This is becuase paste is being called with an empty delimiter list.
Instead \0 should be used.
Tested on Ubuntu 14.04 and OS X 10.9.5
contrib/
* check_GNU_style.sh: Fix paste args for BSD
Alan
diff --git a/contrib/check_GNU_style.sh b/contrib/check_GNU_style.sh
index
a7478f8f573132aef5ed1010f0cf5b13f08350d4..87a276c9cf47b5e07c4407f740ce05dce
1928c30 100755
--- a/contrib/check_GNU_style.sh
+++ b/contrib/check_GNU_style.sh
@@ -191,7 +191,7 @@ col (){
# Combine prefix back with long lines.
# Filter out empty lines.
local found=false
- paste -d '' "$tmp2" "$tmp3" \
+ paste -d '\0' "$tmp2" "$tmp3" \
| grep -v '^[0-9][0-9]*:+$' \
> "$tmp" && found=true