treat operands with leading '+' as file names, as POSIX
has required since 2001. However, make sure the code still
works on pre-POSIX hosts.
* libjava/classpath/ltmain.sh: Don't assume "sort +2" is
equivalent to "sort -k 3", since POSIX 1003.1-2001 no longer
requires this.
This uses the same fix that is already in
libjava/libltdl/ltmain.sh.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@115271
138bc75d-0d04-0410-961f-
82ee72b054a4
+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.
+ * libjava/classpath/ltmain.sh: Don't assume "sort +2" is
+ equivalent to "sort -k 3", since POSIX 1003.1-2001 no longer
+ requires this.
+ This uses the same fix that is already in
+ libjava/libltdl/ltmain.sh.
+
2006-07-04 Peter O'Gorman <peter@pogma.com>
* ltconfig: chmod 644 before ranlib during install.
fi
# Try sorting and uniquifying the output.
- if grep -v "^: " < "$nlist" | sort +2 | uniq > "$nlist"S; then
+ if grep -v "^: " < "$nlist" |
+ if sort -k 3 </dev/null >/dev/null 2>&1; then
+ sort -k 3
+ else
+ sort +2
+ fi |
+ uniq > "$nlist"S; then
:
else
grep -v "^: " < "$nlist" > "$nlist"S