aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorPaul Eggert <eggert@cs.ucla.edu>2006-07-06 23:24:51 +0000
committerMike Stump <mrs@gcc.gnu.org>2006-07-06 23:24:51 +0000
commit27b56ba6cc4d22c0407c0372ec8d6de20e9ac2a7 (patch)
treefb41ac292252903edcd6ef7a56a825224d78fa07 /gcc
parent525dc87d06289ac03a09201758ab9f43bdd856bf (diff)
downloadgcc-27b56ba6cc4d22c0407c0372ec8d6de20e9ac2a7.zip
gcc-27b56ba6cc4d22c0407c0372ec8d6de20e9ac2a7.tar.gz
gcc-27b56ba6cc4d22c0407c0372ec8d6de20e9ac2a7.tar.bz2
Port to hosts whose 'sort' and 'tail' implementations treat operands with leading '+' as file names...
Port to hosts whose 'sort' and 'tail' implementations treat operands with leading '+' as file names, as POSIX has required since 2001. However, make sure the code still works on pre-POSIX hosts. * ltmain.sh: Don't assume "sort +2" is equivalent to "sort -k 3", since POSIX 1003.1-2001 no longer requires this. contrib: * compare_tests: Don't assume "sort +2" is equivalent to "sort -k 3", since POSIX 1003.1-2001 no longer requires this. gcc: * Makefile.in (slowcompare): Port to POSIX 1003.1-2001, which says you should use "tail -c +N" rather than "tail +Nc". Fix a bug: the old code incorrectly skipped 15 bytes, not 16. From-SVN: r115234
Diffstat (limited to 'gcc')
-rw-r--r--gcc/ChangeLog10
-rw-r--r--gcc/Makefile.in9
2 files changed, 17 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index e5eb94c..94f768f 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,13 @@
+2006-07-06 Paul Eggert <eggert@cs.ucla.edu>
+
+ Port to hosts whose 'sort' and 'tail' implementations
+ treat operands with leading '+' as file names, as POSIX
+ has required since 2001. However, make sure the code still
+ works on pre-POSIX hosts.
+ * Makefile.in (slowcompare): Port to POSIX 1003.1-2001,
+ which says you should use "tail -c +N" rather than "tail +Nc".
+ Fix a bug: the old code incorrectly skipped 15 bytes, not 16.
+
2006-07-06 Zdenek Dvorak <dvorakz@suse.cz>
* tree-ssa-loop-niter.c (scev_probably_wraps_p): Fix typo in argument name.
diff --git a/gcc/Makefile.in b/gcc/Makefile.in
index 9f29c7b..3287de9 100644
--- a/gcc/Makefile.in
+++ b/gcc/Makefile.in
@@ -4384,8 +4384,13 @@ fastcompare fastcompare3 fastcompare4 fastcompare-lean fastcompare3-lean fastcom
for file in $$dir/*$(objext); do \
case "$@" in \
slowcompare* ) \
- tail +16c ./$$file > tmp-foo1; \
- tail +16c stage$$stage/$$file > tmp-foo2; \
+ if tail -c +1 </dev/null >/dev/null 2>&1; then \
+ skip16='-c +17'; \
+ else \
+ skip16='+17c'; \
+ fi; \
+ tail $$skip16 ./$$file > tmp-foo1; \
+ tail $$skip16 stage$$stage/$$file > tmp-foo2; \
cmp tmp-foo1 tmp-foo2 > /dev/null 2>&1; \
cmpret=$$?; \
;; \