diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-07-06 23:24:51 +0000 |
---|---|---|
committer | Mike Stump <mrs@gcc.gnu.org> | 2006-07-06 23:24:51 +0000 |
commit | 27b56ba6cc4d22c0407c0372ec8d6de20e9ac2a7 (patch) | |
tree | fb41ac292252903edcd6ef7a56a825224d78fa07 /contrib/compare_tests | |
parent | 525dc87d06289ac03a09201758ab9f43bdd856bf (diff) | |
download | gcc-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 'contrib/compare_tests')
-rwxr-xr-x | contrib/compare_tests | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/contrib/compare_tests b/contrib/compare_tests index bcf678c..bed9742 100755 --- a/contrib/compare_tests +++ b/contrib/compare_tests @@ -31,8 +31,14 @@ now=$tmp2 exit_status=0 trap "rm -f $tmp1 $tmp2 $now_s $before_s" 0 1 2 3 5 9 13 15 -sort -t ':' +1 "$now" > "$now_s" -sort -t ':' +1 "$before" > "$before_s" +if sort -k 2 </dev/null >/dev/null 2>&1; then + skip1='-k 2' +else + skip1='+1' +fi + +sort -t ':' $skip1 "$now" > "$now_s" +sort -t ':' $skip1 "$before" > "$before_s" grep '^FAIL:' "$now_s" | sed 's/^[^:]*:[ ]//' >$tmp1 grep '^PASS' "$before_s" | sed 's/^[^:]*:[ ]//' | comm -12 $tmp1 - >$tmp2 |