Hi,

I attached the latest patch, which now can use Windows paths.  The new 
instructions to build are (assuming 8.3 paths are enabled on your system...):

1. wsl must be started from a Windows Developer command prompt.  To ensure the 
correct environment variables are propagated from Windows to WSL, you can run 
the following commands:
set WSLENV=INCLUDE/l:LIBPATH/l
2. Start wsl (bash):
wsl
3.      Run configure:
./configure 
--with-boot-jdk=/mnt/c/Users/Andrew/Downloads/openjdk-11.0.1_windows-x64_bin/jdk-11.0.1
 --with-tools-dir="C:\Program Files (x86)\Microsoft Visual 
Studio\2017\Enterprise\VC\Auxiliary" --with-ucrt-dll-dir="C:\Program Files 
(x86)\Windows Kits\10\Redist\ucrt\DLLs\x64"
4.      Run make
I’ve tested make with the default target as well as “make images”

The issues regarding the console input redirection I'm still investigating, but 
I doubt it's a bug in the build scripts, meaning it is likely a bug in the 
(boot) JDK or WSL.  Even if we fix the JDK, we probably still have to support 
older boot JDKs (even if the patch is backported), and waiting for Microsoft to 
fix a bug in WSL could take a while (and might only be fixed in a later version 
of Windows).  Thus, I think what we have is a good start, unless you think it's 
necessary to root cause the redirection issue first.  That said, I will keep 
this thread updated with my progress once I figure out the root cause of the 
issue.

Thanks,

-Andrew

-----Original Message-----
From: Magnus Ihse Bursie <magnus.ihse.bur...@oracle.com> 
Sent: Wednesday, December 12, 2018 10:54 AM
To: Erik Joelsson <erik.joels...@oracle.com>; Andrew Luo 
<andrewluotechnolog...@outlook.com>; build-dev@openjdk.java.net
Subject: Re: [PATCH] Support for building using WSL (Windows Subsystem for 
Linux) on Windows

On 2018-12-12 18:30, Erik Joelsson wrote:
> Hello,
>
> I had the same trouble you describe trying to call cmd to create a 
> short path from WSL with an inline script. I managed to it working by 
> creating a script file like this:
>
> shortName.cmd:
>
> ---
> @ECHO OFF
> if '%1' NEQ '' echo %~s1
> ---
>
> $ /mnt/c/Windows/System32/cmd.exe /c shortName.cmd "C:\Program Files"
> C:\PROGRA~1
>
> We could put such a script in make/scripts.
That's a clever workaround. Andrew, can you see if you can use that technique 
to get the proper space safe path resolution to work? I think you can copy the 
msys code straight as it is, and just replace the call to cmd echo %~sA with 
cmd /c $TOPDIR/make/script/shortName.cmd, or whatever you end up calling it.
>
> /Erik
>
> On 2018-12-11 22:44, Andrew Luo wrote:
>> For the stdin/stdout redirection: basically, the issue was only 
>> occurring with those two executables.  Oddly enough, it would occur 
>> every time I tried (for SPP the output would be cutoff, presumably 
>> because the input was cutoff, and for the other executable,
>> available0 would throw an exception consistently for System.in).  I 
>> have a hunch this is due to using WINAPI console functions for 
>> reading from a WSL shell, but I'm not 100% certain.  I plan to try to 
>> build a smaller sample that can reproduce the issue, and if it seems 
>> to be a Windows bug I will file a bug with Microsoft.
So what you are saying is that the issue was not intermittent, but always 
happened for those tools? If so, I can reluctantly agree to this fix. But I'd 
appreciate if you could drill down a bit and see what the problem really is.

