[8u-dev] Request for approval: 8176033: New cygwin grep does not match \r as newline

Kevin Walls kevin.walls at oracle.com
Fri Apr 6 21:30:14 UTC 2018


Hi,

I'd like to request approval to backport to 8u:

8176033: New cygwin grep does not match \r as newline

JBS: https://bugs.openjdk.java.net/browse/JDK-8176033
9 changeset: http://hg.openjdk.java.net/jdk9/jdk9/raw-rev/01d26dcf5eac

This very small change was pointed out to me as worth doing, it's 
another trap waiting for people who vary the cygwin version in their 
Windows build environment.

The 8u diff is pasted below.  The 9 changeset didn't "hg import" from, 
but the affected lines are the same, using TR to delete characters 
rather than relying on grep.  Plus rebuilding generated-configure.sh 
with the autogen script.

Thanks
Kevin


bash-4.2$ hg diff common/autoconf/basics_windows.m4
diff -r cddffb220808 common/autoconf/basics_windows.m4
--- a/common/autoconf/basics_windows.m4 Fri Apr 06 04:20:26 2018 -0700
+++ b/common/autoconf/basics_windows.m4 Fri Apr 06 14:20:35 2018 -0700
@@ -321,8 +321,8 @@
        AC_MSG_ERROR([Something is wrong with your cygwin installation 
since I cannot find cygpath.exe in your path])
      fi
      AC_MSG_CHECKING([cygwin root directory as unix-style path])
-    # The cmd output ends with Windows line endings (CR/LF), the grep 
command will strip that away
-    cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
+    # The cmd output ends with Windows line endings (CR/LF)
+    cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
      # Force cygpath to report the proper root by including a trailing 
space, and then stripping it off again.
      CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 
-d " "`
      AC_MSG_RESULT([$CYGWIN_ROOT_PATH])





More information about the jdk8u-dev mailing list