bug-classpath
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug classpath/28295] New: Fix for POSIX (coreutils)


From: mrs at apple dot com
Subject: [Bug classpath/28295] New: Fix for POSIX (coreutils)
Date: 6 Jul 2006 23:37:21 -0000

This patch has otherwise been approved for gcc, but, we have to submit to you
to ensure that it is fixed.  Let me know if when it goes in, thanks.

2006-07-06  Paul Eggert  <address@hidden>

        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.

mrs $ mkdiff libjava/classpath/ltmain.sh.~1~ 
Doing diffs in libjava/classpath/ltmain.sh.~1~:
--- libjava/classpath/ltmain.sh.~1~     2006-03-14 14:17:56.000000000 -0800
+++ libjava/classpath/ltmain.sh 2006-07-06 15:44:34.000000000 -0700
@@ -3839,7 +3839,13 @@ extern \"C\" {
            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
--------------


-- 
           Summary: Fix for POSIX (coreutils)
           Product: classpath
           Version: 0.92
            Status: UNCONFIRMED
          Severity: normal
          Priority: P3
         Component: classpath
        AssignedTo: unassigned at gcc dot gnu dot org
        ReportedBy: mrs at apple dot com


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=28295





reply via email to

[Prev in Thread] Current Thread [Next in Thread]