/Magnus
>>
>> As for the short paths, calling cmd.exe from WSL bash seems to be a 
>> bit buggy.  cmd.exe, when called from a standard Windows environment, 
>> works properly and prints the path, however, when called from WSL, I
>> get:
>>
>> "(C:\Program Files (x86))" was unexpected at this time.
>>
>> I verified that the correct path was being passed to cmd.exe (not a 
>> bash escaping issue) by creating my own test executable (C++) that 
>> just prints argv[0] ... argv[argc - 1] and when running my text 
>> executable from both Windows and WSL I get the same result, however 
>> when running cmd.exe with the exact same arguments, it works in 
>> Windows but not WSL.  I will file a bug with Microsoft for this issue.
>>
>> Thanks,
>>
>> -Andrew
>>
>>
>> -----Original Message-----
>> From: Magnus Ihse Bursie <magnus.ihse.bur...@oracle.com>
>> Sent: Tuesday, December 11, 2018 6:18 AM
>> To: Andrew Luo <andrewluotechnolog...@outlook.com>; Erik Joelsson 
>> <erik.joels...@oracle.com>; build-dev@openjdk.java.net
>> Subject: Re: [PATCH] Support for building using WSL (Windows 
>> Subsystem for Linux) on Windows
>>
>>
>>
>> On 2018-12-11 14:37, Magnus Ihse Bursie wrote:
>>> On 2018-12-11 06:25, Andrew Luo wrote:
>>>> Hi,
>>>>
>>>> Yes, I've signed an OCA (I've also contributed changes to other 
>>>> groups before, but not build).
>>>>
>>>> Okay, I have fixed the autconf-config* files.
>>>>
>>>> Unfortunately, as Erik mentioned, there is no (supported/reliable) 
>>>> way to access the WSL root / from /cygdrive/c, or even from Windows 
>>>> (there is a way in reality, however, it's not documented/supported 
>>>> by Microsoft and the location changes depending on the 
>>>> distribution/store app id/etc. so best to avoid using it.) I can 
>>>> see if we can print information about versions however.
>>>>
>>>> Right, WSL requires the .exe extension when accessing an 
>>>> executable, as this is Linux behavior (Linux doesn't have 
>>>> extensions for executables generally, but that's besides the point)...
>>>>
>>>> I fixed BASIC_REMOVE_SYMBOLIC_LINKS - a leftover from another 
>>>> approach I tried.
>>>>
>>>> For the redirect, redirect doesn't seem to be working when you have 
>>>> a bash shell input piped into a Win32 executable reading from stdin 
>>>> using WINAPI.  I'm not sure this is supported by the OpenJDK, more 
>>>> likely it might be a Microsoft issue.  For some reason, the stdin 
>>>> would be cut off (or I would see an exception thrown from 
>>>> available0 in FileInputStream).  I personally didn't see any harm 
>>>> in changing piping into input/output files (since all the 
>>>> inputs/outputs are files anyways!).
>>> Ok, let me be sure I get this right. It is only the redirect of
>>> *input* that fails? (But you fixed both because of consistency). I 
>>> agree that the change itself is fine, even better than it is right 
>>> now
>>> -- I was mostly worried about the consequences of redirects is not 
>>> working; there might be other places that fail. But if redirecting 
>>> output works, I think we're mostly fine. That's something we do all 
>>> the time, for each executed command, so if that did not work 
>>> reliably it would be really bad.
>>>
>>> But still... I tried greping for "<" and there's a lot of places, 
>>> 20+, that redirects input.
>>>
>>> Or did this problem only happen when running *java* as the recipient 
>>> of the redirected input?
>>>
>>> This worries me, and while I do think your change makes the tools 
>>> have a better UI, I don't like this as a workaround that will not 
>>> solve all potential problems. :(
>>>
>>>> I fixed TOOLCHAIN_FIND_VISUAL_STUDIO_BAT_FILE - this was also from 
>>>> a few things I had tried earlier.
>>>>
>>>> I disabled the $BASH code because to call bash from Win32 the 
>>>> correct way is either "wsl /bin/bash" or just "bash".  $BASH 
>>>> correctly evaluates to /bin/bash, however 
>>>> BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH is implemented in terms 
>>>> of wslpath, which can only convert a path under /mnt/c back to a 
>>>> Windows path.  Other files under /, for example /bin and /bin/bash, 
>>>> cannot be converted to a Windwos path.
>>>>
>>>> The escaping changes I made because it wasn't working.  This does 
>>>> work with spaces in the path on WSL.  I don't have a Cygwin 
>>>> environment to check, perhaps someone else here could help out?
>>>> Otherwise I can refactor that code to use that echo statement for 
>>>> WSL and use the old echo statement for Cygwin.
>>> I can check it out the next time I'm on a Windows machine.
>>>
>>>> I have fixed the extraneous debug print statement.
>>>>
>>>> As for Windows vs Linux output - you can still force it to build a 
>>>> Linux output binary.  You just need to run configure as follows:
>>>>
>>>> ./configure --with-boot-jdk=/home/andrew/jdk-11.0.1
>>>> ----build=x86_64-unknown-linux-gnu --host=x86_64-unknown-linux-gnu
>>>>
>>>> However, there is a behavior change: now, on WSL, by default, 
>>>> Windows binaries are targeted.  Previously, Linux binaries were the 
>>>> default target.  (Also, you can run configure twice and two sets of 
>>>> configurations will be generated, you can actually build both 
>>>> images by setting CONF=linux-x86_64-server-release or
>>>> CONF=windows-x86_64-server-release)
>>> If you run on WLS, it's reasonable that the default is Windows. The 
>>> --build --host combo is good enough for me as a way to force a linux 
>>> build; we don't need an extra flag for this somewhat odd build 
>>> configuration.
>>>
>>>> As for BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN, wslpath does not 
>>>> support
>>>> 8.3 names.  But perhaps the symlink workaround is acceptable for 
>>>> now and we can handle the 8.3 naming on WSL in a separate change, 
>>>> what do you guys think - personally I think what we have (assuming 
>>>> Cygwin still works) is at least a MVP for WSL devs.  Anyways, at 
>>>> least some people may have to use the symlink workaround if they've 
>>>> disabled 8.3 on NTFS.
>>> That's too bad, since it really helped with getting around the issue 
>>> with spaces in path that's mandatory on Windows using default 
>>> installation of Visual Studio. :(
>>>
>>> Again, sorry if I don't know enough about WSL to know if this is 
>>> possible, but on msys we do the following:
>>>      new_path=`cmd /c "for %A in (\"$input_path\") do @echo 
>>> %~sA"|$TR \\\\\\\\ / | $TR 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'
>>> 'abcdefghijklmnopqrstuvwxyz'`
>>>
>>> That is, we call the Windows cmd.exe using the "%~sA" variable 
>>> syntax to print the 8.3 version of the path (input_path is a 
>>> "normal" Windows path). Is there any way it's possible to do this on 
>>> WSL? It seems reasonable that you should be able to call cmd.exe and 
>>> redirect the output.
>>>
>>> I think it will be worth trying to jump through some loops or doing 
>>> some dirty tricks to get this to work, because everything will be
>>> *soooo* much simpler if you can reliably turn paths into space-safe 
>>> paths; our normal Windows build depends on it.
>> I also realized that if you make a WSL version of 
>> BASIC_FIXUP_EXECUTABLE, then you might be able to add .exe in it. You 
>> will still need the EXE_SUFFIX when e.g. looking for the java.exe 
>> binary in locating the Boot JDK, but perhaps it will simplify some of 
>> the places.
>>
>> I see now that the call to java in Images.gmk really should have been 
>> prefixed with $(FIXPATH) instead. Then you would not have needed the 
>> EXE_SUFFIX fix there.
>>
>> Also, I suggest you look more closely on how we do things on msys 
>> than on cygwin; I have the feeling wsl is closer to msys (in terms of 
>> functionality from our perspective) than cygwin.
>>> /Magnus
>>>> Attaching my latest patch (generated using powershell, so to 
>>>> properly import you may need to convert UTF16 -> UTF8 and change 
>>>> CRLF to just LF, hg tends to be picky)...
>> Looks much better now!
>>
>> Before accepting it, I'd like to understand more about the redirect 
>> issue, and see if there really is no way to rewrite the paths in a 
>> space-safe manner. Then I think this is good to go.
>>
>> /Magnus
>>
>>>> Thanks,
>>>>
>>>> -Andrew
>>>>
>>>>
>>>> -----Original Message-----
>>>> From: Erik Joelsson <erik.joels...@oracle.com>
>>>> Sent: Monday, December 10, 2018 9:19 AM
>>>> To: Magnus Ihse Bursie <magnus.ihse.bur...@oracle.com>; Andrew Luo 
>>>> <andrewluotechnolog...@outlook.com>; build-dev@openjdk.java.net
>>>> Subject: Re: [PATCH] Support for building using WSL (Windows 
>>>> Subsystem for Linux) on Windows
>>>>
>>>> Hello,
>>>>
>>>> On 2018-12-10 02:06, Magnus Ihse Bursie wrote:
>>>>> On 2018-12-09 20:11, Andrew Luo wrote:
>>>>>> One important thing to note is that the WSL build targets Windows.
>>>>>> It is also possible to use WSL to target itself (a WSL Linux
>>>>>> binary) or even other distributions of Linux.  I have not 
>>>>>> implemented that yet, but I think I could do that as a next step 
>>>>>> if you guys think it would be useful (at least I think it would 
>>>>>> be useful, then you can test your changes for both Windows and 
>>>>>> Linux on one system...).
>>>>> I think if you just run configure ordinarily, it will behave like 
>>>>> a Linux system and build the Linux image right out-of-the-box..? 
>>>>> But then again, maybe that behavior is negated by your changes to 
>>>>> config.guess and platform.m4. So maybe we need a flag to configure 
>>>>> to control this...
>>>> It is indeed possible to build a pure Linux binary in WSL today so 
>>>> I think it would be bad to lose that functionality. We certainly 
>>>> need a configure flag to control if a Windows or Linux build should 
>>>> be produced in this case. This is something I have been thinking 
>>>> about when I started tackling WSL builds some time ago but didn't 
>>>> really come up with a good solution. I didn't have the time to 
>>>> spend to really see it through though, so it's nice to see that 
>>>> someone else is trying.
>>>>
>>>> We could simply use the --with-openjdk-target, that would perhaps 
>>>> be the cleanest, but it's also a bit cumbersome. We may need some 
>>>> simplification similar to how we have --with-target-bits=32/64 as a 
>>>> simple switch (e.g. --with-wsl-target=linux/windows?).
>>>>
>>>>>> Steps in case you want to try this out:
>>>>>>
>>>>>>
>>>>>> 1.       Due to autotools not handling spaces well, you have to
>>>>>> create symlinks in Windows that will allow you to access Windows 
>>>>>> Kits and the VC++ compiler without spaces in the path:
>>>>>>
>>>>>> mklink /D C:\VS "C:\Program Files (x86)\Microsoft Visual Studio"
>>>>>>
>>>>>> mklink /D C:\WindowsKits "C:\Program Files (x86)\Windows Kits"
>>>>> That's a bit odd. We encounter spaces in paths on Windows normally 
>>>>> on cygwin and msys, and that works fine. I suspect there is 
>>>>> something missing with the rewriting functions. What we do, is 
>>>>> that we rewrite paths with spaces to paths without spaces, by 
>>>>> using the old 8+3 compatibility names, so we get something like 
>>>>> "/cygdrive/c/progra~1/microso~2" from "C:\Program Files 
>>>>> (x86)\Microsoft Visual Studio". Have a look at 
>>>>> BASIC_MAKE_WINDOWS_SPACE_SAFE_CYGWIN. I think you need a WSL 
>>>>> version of that, as well as of BASIC_FIXUP_PATH_CYGWIN. (And you 
>>>>> need to call the BASIC_FIXUP_PATH_WSL from BASIC_FIXUP_PATH.)
>>>>>
>>>>> If you get these parts right, I don't think you will need any of 
>>>>> the special instructions below to build. In fact, as long as 
>>>>> C:\... is properly remapped, the normal VS autodetect code should 
>>>>> work just fine. And perhaps you can even revert some of the 
>>>>> scarier changes in toolchain_windows.m4.
>>>>>
>>>> I definitely agree with Magnus that to make WSL truly supported, 
>>>> the path handling macros need to be replicated. I'm not sure how to 
>>>> solve it properly. The root path Magnus is asking for is not 
>>>> defined in WSL. In fact, from windows you cannot reach any path in 
>>>> the WSL filesystem. Only Windows drives are mounted in WSL, not the 
>>>> other way around. To convert to old style paths in Cygwin we rely 
>>>> on the cygpath utility. There is a wslpath utility but does it 
>>>> support old style path conversions? If not, maybe it's possible to 
>>>> write such a tool in CMD/PowerShell?
>>>>
>>>> /Erik
>>>>
>>>>
>>>>>> 2.       wsl must be started from a Windows Developer command
>>>>>> prompt.  To ensure the correct environment variables are 
>>>>>> propagated from Windows to WSL, you can run the following commands:
>>>>>>
>>>>>> set WSLENV=INCLUDE/l:LIBPATH/l
>>>>>>
>>>>>> 3.       Start wsl (bash):
>>>>>>
>>>>>> wsl
>>>>>>
>>>>>> 4.       After starting bash you must set your compiler variables to
>>>>>> explicitly point to the correct tools:
>>>>>>
>>>>>> export
>>>>>> AR=/mnt/c/VS/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx6
>>>>>> 4/
>>>>>> x64/lib.exe
>>>>>>
>>>>>>
>>>>>> export
>>>>>> CC=/mnt/c/VS/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx6
>>>>>> 4/
>>>>>> x64/cl.exe
>>>>>>
>>>>>>
>>>>>> export
>>>>>> CXX=/mnt/c/VS/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx
>>>>>> 64
>>>>>> /x64/cl.exe
>>>>>>
>>>>>>
>>>>>> export
>>>>>> LD=/mnt/c/VS/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/Hostx6
>>>>>> 4/
>>>>>> x64/link.exe
>>>>>>
>>>>>>
>>>>>> export RC=/mnt/c/WindowsKits/10/bin/10.0.17763.0/x64/rc.exe
>>>>>>
>>>>>> export MT=/mnt/c/WindowsKits/10/bin/10.0.17763.0/x64/mt.exe
>>>>>>
>>>>>> export
>>>>>> DUMPBIN=/mnt/c/VS/2017/Enterprise/VC/Tools/MSVC/14.16.27023/bin/H
>>>>>> os
>>>>>> tx64/x64/dumpbin.exe
>>>>>>
>>>>>>
>>>>>> 5.       Run configure:
>>>>>>
>>>>>> ./configure
>>>>>> --with-boot-jdk=/mnt/c/Users/Andrew/Downloads/openjdk-11.0.1_wind
>>>>>> ow
>>>>>> s-x64_bin/jdk-11.0.1
>>>>>>
>>>>>> --with-tools-dir="C:\VS\2017\Enterprise\VC\Auxiliary"
>>>>>> --with-ucrt-dll-dir="/mnt/c/WindowsKits/10/Redist/ucrt/DLLs/x64"
>>>>>>
>>>>>> 6.       Run make
>>>>>>
>>>>>> I've tested make with the default target as well as "make images"
>>>>>>
>>>>>> Let me know if you have any feedback/comments.
>>>>>>
>>>>>> Thanks,
>>>>>>
>>>>>> -Andrew
>>>>>>

ÿþdiff -r 4bef1957a1d8 make/Images.gmk

--- a/make/Images.gmk     Thu Nov 22 
10:15:32 2018 -0800

+++ b/make/Images.gmk     Wed Dec 12 
23:31:46 2018 -0800

@@ -99,7 +99,7 @@

      )

         ifeq ($(BUILD_CDS_ARCHIVE), 
true)

        $(call LogWarn, Creating CDS 
archive for jdk image)

-       $(JDK_IMAGE_DIR)/bin/java 
-Xshare:dump -Xmx128M -Xms128M 
$(LOG_INFO)

+       
$(JDK_IMAGE_DIR)/bin/java$(EXE_SUFFIX) 
-Xshare:dump -Xmx128M -Xms128M 
$(LOG_INFO)

         endif

      $(TOUCH) $@

 

@@ -114,7 +114,7 @@

      )

         ifeq ($(BUILD_CDS_ARCHIVE), 
true)

        $(call LogWarn, Creating CDS 
archive for jre image)

-       $(JRE_IMAGE_DIR)/bin/java 
-Xshare:dump -Xmx128M -Xms128M 
$(LOG_INFO)

+       
$(JRE_IMAGE_DIR)/bin/java$(EXE_SUFFIX) 
-Xshare:dump -Xmx128M -Xms128M 
$(LOG_INFO)

         endif

      $(TOUCH) $@

 

diff -r 4bef1957a1d8 
make/autoconf/basics.m4

--- a/make/autoconf/basics.m4     Thu Nov 
22 10:15:32 2018 -0800

+++ b/make/autoconf/basics.m4     Wed Dec 
12 23:31:46 2018 -0800

@@ -223,6 +223,8 @@

       BASIC_FIXUP_PATH_CYGWIN($1)

     elif test "x$OPENJDK_BUILD_OS_ENV" 
= "xwindows.msys"; then

       BASIC_FIXUP_PATH_MSYS($1)

+    elif test "x$OPENJDK_BUILD_OS_ENV" 
= "xwindows.wsl"; then

+      BASIC_FIXUP_PATH_WSL($1)

     else

       # We're on a unix platform. 
Hooray! :)

       path="[$]$1"

