Skip to content

Commit 7f27c53

Browse files
authored
Merge pull request ibmruntimes#83 from AdamBrousseau/fix_cygwin_winpath_root
8176033: New cygwin grep does not match \r as newline
2 parents 2bf09a6 + 792660d commit 7f27c53

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

common/autoconf/basics_windows.m4

+2-2
Original file line numberDiff line numberDiff line change
@@ -321,8 +321,8 @@ AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],
321321
AC_MSG_ERROR([Something is wrong with your cygwin installation since I cannot find cygpath.exe in your path])
322322
fi
323323
AC_MSG_CHECKING([cygwin root directory as unix-style path])
324-
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
325-
cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
324+
# The cmd output ends with Windows line endings (CR/LF)
325+
cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
326326
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
327327
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
328328
AC_MSG_RESULT([$CYGWIN_ROOT_PATH])

common/autoconf/generated-configure.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -3912,7 +3912,7 @@ fi
39123912
#CUSTOM_AUTOCONF_INCLUDE
39133913

39143914
# Do not change or remove the following line, it is needed for consistency checks:
3915-
DATE_WHEN_GENERATED=1525270078
3915+
DATE_WHEN_GENERATED=1525362336
39163916

39173917
###############################################################################
39183918
#
@@ -7310,8 +7310,8 @@ $as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but a
73107310
fi
73117311
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
73127312
$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7313-
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7314-
cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7313+
# The cmd output ends with Windows line endings (CR/LF)
7314+
cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
73157315
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
73167316
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
73177317
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5

jdk/make/closed/autoconf/generated-configure.sh

+3-3
Original file line numberDiff line numberDiff line change
@@ -3982,7 +3982,7 @@ fi
39823982

39833983

39843984
# Do not change or remove the following line, it is needed for consistency checks:
3985-
DATE_WHEN_GENERATED=1525270078
3985+
DATE_WHEN_GENERATED=1525362336
39863986

39873987
###############################################################################
39883988
#
@@ -7380,8 +7380,8 @@ $as_echo "$as_me: Your cygwin is too old. You are running $CYGWIN_VERSION, but a
73807380
fi
73817381
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking cygwin root directory as unix-style path" >&5
73827382
$as_echo_n "checking cygwin root directory as unix-style path... " >&6; }
7383-
# The cmd output ends with Windows line endings (CR/LF), the grep command will strip that away
7384-
cygwin_winpath_root=`cd / ; cmd /c cd | grep ".*"`
7383+
# The cmd output ends with Windows line endings (CR/LF)
7384+
cygwin_winpath_root=`cd / ; cmd /c cd | $TR -d '\r\n'`
73857385
# Force cygpath to report the proper root by including a trailing space, and then stripping it off again.
73867386
CYGWIN_ROOT_PATH=`$CYGPATH -u "$cygwin_winpath_root " | $CUT -f 1 -d " "`
73877387
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: $CYGWIN_ROOT_PATH" >&5

0 commit comments

Comments
 (0)