RFR: JDK-8176033: New cygwin grep does not match \r as newline
bradford.wetmore at oracle.com
Wed Mar 1 21:38:35 UTC 2017
Looks ok to me too, but I see it's already been pushed.
Since I doubt the JPRG machines are new enough, I will reload the new
grep onto my machine and ensure it works. Unless you hear from me,
assume we're ok.
On 3/1/2017 9:24 AM, Magnus Ihse Bursie wrote:
> Looks good to me.
>> 1 mars 2017 kl. 14:04 skrev Erik Joelsson <erik.joelsson at oracle.com>:
>> In our configure code for rewriting cygwin paths reliably, we use this construct to find the root of the cygwin installation:
>> # 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 ".*"`
>> This used to work fine for a long time, but with the latest version of cygwin grep, it no longer removes \r from the string. A more robust implementation would be to instead use tr to explicitly remove both \r and \n.
>> Bug: https://bugs.openjdk.java.net/browse/JDK-8176033
>> diff -r fe8466adaef8 common/autoconf/basics_windows.m4
>> --- a/common/autoconf/basics_windows.m4 Fri Feb 24 12:01:32 2017 +0100
>> +++ b/common/autoconf/basics_windows.m4 Wed Mar 01 10:50:44 2017 +0100
>> @@ -329,8 +329,8 @@
>> AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
>> 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 " "`
More information about the build-dev