@@ -270,6 +272,8 @@

       
BASIC_FIXUP_EXECUTABLE_CYGWIN($1)

     elif test "x$OPENJDK_BUILD_OS_ENV" 
= "xwindows.msys"; then

       BASIC_FIXUP_EXECUTABLE_MSYS($1)

+    elif test "x$OPENJDK_BUILD_OS_ENV" 
= "xwindows.wsl"; then

+      BASIC_FIXUP_EXECUTABLE_WSL($1)

     else

       # We're on a unix platform. 
Hooray! :)

       # First separate the path from 
the arguments. This will split at the 
first

@@ -309,7 +313,7 @@

 

     # Now join together the path and 
the arguments once again

     if test "x$arguments" != xEOL; 
then

-      new_complete="$new_path 
${arguments% *}"

+      new_complete=`echo "$new_path 
${arguments% *}" | sed 's/ $//'`

     else

       new_complete="$new_path"

     fi

@@ -607,6 +611,7 @@

 

   # These are not required on all 
platforms

   BASIC_PATH_PROGS(CYGPATH, cygpath)

+  BASIC_PATH_PROGS(WSLPATH, wslpath)

   BASIC_PATH_PROGS(DF, df)

   BASIC_PATH_PROGS(CPIO, [cpio 
bsdcpio])

   BASIC_PATH_PROGS(NICE, nice)

@@ -634,8 +639,10 @@

     BASIC_CHECK_PATHS_WINDOWS

   else

     PATH_SEP=":"

+     EXECUTABLE_SUFFIX=""

   fi

   AC_SUBST(PATH_SEP)

+  AC_SUBST(EXECUTABLE_SUFFIX)

 

   # We get the top-level directory 
from the supporting wrappers.

   AC_MSG_CHECKING([for top-level 
directory])

@@ -980,6 +987,8 @@

             MAKE_EXPECTED_ENV='cygwin'

           elif test 
"x$OPENJDK_BUILD_OS_ENV" = 
"xwindows.msys"; then

             MAKE_EXPECTED_ENV='msys'

+          elif test 
"x$OPENJDK_BUILD_OS_ENV" = 
"xwindows.wsl"; then

+            
MAKE_EXPECTED_ENV='x86_64-pc-linux-gnu'

           else

             AC_MSG_ERROR([Unknown 
Windows environment])

           fi

diff -r 4bef1957a1d8 
make/autoconf/basics_windows.m4

--- a/make/autoconf/basics_windows.m4     
Thu Nov 22 10:15:32 2018 -0800

+++ b/make/autoconf/basics_windows.m4     
Wed Dec 12 23:31:46 2018 -0800

@@ -32,6 +32,12 @@

   elif test "x$OPENJDK_BUILD_OS_ENV" = 
"xwindows.msys"; then

     unix_path=`$ECHO "$windows_path" | 
$SED -e 's,^\\(.\\):,/\\1,g' -e 
's,\\\\,/,g'`

     $1="$unix_path"

+  elif test "x$OPENJDK_BUILD_OS_ENV" = 
"xwindows.wsl"; then

+    test_unix_path=`$ECHO 
$windows_path | $GREP ^/`

+    if test "x$test_unix_path" = x; 
then

+      unix_path=`$WSLPATH -u 
"$windows_path"`

+      $1="$unix_path"

+    fi

   fi

 ])

 

@@ -44,6 +50,9 @@

   elif test "x$OPENJDK_BUILD_OS_ENV" = 
"xwindows.msys"; then

     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"`

+    $1="$windows_path"

   fi

 ])

 

@@ -86,7 +95,7 @@

 # Helper function which possibly 
converts a path using DOS-style short 
mode.

 # If so, the updated path is stored in 
$new_path.

 # $1: The path to check

-AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS],

+AC_DEFUN([BASIC_MAKE_WINDOWS_SPACE_SAFE_SHORT_PATH],

 [

   input_path="$1"

   # Check if we need to convert this 
using DOS-style short mode. If the path

@@ -96,7 +105,9 @@

   has_forbidden_chars=`$ECHO 
"$input_path" | $GREP 
@<:@^-_/:a-zA-Z0-9@:>@`

   if test "x$has_forbidden_chars" != 
x; then

     # Now convert it to mixed 
DOS-style, short mode (no spaces, and / 
instead of \)

-    new_path=`cmd /c "for %A in 
(\"$input_path\") do @echo %~sA"|$TR 
\\\\\\\\ / | $TR 
'ABCDEFGHIJKLMNOPQRSTUVWXYZ' 
'abcdefghijklmnopqrstuvwxyz'`

+    
short_path_script="$TOPDIR/make/scripts/windowsShortName.bat"

+    
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(short_path_script)

+    new_path=`cmd$EXECUTABLE_SUFFIX /c 
"$short_path_script" "$input_path" | 
$TR -d '\r\n' | $TR \\\\\\\\ /`

   fi

 ])

 

@@ -146,7 +157,7 @@

     new_path=`cmd //c echo $path`

   fi

 

-  
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])

+  
BASIC_MAKE_WINDOWS_SPACE_SAFE_SHORT_PATH([$new_path])

   
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)

   if test "x$path" != "x$new_path"; 
then

     $1="$new_path"

@@ -157,6 +168,28 @@

   
all_fixpath_prefixes=("${all_fixpath_prefixes@<:@@@:>@}"
 "${new_path:0:10}")

 ])

 

+AC_DEFUN([BASIC_FIXUP_PATH_WSL],

+[

+  path="[$]$1"

+  new_path="$path"

+

+  # Rewrite /mnt/./ (paths beginning 
with /mnt/c/, /mnt/d/, etc.)

+  test_wsl_mnt_windows_path=`$ECHO 
$path | $GREP ^/mnt/./`

+

+  # Rewrite .:\ (paths beginning with 
C:\, D:\, etc.)

+  test_windows_path=`$ECHO $path | 
$GREP '^.:\\\\'`

+  

+  if test 
"x$test_wsl_mnt_windows_path$test_windows_path"
 != x; then

+    
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH(new_path)

+    
BASIC_MAKE_WINDOWS_SPACE_SAFE_SHORT_PATH([$new_path])

+    
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)

+    if test "x$path" != "x$new_path"; 
then

+      $1="$new_path"

