Skip to content

Commit

Permalink
8248526: configure script failed on WSL in May 2020 update
Browse files Browse the repository at this point in the history
Reviewed-by: ihse
  • Loading branch information
YaSuenag committed Jun 30, 2020
1 parent 545d56d commit f567358
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
6 changes: 3 additions & 3 deletions make/autoconf/basic_windows.m4
@@ -1,5 +1,5 @@
#
# Copyright (c) 2011, 2016, Oracle and/or its affiliates. All rights reserved.
# Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
#
# This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -150,10 +150,10 @@ AC_DEFUN_ONCE([BASIC_COMPILE_FIXPATH],
fi
FIXPATH_SRC_W="$FIXPATH_SRC"
FIXPATH_BIN_W="$FIXPATH_BIN"
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W])
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
$RM -rf $FIXPATH_BIN $FIXPATH_DIR
$MKDIR -p $FIXPATH_DIR $CONFIGURESUPPORT_OUTPUTDIR/bin
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_SRC_W])
UTIL_REWRITE_AS_WINDOWS_MIXED_PATH([FIXPATH_BIN_W])
cd $FIXPATH_DIR
$CC $FIXPATH_SRC_W -Fe$FIXPATH_BIN_W > $FIXPATH_DIR/fixpath1.log 2>&1
cd $CONFIGURE_START_DIR
Expand Down
10 changes: 9 additions & 1 deletion make/autoconf/util_windows.m4
Expand Up @@ -52,7 +52,15 @@ AC_DEFUN([UTIL_REWRITE_AS_WINDOWS_MIXED_PATH],
windows_path=`cmd //c echo $unix_path`
$1="$windows_path"
elif test "x$OPENJDK_BUILD_OS_ENV" = "xwindows.wsl"; then
windows_path=`$WSLPATH -m "$unix_path"`
windows_path=`$WSLPATH -m "$unix_path" 2>/dev/null`
if test $? -ne 0; then
dir=`dirname "$unix_path"`
base=`basename "$unix_path"`
windows_path=`$WSLPATH -m "$dir"`/"$base"
if test $? -ne 0; then
AC_MSG_ERROR([Cannot convert \"$unix_path\" to Windows path])
fi
fi
$1="$windows_path"
fi
])
Expand Down
4 changes: 2 additions & 2 deletions make/src/native/fixpath.c
@@ -1,5 +1,5 @@
/*
* Copyright (c) 2011, 2014, Oracle and/or its affiliates. All rights reserved.
* Copyright (c) 2011, 2020, Oracle and/or its affiliates. All rights reserved.
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* This code is free software; you can redistribute it and/or modify it
Expand Down Expand Up @@ -32,7 +32,7 @@

void report_error(char const * msg)
{
LPVOID lpMsgBuf;
LPTSTR lpMsgBuf;
DWORD dw = GetLastError();

FormatMessage(
Expand Down

0 comments on commit f567358

Please sign in to comment.