summaryrefslogtreecommitdiffstats
path: root/ltmain.sh
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 /ltmain.sh
parenttree-ssa-loop-niter.c (scev_probably_wraps_p): Fix typo in argument name. (diff)
downloadgcc-27b56ba6cc4d22c0407c0372ec8d6de20e9ac2a7.tar.gz
gcc-27b56ba6cc4d22c0407c0372ec8d6de20e9ac2a7.tar.bz2
gcc-27b56ba6cc4d22c0407c0372ec8d6de20e9ac2a7.tar.xz
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 'ltmain.sh')
-rw-r--r--ltmain.sh8
1 files changed, 7 insertions, 1 deletions
diff --git a/ltmain.sh b/ltmain.sh
index 219823fc45d..a3c55f9a751 100644
--- a/ltmain.sh
+++ b/ltmain.sh
@@ -3839,7 +3839,13 @@ extern \"C\" {
3839 fi 3839 fi
3840 3840
3841 # Try sorting and uniquifying the output. 3841 # Try sorting and uniquifying the output.
3842 if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then 3842 if grep -v "^: " < "$nlist" |
3843 if sort -k 3 </dev/null >/dev/null 2>&1; then
3844 sort -k 3
3845 else
3846 sort +2
3847 fi |
3848 uniq > "$nlist"S; then
3843 : 3849 :
3844 else 3850 else
3845 grep -v "^: " < "$nlist" > "$nlist"S 3851 grep -v "^: " < "$nlist" > "$nlist"S