+      AC_MSG_NOTICE([Rewriting $1 to 
"$new_path"])

+    fi

+  fi

+])

+

 
AC_DEFUN([BASIC_FIXUP_EXECUTABLE_CYGWIN],

 [

   # First separate the path from the 
arguments. This will split at the first

@@ -294,7 +327,7 @@

   else

     # Not in mixed or Windows style, 
start by that.

     new_path=`cmd //c echo $new_path`

-    
BASIC_MAKE_WINDOWS_SPACE_SAFE_MSYS([$new_path])

+    
BASIC_MAKE_WINDOWS_SPACE_SAFE_SHORT_PATH([$new_path])

     # Output is in $new_path

     
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(new_path)

     # remove trailing .exe if any

@@ -305,6 +338,11 @@

   fi

 ])

 

+AC_DEFUN([BASIC_FIXUP_EXECUTABLE_WSL],

+[

+  BASIC_FIXUP_PATH_WSL($1)

+])

+

 # Setup basic configuration paths, and 
platform-specific stuff related to 
PATHs.

 AC_DEFUN([BASIC_CHECK_PATHS_WINDOWS],

 [

@@ -339,6 +377,7 @@

     if test "x$test_cygdrive_prefix" = 
x; then

       AC_MSG_ERROR([Your cygdrive 
prefix is not /cygdrive. This is 
currently not supported. Change with 
mount -c.])

     fi

+    EXECUTABLE_SUFFIX=""

   elif test "x$OPENJDK_BUILD_OS_ENV" = 
"xwindows.msys"; then

     AC_MSG_CHECKING([msys release])

     MSYS_VERSION=`$UNAME -r`

@@ -353,8 +392,11 @@

     
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(MSYS_ROOT_PATH)

     AC_MSG_RESULT([$MSYS_ROOT_PATH])

     
WINDOWS_ENV_ROOT_PATH="$MSYS_ROOT_PATH"

+    EXECUTABLE_SUFFIX=""

+  elif test "x$OPENJDK_BUILD_OS_ENV" = 
"xwindows.wsl"; then

+    EXECUTABLE_SUFFIX=".exe"

   else

-    AC_MSG_ERROR([Unknown Windows 
environment. Neither cygwin nor msys 
was detected.])

+    AC_MSG_ERROR([Unknown Windows 
environment. Neither cygwin, msys, nor 
wsl was detected.])

   fi

 

   # Test if windows or unix 
(cygwin/msys) find is first in path.

@@ -395,6 +437,8 @@

           | tr ' ' '\n' | $GREP '^/./' 
| $SORT | $UNIQ`

       fixpath_argument_list=`echo 
$all_unique_prefixes  | tr ' ' '@'`

       FIXPATH="$FIXPATH_BIN 
-m$fixpath_argument_list"

+    elif test "x$OPENJDK_BUILD_OS_ENV" 
= xwindows.wsl; then

+      FIXPATH="$FIXPATH_BIN -w"

     fi

     FIXPATH_SRC_W="$FIXPATH_SRC"

     FIXPATH_BIN_W="$FIXPATH_BIN"

diff -r 4bef1957a1d8 
make/autoconf/boot-jdk.m4

--- a/make/autoconf/boot-jdk.m4 Thu Nov 
22 10:15:32 2018 -0800

+++ b/make/autoconf/boot-jdk.m4 Wed Dec 
12 23:31:46 2018 -0800

@@ -63,18 +63,18 @@

     # If previous step claimed to have 
found a JDK, check it to see if it 
seems to be valid.

     if test "x$BOOT_JDK_FOUND" = 
xmaybe; then

       # Do we have a bin/java?

-      if test ! -x 
"$BOOT_JDK/bin/java"; then

+      if test ! -x 
"$BOOT_JDK/bin/java$EXECUTABLE_SUFFIX"; 
then

         AC_MSG_NOTICE([Potential Boot 
JDK found at $BOOT_JDK did not contain 
bin/java; ignoring])

         BOOT_JDK_FOUND=no

       else

         # Do we have a bin/javac?

-        if test ! -x 
"$BOOT_JDK/bin/javac"; then

+        if test ! -x 
"$BOOT_JDK/bin/javac$EXECUTABLE_SUFFIX";
 then

           AC_MSG_NOTICE([Potential 
Boot JDK found at $BOOT_JDK did not 
contain bin/javac; ignoring])

           AC_MSG_NOTICE([(This might 
be an JRE instead of an JDK)])

           BOOT_JDK_FOUND=no

         else

           # Oh, this is looking good! 
We probably have found a proper JDK. Is 
it the correct version?

-          
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" 
$USER_BOOT_JDK_OPTIONS -version 2>&1 | 
$HEAD -n 1`

+          
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXECUTABLE_SUFFIX"
 $USER_BOOT_JDK_OPTIONS -version 2>&1 | 
$HEAD -n 1`

           if [ [[ "$BOOT_JDK_VERSION" 
=~ "Picked up" ]] ]; then

             AC_MSG_NOTICE([You have 
_JAVA_OPTIONS or JAVA_TOOL_OPTIONS set. 
This can mess up the build. Please use 
--with-boot-jdk-jvmargs instead.])

             AC_MSG_NOTICE([Java 
reports: "$BOOT_JDK_VERSION".])

@@ -101,7 +101,7 @@

             AC_MSG_CHECKING([for Boot 
JDK])

             AC_MSG_RESULT([$BOOT_JDK])

             AC_MSG_CHECKING([Boot JDK 
version])

-            
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java" 
$USER_BOOT_JDK_OPTIONS -version 2>&1 | 
$TR '\n\r' '  '`

+            
BOOT_JDK_VERSION=`"$BOOT_JDK/bin/java$EXECUTABLE_SUFFIX"
 $USER_BOOT_JDK_OPTIONS -version 2>&1 | 
$TR '\n\r' '  '`

             
AC_MSG_RESULT([$BOOT_JDK_VERSION])

           fi # end check jdk version

         fi # end check javac

@@ -335,11 +335,11 @@

   AC_SUBST(BOOT_JDK)

 

   # Setup tools from the Boot JDK.

-  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA, 
java)

-  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, 
javac)

-  
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVADOC, 
javadoc)

-  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, 
jar)

-  
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JARSIGNER,
 jarsigner)

+  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVA, 
java$EXECUTABLE_SUFFIX)

+  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVAC, 
javac$EXECUTABLE_SUFFIX)

+  
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAVADOC, 
javadoc$EXECUTABLE_SUFFIX)

+  BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JAR, 
jar$EXECUTABLE_SUFFIX)

+  
BOOTJDK_CHECK_TOOL_IN_BOOTJDK(JARSIGNER,
 jarsigner$EXECUTABLE_SUFFIX)

 

   # Finally, set some other options...

 

diff -r 4bef1957a1d8 
make/autoconf/build-aux/config.guess

--- 
a/make/autoconf/build-aux/config.guess   
Thu Nov 22 10:15:32 2018 -0800

+++ 
b/make/autoconf/build-aux/config.guess   
Wed Dec 12 23:31:46 2018 -0800

@@ -60,6 +60,15 @@

   esac

 fi

 

+# Test and fix wsl

+echo $OUT | grep 
x86_64-unknown-linux-gnu > /dev/null 2> 
/dev/null

+if test $? = 0; then

+  uname -r | grep Microsoft > 
/dev/null 2> /dev/null

+  if test $? = 0; then

+    OUT="x86_64-pc-wsl"

+  fi

+fi

+

 # Test and fix architecture string on 
AIX

 # On AIX 'config.guess' returns 
'powerpc' as architecture but 'powerpc' 
is

 # implicitely handled as 32-bit 
architecture in 'platform.m4' so we 
check

diff -r 4bef1957a1d8 
make/autoconf/build-aux/config.sub

--- 
a/make/autoconf/build-aux/config.sub       
Thu Nov 22 10:15:32 2018 -0800

+++ 
b/make/autoconf/build-aux/config.sub       
Wed Dec 12 23:31:46 2018 -0800

@@ -29,7 +29,13 @@

 

 DIR=`dirname $0`

 

-# First, filter out everything that 
doesn't begin with "aarch64-"

+# Allow wsl

+if echo $* | grep x86_64-pc-wsl 
>/dev/null ; then

+    echo $*

+    exit

+fi

+

+# Filter out everything that doesn't 
begin with "aarch64-"

 if ! echo $* | grep '^aarch64-' 
>/dev/null ; then

     . $DIR/autoconf-config.sub "$@"

     # autoconf-config.sub exits, so we 
never reach here, but just in

diff -r 4bef1957a1d8 
make/autoconf/platform.m4

--- a/make/autoconf/platform.m4 Thu Nov 
22 10:15:32 2018 -0800

+++ b/make/autoconf/platform.m4 Wed Dec 
12 23:31:46 2018 -0800

@@ -188,6 +188,10 @@

       VAR_OS=windows

       VAR_OS_ENV=windows.cygwin

       ;;

+    *wsl*)

+      VAR_OS=windows

+      VAR_OS_ENV=windows.wsl

+      ;;

     *mingw*)

       VAR_OS=windows

       VAR_OS_ENV=windows.msys

diff -r 4bef1957a1d8 
make/autoconf/toolchain.m4

--- a/make/autoconf/toolchain.m4       Thu 
Nov 22 10:15:32 2018 -0800

+++ b/make/autoconf/toolchain.m4       Wed 
Dec 12 23:31:46 2018 -0800

@@ -281,13 +281,13 @@

 

   TOOLCHAIN_CC_BINARY_clang="clang"

   TOOLCHAIN_CC_BINARY_gcc="gcc"

-  TOOLCHAIN_CC_BINARY_microsoft="cl"

+  
TOOLCHAIN_CC_BINARY_microsoft="cl$EXECUTABLE_SUFFIX"

   TOOLCHAIN_CC_BINARY_solstudio="cc"

   TOOLCHAIN_CC_BINARY_xlc="xlc_r"

 

   TOOLCHAIN_CXX_BINARY_clang="clang++"

   TOOLCHAIN_CXX_BINARY_gcc="g++"

-  TOOLCHAIN_CXX_BINARY_microsoft="cl"

+  
TOOLCHAIN_CXX_BINARY_microsoft="cl$EXECUTABLE_SUFFIX"

   TOOLCHAIN_CXX_BINARY_solstudio="CC"

   TOOLCHAIN_CXX_BINARY_xlc="xlC_r"

 

@@ -430,7 +430,7 @@

     # There is no specific version 
flag, but all output starts with a 
version string.

     # First line typically looks 
something like:

     # Microsoft (R) 32-bit C/C++ 
Optimizing Compiler Version 
16.00.40219.01 for 80x86

-    COMPILER_VERSION_OUTPUT=`$COMPILER 
2>&1 | $HEAD -n 1 | $TR -d '\r'`

+    
COMPILER_VERSION_OUTPUT=`"$COMPILER" 
2>&1 | $HEAD -n 1 | $TR -d '\r'`

     # Check that this is likely to be 
Microsoft CL.EXE.

     $ECHO "$COMPILER_VERSION_OUTPUT" | 
$GREP "Microsoft.*Compiler" > /dev/null

     if test $? -ne 0; then

@@ -698,7 +698,7 @@

     # In the Microsoft toolchain we 
have a separate LD command "link".

     # Make sure we reject 
/usr/bin/link (as determined in 
CYGWIN_LINK), which is

     # a cygwin program for something 
completely different.

-    AC_CHECK_PROG([LD], 
[link],[link],,, [$CYGWIN_LINK])

+    AC_CHECK_PROG([LD], 
[link$EXECUTABLE_SUFFIX],[link$EXECUTABLE_SUFFIX],,,
 [$CYGWIN_LINK])

     BASIC_FIXUP_EXECUTABLE(LD)

     # Verify that we indeed succeeded 
with this trick.

     AC_MSG_CHECKING([if the found 
link.exe is actually the Visual Studio 
linker])

@@ -750,7 +750,7 @@

   #

   if test "x$TOOLCHAIN_TYPE" = 
xmicrosoft; then

     # The corresponding ar tool is 
lib.exe (used to create static 
libraries)

-    AC_CHECK_PROG([AR], 
[lib],[lib],,,)

+    AC_CHECK_PROG([AR], 
[lib$EXECUTABLE_SUFFIX],[lib$EXECUTABLE_SUFFIX],,,)

   elif test "x$TOOLCHAIN_TYPE" = xgcc; 
then

     BASIC_CHECK_TOOLS(AR, ar gcc-ar)

   else

@@ -774,12 +774,12 @@

   fi

 

   if test "x$TOOLCHAIN_TYPE" = 
xmicrosoft; then

-    AC_CHECK_PROG([MT], [mt], [mt],,, 
[/usr/bin/mt])

+    AC_CHECK_PROG([MT], 
[mt$EXECUTABLE_SUFFIX], 
[mt$EXECUTABLE_SUFFIX],,, 
[/usr/bin/mt])

     BASIC_FIXUP_EXECUTABLE(MT)

     # Setup the resource compiler (RC)

-    AC_CHECK_PROG([RC], [rc], [rc],,, 
[/usr/bin/rc])

+    AC_CHECK_PROG([RC], 
[rc$EXECUTABLE_SUFFIX], 
[rc$EXECUTABLE_SUFFIX],,, 
[/usr/bin/rc])

     BASIC_FIXUP_EXECUTABLE(RC)

-    AC_CHECK_PROG([DUMPBIN], 
[dumpbin], [dumpbin],,,)

+    AC_CHECK_PROG([DUMPBIN], 
[dumpbin$EXECUTABLE_SUFFIX], 
[dumpbin$EXECUTABLE_SUFFIX],,,)

     BASIC_FIXUP_EXECUTABLE(DUMPBIN)

     # We need to check for 
'msbuild.exe' because at the place 
where we expect to

     # find 'msbuild.exe' there's also 
a directory called 'msbuild' and 
configure

diff -r 4bef1957a1d8 
make/autoconf/toolchain_windows.m4

--- 
a/make/autoconf/toolchain_windows.m4       
Thu Nov 22 10:15:32 2018 -0800

+++ 
b/make/autoconf/toolchain_windows.m4       
Wed Dec 12 23:31:46 2018 -0800

@@ -115,7 +115,7 @@

         
VCVARSFILES="vc/bin/vcvars32.bat 
vc/auxiliary/build/vcvars32.bat"

       else

         
VCVARSFILES="vc/bin/amd64/vcvars64.bat 
vc/bin/x86_amd64/vcvarsx86_amd64.bat \

-            
vc/auxiliary/build/vcvarsx86_amd64.bat 
vc/auxiliary/build/vcvars64.bat"

+            
VC/Auxiliary/Build/vcvarsx86_amd64.bat 
VC/Auxiliary/Build/vcvars64.bat"

       fi

 

       for VCVARSFILE in $VCVARSFILES; 
do

@@ -222,7 +222,6 @@

       [C:/Program 
Files/$VS_INSTALL_DIR], [well-known 
name])

   
TOOLCHAIN_CHECK_POSSIBLE_VISUAL_STUDIO_ROOT([${VS_VERSION}],

       [C:/Program Files 
(x86)/$VS_INSTALL_DIR], [well-known 
name])

-

   if test "x$SDK_INSTALL_DIR" != x; 
then

     if test "x$ProgramW6432" != x; 
then

       
TOOLCHAIN_CHECK_POSSIBLE_WIN_SDK_ROOT([${VS_VERSION}],

@@ -372,8 +371,13 @@

       # Instead create a shell script 
which will set the relevant variables 
when run.

       WINPATH_VS_ENV_CMD="$VS_ENV_CMD"

       
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_VS_ENV_CMD])

-      WINPATH_BASH="$BASH"

-      
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])

+      

+      if test "x$OPENJDK_BUILD_OS_ENV" 
= "xwindows.wsl"; then

+        WINPATH_BASH="bash"

+      else

+        WINPATH_BASH="$BASH"

+        
BASIC_WINDOWS_REWRITE_AS_WINDOWS_MIXED_PATH([WINPATH_BASH])

+      fi

 

       # Generate a DOS batch file 
which runs $VS_ENV_CMD, and then 
creates a shell

       # script (executable by bash) 
that will setup the important 
variables.

@@ -381,7 +385,7 @@

       $ECHO "@echo off" >  
$EXTRACT_VC_ENV_BAT_FILE

       # This will end up something 
like:

       # call 
C:/progra~2/micros~2.0/vc/bin/amd64/vcvars64.bat

-      $ECHO "call $WINPATH_VS_ENV_CMD 
$VS_ENV_ARGS" >> 
$EXTRACT_VC_ENV_BAT_FILE

+      $ECHO "call 
\"$WINPATH_VS_ENV_CMD\" $VS_ENV_ARGS" 
>> $EXTRACT_VC_ENV_BAT_FILE

       # In some cases, the VS_ENV_CMD 
will change directory, change back so

       # the set-vs-env.sh ends up in 
the right place.

       $ECHO 'cd %~dp0' >> 
$EXTRACT_VC_ENV_BAT_FILE

@@ -389,28 +393,28 @@

       # C:/CygWin/bin/bash -c 'echo 
VS_PATH=\"$PATH\" > localdevenv.sh

       # The trailing space for 
everyone except PATH is no typo, but is 
needed due

       # to trailing \ in the Windows 
paths. These will be stripped later.

-      $ECHO "$WINPATH_BASH -c 'echo 
VS_PATH="'\"$PATH\" > set-vs-env.sh' \

+      $ECHO "$WINPATH_BASH"' -c "echo 
VS_PATH=\\\"\"$PATH\"\\\" > 
set-vs-env.sh"' \

           >> $EXTRACT_VC_ENV_BAT_FILE

-      $ECHO "$WINPATH_BASH -c 'echo 
VS_INCLUDE="'\"$INCLUDE\;$include \" >> 
set-vs-env.sh' \

+      $ECHO "$WINPATH_BASH"' -c "echo 
VS_INCLUDE=\\\"\"$INCLUDE\;$include 
\"\\\" >> set-vs-env.sh"' \

           >> $EXTRACT_VC_ENV_BAT_FILE

-      $ECHO "$WINPATH_BASH -c 'echo 
VS_LIB="'\"$LIB\;$lib \" >> 
set-vs-env.sh' \

+      $ECHO "$WINPATH_BASH"' -c "echo 
VS_LIB=\\\"\"$LIB\;$lib \"\\\" >> 
set-vs-env.sh"' \

           >> $EXTRACT_VC_ENV_BAT_FILE

-      $ECHO "$WINPATH_BASH -c 'echo 
VCINSTALLDIR="'\"$VCINSTALLDIR \" >> 
set-vs-env.sh' \

+      $ECHO "$WINPATH_BASH"' -c "echo 
VCINSTALLDIR=\\\"\"$VCINSTALLDIR \"\\\" 
>> set-vs-env.sh"' \

           >> $EXTRACT_VC_ENV_BAT_FILE

-      $ECHO "$WINPATH_BASH -c 'echo 
WindowsSdkDir="'\"$WindowsSdkDir \" >> 
set-vs-env.sh' \

+      $ECHO "$WINPATH_BASH"' -c "echo 
WindowsSdkDir=\\\"\"$WindowsSdkDir 
\"\\\" >> set-vs-env.sh"' \

           >> $EXTRACT_VC_ENV_BAT_FILE

-      $ECHO "$WINPATH_BASH -c 'echo 
WINDOWSSDKDIR="'\"$WINDOWSSDKDIR \" >> 
set-vs-env.sh' \

+      $ECHO "$WINPATH_BASH"' -c "echo 
WINDOWSSDKDIR=\\\"\"$WINDOWSSDKDIR 
\"\\\" >> set-vs-env.sh"' \

           >> $EXTRACT_VC_ENV_BAT_FILE

 

       # Now execute the newly created 
bat file.

       # The | cat is to stop 
SetEnv.Cmd to mess with system colors 
on msys.

       # Change directory so we don't 
need to mess with Windows paths in 
redirects.

       cd $VS_ENV_TMP_DIR

-      cmd /c extract-vs-env.bat | $CAT

+      cmd$EXECUTABLE_SUFFIX /c 
extract-vs-env.bat | $CAT

       cd $CURDIR

 

       if test ! -s 
$VS_ENV_TMP_DIR/set-vs-env.sh; then

-        AC_MSG_NOTICE([Could not 
succesfully extract the envionment 
variables needed for the VS setup.])

+        AC_MSG_NOTICE([Could not 
succesfully extract the environment 
variables needed for the VS setup.])

         AC_MSG_NOTICE([Try setting 
--with-tools-dir to the VC/bin 
directory within the VS installation])

         AC_MSG_NOTICE([or run 
"bash.exe -l" from a VS command prompt 
and then run configure from there.])

         AC_MSG_ERROR([Cannot 
continue])

@@ -600,10 +604,10 @@

       
BASIC_WINDOWS_REWRITE_AS_UNIX_PATH(CYGWIN_VS_TOOLS_DIR)

       if test 
"x$OPENJDK_TARGET_CPU_BITS" = x64; then

         POSSIBLE_MSVC_DLL=`$FIND 
"$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME 
\

-         | $GREP -i /x64/ | $HEAD 
--lines 1`

+        | $GREP -i /x64/ | $HEAD 
--lines 1`

       else

         POSSIBLE_MSVC_DLL=`$FIND 
"$CYGWIN_VS_TOOLS_DIR" -name $DLL_NAME 
\

-         | $GREP -i /x86/ | $HEAD 
--lines 1`

+        | $GREP -i /x86/ | $HEAD 
--lines 1`

       fi

       
TOOLCHAIN_CHECK_POSSIBLE_MSVC_DLL([$DLL_NAME],
 [$POSSIBLE_MSVC_DLL],

           [search of VS100COMNTOOLS])

@@ -616,14 +620,14 @@

     if test "x$CYGWIN_VC_INSTALL_DIR" 
!= x; then

       if test 
"x$OPENJDK_TARGET_CPU_BITS" = x64; then

         POSSIBLE_MSVC_DLL=`$FIND 
"$CYGWIN_VC_INSTALL_DIR" -name 
$DLL_NAME \

-         | $GREP x64 | $HEAD --lines 1`

+        | $GREP x64 | $HEAD --lines 1`

       else

         POSSIBLE_MSVC_DLL=`$FIND 
"$CYGWIN_VC_INSTALL_DIR" -name 
$DLL_NAME \

-         | $GREP x86 | $GREP -v ia64 | 
$GREP -v x64 | $HEAD --lines 1`

+        | $GREP x86 | $GREP -v ia64 | 
$GREP -v x64 | $HEAD --lines 1`

         if test "x$POSSIBLE_MSVC_DLL" 
= x; then

           # We're grasping at straws 
now...

           POSSIBLE_MSVC_DLL=`$FIND 
"$CYGWIN_VC_INSTALL_DIR" -name 
$DLL_NAME \

-           | $HEAD --lines 1`

+          | $HEAD --lines 1`

         fi

       fi

 

@@ -693,13 +697,13 @@

   if test "x$USE_UCRT" = "xtrue"; then

     AC_MSG_CHECKING([for UCRT DLL 
dir])

     if test "x$with_ucrt_dll_dir" != 
x; then

-      if test -z "$(ls -d 
"$with_ucrt_dll_dir/*.dll" 2> 
/dev/null)"; then

+      
UCRT_DLL_DIR="$with_ucrt_dll_dir"

+      BASIC_FIXUP_PATH([UCRT_DLL_DIR])

+      if test -z "$(ls -d 
$UCRT_DLL_DIR/*.dll 2> /dev/null)"; 
then

         AC_MSG_RESULT([no])

-        AC_MSG_ERROR([Could not find 
any dlls in $with_ucrt_dll_dir])

+        AC_MSG_ERROR([Could not find 
any dlls in $UCRT_DLL_DIR])

       else

         
AC_MSG_RESULT([$with_ucrt_dll_dir])

-        
UCRT_DLL_DIR="$with_ucrt_dll_dir"

-        
BASIC_FIXUP_PATH([UCRT_DLL_DIR])

       fi

     elif test "x$DEVKIT_UCRT_DLL_DIR" 
!= "x"; then

       
UCRT_DLL_DIR="$DEVKIT_UCRT_DLL_DIR"

diff -r 4bef1957a1d8 
make/gendata/Gendata-java.base.gmk

--- 
a/make/gendata/Gendata-java.base.gmk       
Thu Nov 22 10:15:32 2018 -0800

+++ 
b/make/gendata/Gendata-java.base.gmk       
Wed Dec 12 23:31:46 2018 -0800

@@ -55,7 +55,7 @@

 $(GENDATA_CURDATA): 
$(TOPDIR)/make/data/currency/CurrencyData.properties
 $(BUILD_TOOLS_JDK)

      $(call MakeDir, $(@D))

      $(RM) $@

-     $(TOOL_GENERATECURRENCYDATA) -o 
$@.tmp < $<

+     $(TOOL_GENERATECURRENCYDATA) -o 
$@.tmp -i $<

      $(MV) $@.tmp $@

      $(CHMOD) 444 $@

 

diff -r 4bef1957a1d8 
make/gensrc/GensrcBuffer.gmk

--- a/make/gensrc/GensrcBuffer.gmk   Thu 
Nov 22 10:15:32 2018 -0800

+++ b/make/gensrc/GensrcBuffer.gmk   Wed 
Dec 12 23:31:46 2018 -0800

@@ -230,7 +230,8 @@

   endif

 

   $$($1_DST): $$($1_DEP) 
$(GENSRC_BUFFER_DST)/_the.buffer.dir

-     $(TOOL_SPP) < $$($1_SRC) > 
$$($1_OUT).tmp \

+     $(RM) $$($1_OUT).tmp

+     $(TOOL_SPP) -i$$($1_SRC) 
-o$$($1_OUT).tmp \

          -K$$($1_type) \

          -K$$($1_category) \

          -K$$($1_streams) \

@@ -260,12 +261,12 @@

         ifeq ($$($1_BIN), 1)

        $(SED) -e '/#BIN/,$$$$d' < 
$$($1_OUT) > $$($1_DST).tmp

        $(RM) $$($1_OUT)

-       $$($1_char_CMD) < $$($1_SRC_BIN) 
>> $$($1_DST).tmp

-       $$($1_short_CMD) < $$($1_SRC_BIN) 
>> $$($1_DST).tmp

-       $$($1_int_CMD) < $$($1_SRC_BIN) 
>> $$($1_DST).tmp

-       $$($1_long_CMD) < $$($1_SRC_BIN) 
>> $$($1_DST).tmp

-       $$($1_float_CMD) < $$($1_SRC_BIN) 
>> $$($1_DST).tmp

-       $$($1_double_CMD) < 
$$($1_SRC_BIN) >> $$($1_DST).tmp

+       $$($1_char_CMD) -i$$($1_SRC_BIN) 
-o$$($1_DST).tmp

+       $$($1_short_CMD) -i$$($1_SRC_BIN) 
-o$$($1_DST).tmp

+       $$($1_int_CMD) -i$$($1_SRC_BIN) 
-o$$($1_DST).tmp

+       $$($1_long_CMD) -i$$($1_SRC_BIN) 
-o$$($1_DST).tmp

+       $$($1_float_CMD) -i$$($1_SRC_BIN) 
-o$$($1_DST).tmp

+       $$($1_double_CMD) 
-i$$($1_SRC_BIN) -o$$($1_DST).tmp

        $(PRINTF) "}\n" >> $$($1_DST).tmp

        mv $$($1_DST).tmp $$($1_DST)

         endif

diff -r 4bef1957a1d8 
make/gensrc/GensrcCharsetCoder.gmk

--- 
a/make/gensrc/GensrcCharsetCoder.gmk       
Thu Nov 22 10:15:32 2018 -0800

+++ 
b/make/gensrc/GensrcCharsetCoder.gmk       
Wed Dec 12 23:31:46 2018 -0800

@@ -36,7 +36,7 @@

 
$(GENSRC_CHARSETCODER_DST)/CharsetDecoder.java:
 $(GENSRC_CHARSETCODER_TEMPLATE)

      $(call MakeTargetDir)

      $(RM) $@.tmp

-     $(TOOL_SPP) < $< >$@.tmp \

+     $(TOOL_SPP) -i$< -o$@.tmp \

          -Kdecoder \

          -DA='A' \

          -Da='a' \

@@ -71,7 +71,7 @@

 
$(GENSRC_CHARSETCODER_DST)/CharsetEncoder.java:
 $(GENSRC_CHARSETCODER_TEMPLATE)

      $(call MakeTargetDir)

      $(RM) $@.tmp

-     $(TOOL_SPP) < $< >$@.tmp \

+     $(TOOL_SPP) -i$< -o$@.tmp \

          -Kencoder \

          -DA='An' \

          -Da='an' \

diff -r 4bef1957a1d8 
make/gensrc/GensrcVarHandles.gmk

--- a/make/gensrc/GensrcVarHandles.gmk   
Thu Nov 22 10:15:32 2018 -0800

+++ b/make/gensrc/GensrcVarHandles.gmk   
Wed Dec 12 23:31:46 2018 -0800

@@ -59,8 +59,9 @@

        $$(eval $1_type := $$$$(shell 
$(TR) '[:upper:]' '[:lower:]' <<< 
$$$$($1_Type)))

         endif

      $$(call MakeDir, $$(@D))

+     $(RM) $$@

      $(TOOL_SPP) -nel -K$$($1_type) 
-Dtype=$$($1_type) -DType=$$($1_Type) \

-         $$($1_ARGS) < $$< > $$@

+         $$($1_ARGS) -i$$< -o$$@

 

   GENSRC_VARHANDLES += $$($1_FILENAME)

 endef

@@ -147,10 +148,11 @@

 

   $$($1_FILENAME): 
$(VARHANDLES_SRC_DIR)/X-VarHandleByteArrayView.java.template
 $(BUILD_TOOLS_JDK)

      $$(call MakeDir, $$(@D))

+     $(RM) $$@

      $(TOOL_SPP) -nel -K$$($1_type) \

          -Dtype=$$($1_type) 
-DType=$$($1_Type) 
-DBoxType=$$($1_BoxType) \

          -DrawType=$$($1_rawType) 
-DRawType=$$($1_RawType) 
-DRawBoxType=$$($1_RawBoxType) \

-         $$($1_ARGS) < $$< > $$@

+         $$($1_ARGS) -i$$< -o$$@

 

   GENSRC_VARHANDLES += $$($1_FILENAME)

 endef

diff -r 4bef1957a1d8 
make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java

--- 
a/make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
     Thu Nov 22 10:15:32 2018 -0800

+++ 
b/make/jdk/src/classes/build/tools/generatecurrencydata/GenerateCurrencyData.java
     Wed Dec 12 23:31:46 2018 -0800

@@ -28,7 +28,9 @@

 import java.io.IOException;

 import java.io.FileNotFoundException;

 import java.io.DataOutputStream;

+import java.io.FileInputStream;

 import java.io.FileOutputStream;

+import java.io.InputStream;

 import java.text.SimpleDateFormat;

 import java.util.Date;

 import java.util.HashMap;

@@ -134,19 +136,44 @@

     private static String 
currenciesWithMinorUnitsUndefined;

 

     public static void main(String[] 
args) {

-

+         InputStream in = System.in;

         // Look for "-o 
outputfilename" option

-        if ( args.length == 2 && 
args[0].equals("-o") ) {

-            try {

-                out = new 
DataOutputStream(new 
FileOutputStream(args[1]));

-            } catch ( 
FileNotFoundException e ) {

-                
System.err.println("Error: " + 
e.getMessage());

-                
e.printStackTrace(System.err);

-                System.exit(1);

-            }

-        } else {

-            System.err.println("Error: 
Illegal arg count");

-            System.exit(1);

+        for (int n = 0; n < 
args.length; ++n) {

+            if (args[n].equals("-o")) 
{

+                          ++n;

+                          if (n >= args.length) {

+                                 
System.err.println("Error: Invalid 
argument format");

+                                 System.exit(1);

+                          }

+                          try {

+                                 out = new 
DataOutputStream(new 
FileOutputStream(args[n]));

+                          } catch ( 
FileNotFoundException e ) {

+                                 
System.err.println("Error: " + 
e.getMessage());

+                                 
e.printStackTrace(System.err);

+                                 System.exit(1);

+                          }

+                   } else if 
(args[n].equals("-i")) {

+                          ++n;

+                          if (n >= args.length) {

+                                 
System.err.println("Error: Invalid 
argument format");

+                                 System.exit(1);

+                          }

+                          try {

+                                 in = new 
FileInputStream(args[n]);

+                          } catch ( 
FileNotFoundException e ) {

+                                 
System.err.println("Error: " + 
e.getMessage());

+                                 
e.printStackTrace(System.err);

+                                 System.exit(1);

+                          }

+                   } else {

+                          
System.err.println("Error: Invalid 
argument " + args[n]);

+                          System.exit(1);

+                   }

+        }

+

+        if (out == null) {

+                   System.err.println("Error: 
Invalid argument format");

+                   System.exit(1);

         }

 

         format = new 
SimpleDateFormat("yyyy-MM-dd-HH-mm-ss", 
Locale.US);

@@ -154,7 +181,7 @@

         format.setLenient(false);

 

         try {

-            readInput();

+            readInput(in);

             
buildMainAndSpecialCaseTables();

             buildOtherTables();

             writeOutput();

@@ -167,9 +194,9 @@

         }

     }

 

-    private static void readInput() 
throws IOException {

+    private static void 
readInput(InputStream in) throws 
IOException {

         currencyData = new 
Properties();

-        currencyData.load(System.in);

+        currencyData.load(in);

 

         // initialize other lookup 
strings

         formatVersion = (String) 
currencyData.get("formatVersion");

diff -r 4bef1957a1d8 
make/jdk/src/classes/build/tools/spp/Spp.java

--- 
a/make/jdk/src/classes/build/tools/spp/Spp.java
 Thu Nov 22 10:15:32 2018 -0800

+++ 
b/make/jdk/src/classes/build/tools/spp/Spp.java
 Wed Dec 12 23:31:46 2018 -0800

@@ -25,6 +25,8 @@

 

 package build.tools.spp;

 

+import java.io.FileInputStream;

+import java.io.FileOutputStream;

 import java.util.*;

 import java.util.regex.*;

 

@@ -69,6 +71,8 @@

         Set<String> keys = new 
HashSet<>();

         boolean be = false;

         boolean el = true;

+            String inputFile = null;

+            String outputFile = null;

 

         for (String arg:args) {

             if (arg.startsWith("-D")) 
{

@@ -76,6 +80,10 @@

                 
vars.put(arg.substring(2, 
i),arg.substring(i+1));

             } else if 
(arg.startsWith("-K")) {

                 
keys.add(arg.substring(2));

+            } else if 
(arg.startsWith("-i")) {

+                inputFile = 
arg.substring(2);

+            } else if 
(arg.startsWith("-o")) {

+                outputFile = 
arg.substring(2);

             } else if 
("-be".equals(arg)) {

                 be = true;

             } else if 
("-nel".equals(arg)) {

@@ -87,11 +95,11 @@

         }

 

         StringBuffer out = new 
StringBuffer();

-        new Spp().spp(new 
Scanner(System.in),

+        new Spp().spp(new Scanner(new 
FileInputStream(inputFile)),

                       out, "",

                       keys, vars, be, 
el,

                       false);

-        
System.out.print(out.toString());

+        new 
FileOutputStream(outputFile, 
true).write(out.toString().getBytes());

     }

 

     static final String LNSEP = 
System.getProperty("line.separator");

diff -r 4bef1957a1d8 
make/scripts/windowsShortName.bat

--- /dev/null     Thu Jan 01 00:00:00 
1970 +0000

+++ b/make/scripts/windowsShortName.bat 
Wed Dec 12 23:31:46 2018 -0800

@@ -0,0 +1,24 @@

+@echo off

+REM

+REM Copyright (c) 2018, Oracle and/or 
its affiliates. All rights reserved.

+REM DO NOT ALTER OR REMOVE COPYRIGHT 
NOTICES OR THIS FILE HEADER.

+REM

+REM This code is free software; you 
can redistribute it and/or modify it

+REM under the terms of the GNU General 
Public License version 2 only, as

+REM published by the Free Software 
Foundation.

+REM

+REM This code is distributed in the 
hope that it will be useful, but 
WITHOUT

+REM ANY WARRANTY; without even the 
implied warranty of MERCHANTABILITY or

+REM FITNESS FOR A PARTICULAR PURPOSE.  
See the GNU General Public License

+REM version 2 for more details (a copy 
is included in the LICENSE file that

+REM accompanied this code).

+REM

+REM You should have received a copy of 
the GNU General Public License version

+REM 2 along with this work; if not, 
write to the Free Software Foundation,

+REM Inc., 51 Franklin St, Fifth Floor, 
Boston, MA 02110-1301 USA.

+REM

+REM Please contact Oracle, 500 Oracle 
Parkway, Redwood Shores, CA 94065 USA

+REM or visit www.oracle.com if you 
need additional information or have any

+REM questions.

+REM

+if '%1' NEQ '' echo %~s1

diff -r 4bef1957a1d8 
make/src/native/fixpath.c

--- a/make/src/native/fixpath.c Thu Nov 
22 10:15:32 2018 -0800

+++ b/make/src/native/fixpath.c Wed Dec 
12 23:31:46 2018 -0800

@@ -24,6 +24,7 @@

  */

 

 #include <Windows.h>

+#include <stdbool.h>

 #include <io.h>

 #include <stdio.h>

 #include <string.h>

@@ -53,25 +54,16 @@

 }

 

 /*

- * Test if pos points to /cygdrive/_/ 
where _ can

+ * Test if pos points to /prefix/_/ 
where _ can

  * be any character.

  */

-int is_cygdrive_here(int pos, char 
const *in, int len)

+int is_prefix_here(int pos, char const 
*in, int len, const char* prefix)

 {

-  // Length of /cygdrive/c/ is 12

-  if (pos+12 > len) return 0;

-  if (in[pos+11]=='/' &&

-      in[pos+9]=='/' &&

-      in[pos+8]=='e' &&

-      in[pos+7]=='v' &&

-      in[pos+6]=='i' &&

-      in[pos+5]=='r' &&

-      in[pos+4]=='d' &&

-      in[pos+3]=='g' &&

-      in[pos+2]=='y' &&

-      in[pos+1]=='c' &&

-      in[pos+0]=='/') {

-    return 1;

+  // Length of c/ is 2

+  int prefix_size = strlen(prefix);

+  if (pos+prefix_size+2 > len) return 
0;

+  if (in[pos+prefix_size+1]=='/') {

+    return strncmp(in + pos, prefix, 
prefix_size) == 0;

   }

   return 0;

 }

@@ -93,7 +85,7 @@

   }

 

   for (i = 0, j = 0; i<len;) {

-    if (is_cygdrive_here(i, in, len)) 
{

+    if (is_prefix_here(i, in, len, 
"/cygdrive/")) {

       out[j++] = in[i+10];

       out[j++] = ':';

       i+=11;

@@ -196,7 +188,39 @@

   return str;

 }

 

+/*

+ * Replace /mnt/_/ with _:/

+ * Works in place since drive letter 
is always

+ * shorter than /mnt/

+ */

+char *replace_cygdrive_wsl(char const 
*in)

+{

+  size_t len = strlen(in);

+  char *out = (char*) malloc(len+1);

+  int i,j;

+

+  if (len < 7) {

+    memmove(out, in, len + 1);

+    return out;

+  }

+

+  for (i = 0, j = 0; i<len;) {

+    if (is_prefix_here(i, in, len, 
"/mnt/")) {

+      out[j++] = in[i+5];

+      out[j++] = ':';

+      i+=6;

+    } else {

+      out[j] = in[i];

+      i++;

+      j++;

+    }

+  }

+  out[j] = '\0';

+  return out;

+}

+

 char*(*replace_cygdrive)(char const 
*in) = NULL;

+bool debug_fixpath = false;

 

 char *files_to_delete[1024];

 int num_files_to_delete = 0;

@@ -250,11 +274,11 @@

     append(&buffer, &buflen, &used, 
block, blocklen);

   }

   buffer[used] = 0;

-  if (getenv("DEBUG_FIXPATH") != NULL) 
{

+  if (debug_fixpath) {

     fprintf(stderr, "fixpath input 
from @-file %s: %s\n", &in[1], buffer);

   }

   fixed = replace_cygdrive(buffer);

-  if (getenv("DEBUG_FIXPATH") != NULL) 
{

+  if (debug_fixpath) {

     fprintf(stderr, "fixpath converted 
to @-file %s is: %s\n", name, fixed);

   }

   fwrite(fixed, strlen(fixed), 1, 
atout);

@@ -363,27 +387,34 @@

     BOOL processInheritHandles = TRUE;

     BOOL waitForChild = TRUE;

 

-    if (argc<2 || argv[1][0] != '-' || 
(argv[1][1] != 'c' && argv[1][1] != 
'm')) {

-        fprintf(stderr, "Usage: 
fixpath -c|m<path@path@...> [--detach] 
/cygdrive/c/WINDOWS/notepad.exe 
[/cygdrive/c/x/test.txt|@/cygdrive/c/x/atfile]\n");

+     debug_fixpath = 
(getenv("DEBUG_FIXPATH") != NULL);

+

+    if (argc<2 || argv[1][0] != '-' || 
(argv[1][1] != 'c' && argv[1][1] != 'm' 
&& argv[1][1] != 'w')) {

+        fprintf(stderr, "Usage: 
fixpath -c|m|w<path@path@...> 
[--detach] 
/cygdrive/c/WINDOWS/notepad.exe 
[/cygdrive/c/x/test.txt|@/cygdrive/c/x/atfile]\n");

         exit(0);

     }

 

-    if (getenv("DEBUG_FIXPATH") != 
NULL) {

+    if (debug_fixpath) {

       char const * cmdline = 
GetCommandLine();

       fprintf(stderr, "fixpath input 
line >%s<\n", strstr(cmdline, 
argv[1]));

     }

 

     if (argv[1][1] == 'c' && 
argv[1][2] == '\0') {

-      if (getenv("DEBUG_FIXPATH") != 
NULL) {

+      if (debug_fixpath) {

         fprintf(stderr, "fixpath using 
cygwin mode\n");

       }

       replace_cygdrive = 
replace_cygdrive_cygwin;

     } else if (argv[1][1] == 'm') {

-      if (getenv("DEBUG_FIXPATH") != 
NULL) {

+      if (debug_fixpath) {

         fprintf(stderr, "fixpath using 
msys mode, with path list: %s\n", 
&argv[1][2]);

       }

       setup_msys_path_list(argv[1]);

       replace_cygdrive = 
replace_cygdrive_msys;

+     } else if (argv[1][1] == 'w') {

+      if (debug_fixpath) {

+        fprintf(stderr, "fixpath using 
wsl mode, with path list: %s\n", 
&argv[1][2]);

+      }

+      replace_cygdrive = 
replace_cygdrive_wsl;

     } else {

       fprintf(stderr, "fixpath Unknown 
mode: %s\n", argv[1]);

       exit(-1);

@@ -391,7 +422,7 @@

 

     if (argv[2][0] == '-') {

       if (strcmp(argv[2], "--detach") 
== 0) {

-        if (getenv("DEBUG_FIXPATH") != 
NULL) {

+        if (debug_fixpath) {

           fprintf(stderr, "fixpath in 
detached mode\n");

         }

         processFlags |= 
DETACHED_PROCESS;

@@ -417,7 +448,7 @@

         var[var_len - 1] = '\0';

         strupr(var);

 

-        if (getenv("DEBUG_FIXPATH") != 
NULL) {

+        if (debug_fixpath) {

           fprintf(stderr, "fixpath 
setting var >%s< to >%s<\n", var, val);

         }

 

@@ -480,12 +511,12 @@

     }

     *current = '\0';

 

-    if (getenv("DEBUG_FIXPATH") != 
NULL) {

+    if (debug_fixpath) {

       fprintf(stderr, "fixpath 
converted line >%s<\n", line);

     }

 

     if (cmd == argc) {

-       if (getenv("DEBUG_FIXPATH") != 
NULL) {

+       if (debug_fixpath) {

          fprintf(stderr, "fixpath no 
command provided!\n");

        }

        exit(0);

@@ -518,7 +549,7 @@

       WaitForSingleObject(pi.hProcess, 
INFINITE);

       GetExitCodeProcess(pi.hProcess, 
&exitCode);

 

-      if (getenv("DEBUG_FIXPATH") != 
NULL) {

+      if (debug_fixpath) {

         for (i=0; 
i<num_files_to_delete; ++i) {

           fprintf(stderr, "fixpath Not 
deleting temporary file %s\n",

                   files_to_delete[i]);

@@ -530,13 +561,13 @@

       }

 

       if (exitCode != 0) {

-        if (getenv("DEBUG_FIXPATH") != 
NULL) {

+        if (debug_fixpath) {

           fprintf(stderr, "fixpath 
exit code %d\n",

                   exitCode);

         }

       }

     } else {

-      if (getenv("DEBUG_FIXPATH") != 
NULL) {

+      if (debug_fixpath) {

         fprintf(stderr, "fixpath Not 
waiting for child process");

       }

     }

Reply via email to