[PATCH] Support for building using WSL (Windows Subsystem for Linux) on Windows

Andrew Luo andrewluotechnologies at outlook.com
Thu Dec 13 07:48:26 UTC 2018


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.bursie at oracle.com> 
Sent: Wednesday, December 12, 2018 10:54 AM
To: Erik Joelsson <erik.joelsson at oracle.com>; Andrew Luo <andrewluotechnologies at outlook.com>; build-dev at 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.bursie at oracle.com>
>> Sent: Tuesday, December 11, 2018 6:18 AM
>> To: Andrew Luo <andrewluotechnologies at outlook.com>; Erik Joelsson 
>> <erik.joelsson at oracle.com>; build-dev at 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.joelsson at oracle.com>
>>>> Sent: Monday, December 10, 2018 9:19 AM
>>>> To: Magnus Ihse Bursie <magnus.ihse.bursie at oracle.com>; Andrew Luo 
>>>> <andrewluotechnologies at outlook.com>; build-dev at 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
>>>>>>

-------------- next part --------------
ÿþd i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / I m a g e s . g m k 
 
 - - -   a / m a k e / I m a g e s . g m k 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / I m a g e s . g m k 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 9 9 , 7   + 9 9 , 7   @ @ 
 
   	 ) 
 
                   i f e q   ( $ ( B U I L D _ C D S _ A R C H I V E ) ,   t r u e ) 
 
   	     $ ( c a l l   L o g W a r n ,   C r e a t i n g   C D S   a r c h i v e   f o r   j d k   i m a g e ) 
 
 - 	     $ ( J D K _ I M A G E _ D I R ) / b i n / j a v a   - X s h a r e : d u m p   - X m x 1 2 8 M   - X m s 1 2 8 M   $ ( L O G _ I N F O ) 
 
 + 	     $ ( J D K _ I M A G E _ D I R ) / b i n / j a v a $ ( E X E _ S U F F I X )   - X s h a r e : d u m p   - X m x 1 2 8 M   - X m s 1 2 8 M   $ ( L O G _ I N F O ) 
 
                   e n d i f 
 
   	 $ ( T O U C H )   $ @ 
 
   
 
 @ @   - 1 1 4 , 7   + 1 1 4 , 7   @ @ 
 
   	 ) 
 
                   i f e q   ( $ ( B U I L D _ C D S _ A R C H I V E ) ,   t r u e ) 
 
   	     $ ( c a l l   L o g W a r n ,   C r e a t i n g   C D S   a r c h i v e   f o r   j r e   i m a g e ) 
 
 - 	     $ ( J R E _ I M A G E _ D I R ) / b i n / j a v a   - X s h a r e : d u m p   - X m x 1 2 8 M   - X m s 1 2 8 M   $ ( L O G _ I N F O ) 
 
 + 	     $ ( J R E _ I M A G E _ D I R ) / b i n / j a v a $ ( E X E _ S U F F I X )   - X s h a r e : d u m p   - X m x 1 2 8 M   - X m s 1 2 8 M   $ ( L O G _ I N F O ) 
 
                   e n d i f 
 
   	 $ ( T O U C H )   $ @ 
 
   
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / a u t o c o n f / b a s i c s . m 4 
 
 - - -   a / m a k e / a u t o c o n f / b a s i c s . m 4 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / a u t o c o n f / b a s i c s . m 4 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 2 2 3 , 6   + 2 2 3 , 8   @ @ 
 
               B A S I C _ F I X U P _ P A T H _ C Y G W I N ( $ 1 ) 
 
           e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . m s y s " ;   t h e n 
 
               B A S I C _ F I X U P _ P A T H _ M S Y S ( $ 1 ) 
 
 +         e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . w s l " ;   t h e n 
 
 +             B A S I C _ F I X U P _ P A T H _ W S L ( $ 1 ) 
 
           e l s e 
 
               #   W e ' r e   o n   a   u n i x   p l a t f o r m .   H o o r a y !   : ) 
 
               p a t h = " [ $ ] $ 1 " 
 
 @ @   - 2 7 0 , 6   + 2 7 2 , 8   @ @ 
 
               B A S I C _ F I X U P _ E X E C U T A B L E _ C Y G W I N ( $ 1 ) 
 
           e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . m s y s " ;   t h e n 
 
               B A S I C _ F I X U P _ E X E C U T A B L E _ M S Y S ( $ 1 ) 
 
 +         e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . w s l " ;   t h e n 
 
 +             B A S I C _ F I X U P _ E X E C U T A B L E _ W S L ( $ 1 ) 
 
           e l s e 
 
               #   W e ' r e   o n   a   u n i x   p l a t f o r m .   H o o r a y !   : ) 
 
               #   F i r s t   s e p a r a t e   t h e   p a t h   f r o m   t h e   a r g u m e n t s .   T h i s   w i l l   s p l i t   a t   t h e   f i r s t 
 
 @ @   - 3 0 9 , 7   + 3 1 3 , 7   @ @ 
 
   
 
           #   N o w   j o i n   t o g e t h e r   t h e   p a t h   a n d   t h e   a r g u m e n t s   o n c e   a g a i n 
 
           i f   t e s t   " x $ a r g u m e n t s "   ! =   x E O L ;   t h e n 
 
 -             n e w _ c o m p l e t e = " $ n e w _ p a t h   $ { a r g u m e n t s %   * } " 
 
 +             n e w _ c o m p l e t e = ` e c h o   " $ n e w _ p a t h   $ { a r g u m e n t s %   * } "   |   s e d   ' s /   $ / / ' ` 
 
           e l s e 
 
               n e w _ c o m p l e t e = " $ n e w _ p a t h " 
 
           f i 
 
 @ @   - 6 0 7 , 6   + 6 1 1 , 7   @ @ 
 
   
 
       #   T h e s e   a r e   n o t   r e q u i r e d   o n   a l l   p l a t f o r m s 
 
       B A S I C _ P A T H _ P R O G S ( C Y G P A T H ,   c y g p a t h ) 
 
 +     B A S I C _ P A T H _ P R O G S ( W S L P A T H ,   w s l p a t h ) 
 
       B A S I C _ P A T H _ P R O G S ( D F ,   d f ) 
 
       B A S I C _ P A T H _ P R O G S ( C P I O ,   [ c p i o   b s d c p i o ] ) 
 
       B A S I C _ P A T H _ P R O G S ( N I C E ,   n i c e ) 
 
 @ @   - 6 3 4 , 8   + 6 3 9 , 1 0   @ @ 
 
           B A S I C _ C H E C K _ P A T H S _ W I N D O W S 
 
       e l s e 
 
           P A T H _ S E P = " : " 
 
 + 	 E X E C U T A B L E _ S U F F I X = " " 
 
       f i 
 
       A C _ S U B S T ( P A T H _ S E P ) 
 
 +     A C _ S U B S T ( E X E C U T A B L E _ S U F F I X ) 
 
   
 
       #   W e   g e t   t h e   t o p - l e v e l   d i r e c t o r y   f r o m   t h e   s u p p o r t i n g   w r a p p e r s . 
 
       A C _ M S G _ C H E C K I N G ( [ f o r   t o p - l e v e l   d i r e c t o r y ] ) 
 
 @ @   - 9 8 0 , 6   + 9 8 7 , 8   @ @ 
 
                           M A K E _ E X P E C T E D _ E N V = ' c y g w i n ' 
 
                       e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . m s y s " ;   t h e n 
 
                           M A K E _ E X P E C T E D _ E N V = ' m s y s ' 
 
 +                     e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . w s l " ;   t h e n 
 
 +                         M A K E _ E X P E C T E D _ E N V = ' x 8 6 _ 6 4 - p c - l i n u x - g n u ' 
 
                       e l s e 
 
                           A C _ M S G _ E R R O R ( [ U n k n o w n   W i n d o w s   e n v i r o n m e n t ] ) 
 
                       f i 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / a u t o c o n f / b a s i c s _ w i n d o w s . m 4 
 
 - - -   a / m a k e / a u t o c o n f / b a s i c s _ w i n d o w s . m 4 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / a u t o c o n f / b a s i c s _ w i n d o w s . m 4 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 3 2 , 6   + 3 2 , 1 2   @ @ 
 
       e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . m s y s " ;   t h e n 
 
           u n i x _ p a t h = ` $ E C H O   " $ w i n d o w s _ p a t h "   |   $ S E D   - e   ' s , ^ \ \ ( . \ \ ) : , / \ \ 1 , g '   - e   ' s , \ \ \ \ , / , g ' ` 
 
           $ 1 = " $ u n i x _ p a t h " 
 
 +     e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . w s l " ;   t h e n 
 
 +         t e s t _ u n i x _ p a t h = ` $ E C H O   $ w i n d o w s _ p a t h   |   $ G R E P   ^ / ` 
 
 +         i f   t e s t   " x $ t e s t _ u n i x _ p a t h "   =   x ;   t h e n 
 
 +             u n i x _ p a t h = ` $ W S L P A T H   - u   " $ w i n d o w s _ p a t h " ` 
 
 +             $ 1 = " $ u n i x _ p a t h " 
 
 +         f i 
 
       f i 
 
   ] ) 
 
   
 
 @ @   - 4 4 , 6   + 5 0 , 9   @ @ 
 
       e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . m s y s " ;   t h e n 
 
           w i n d o w s _ p a t h = ` c m d   / / c   e c h o   $ u n i x _ p a t h ` 
 
           $ 1 = " $ w i n d o w s _ p a t h " 
 
 +     e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . w s l " ;   t h e n 
 
 +         w i n d o w s _ p a t h = ` $ W S L P A T H   - m   " $ u n i x _ p a t h " ` 
 
 +         $ 1 = " $ w i n d o w s _ p a t h " 
 
       f i 
 
   ] ) 
 
   
 
 @ @   - 8 6 , 7   + 9 5 , 7   @ @ 
 
   #   H e l p e r   f u n c t i o n   w h i c h   p o s s i b l y   c o n v e r t s   a   p a t h   u s i n g   D O S - s t y l e   s h o r t   m o d e . 
 
   #   I f   s o ,   t h e   u p d a t e d   p a t h   i s   s t o r e d   i n   $ n e w _ p a t h . 
 
   #   $ 1 :   T h e   p a t h   t o   c h e c k 
 
 - A C _ D E F U N ( [ B A S I C _ M A K E _ W I N D O W S _ S P A C E _ S A F E _ M S Y S ] , 
 
 + A C _ D E F U N ( [ B A S I C _ M A K E _ W I N D O W S _ S P A C E _ S A F E _ S H O R T _ P A T H ] , 
 
   [ 
 
       i n p u t _ p a t h = " $ 1 " 
 
       #   C h e c k   i f   w e   n e e d   t o   c o n v e r t   t h i s   u s i n g   D O S - s t y l e   s h o r t   m o d e .   I f   t h e   p a t h 
 
 @ @   - 9 6 , 7   + 1 0 5 , 9   @ @ 
 
       h a s _ f o r b i d d e n _ c h a r s = ` $ E C H O   " $ i n p u t _ p a t h "   |   $ G R E P   @ < : @ ^ - _ / : a - z A - Z 0 - 9 @ : > @ ` 
 
       i f   t e s t   " x $ h a s _ f o r b i d d e n _ c h a r s "   ! =   x ;   t h e n 
 
           #   N o w   c o n v e r t   i t   t o   m i x e d   D O S - s t y l e ,   s h o r t   m o d e   ( n o   s p a c e s ,   a n d   /   i n s t e a d   o f   \ ) 
 
 -         n e w _ p a t h = ` c m d   / c   " f o r   % A   i n   ( \ " $ i n p u t _ p a t h \ " )   d o   @ e c h o   % ~ s A " | $ T R   \ \ \ \ \ \ \ \   /   |   $ T R   ' A B C D E F G H I J K L M N O P Q R S T U V W X Y Z '   ' a b c d e f g h i j k l m n o p q r s t u v w x y z ' ` 
 
 +         s h o r t _ p a t h _ s c r i p t = " $ T O P D I R / m a k e / s c r i p t s / w i n d o w s S h o r t N a m e . b a t " 
 
 +         B A S I C _ W I N D O W S _ R E W R I T E _ A S _ W I N D O W S _ M I X E D _ P A T H ( s h o r t _ p a t h _ s c r i p t ) 
 
 +         n e w _ p a t h = ` c m d $ E X E C U T A B L E _ S U F F I X   / c   " $ s h o r t _ p a t h _ s c r i p t "   " $ i n p u t _ p a t h "   |   $ T R   - d   ' \ r \ n '   |   $ T R   \ \ \ \ \ \ \ \   / ` 
 
       f i 
 
   ] ) 
 
   
 
 @ @   - 1 4 6 , 7   + 1 5 7 , 7   @ @ 
 
           n e w _ p a t h = ` c m d   / / c   e c h o   $ p a t h ` 
 
       f i 
 
   
 
 -     B A S I C _ M A K E _ W I N D O W S _ S P A C E _ S A F E _ M S Y S ( [ $ n e w _ p a t h ] ) 
 
 +     B A S I C _ M A K E _ W I N D O W S _ S P A C E _ S A F E _ S H O R T _ P A T H ( [ $ n e w _ p a t h ] ) 
 
       B A S I C _ W I N D O W S _ R E W R I T E _ A S _ U N I X _ P A T H ( n e w _ p a t h ) 
 
       i f   t e s t   " x $ p a t h "   ! =   " x $ n e w _ p a t h " ;   t h e n 
 
           $ 1 = " $ n e w _ p a t h " 
 
 @ @   - 1 5 7 , 6   + 1 6 8 , 2 8   @ @ 
 
       a l l _ f i x p a t h _ p r e f i x e s = ( " $ { a l l _ f i x p a t h _ p r e f i x e s @ < : @ @ @ : > @ } "   " $ { n e w _ p a t h : 0 : 1 0 } " ) 
 
   ] ) 
 
   
 
 + A C _ D E F U N ( [ B A S I C _ F I X U P _ P A T H _ W S L ] , 
 
 + [ 
 
 +     p a t h = " [ $ ] $ 1 " 
 
 +     n e w _ p a t h = " $ p a t h " 
 
 + 
 
 +     #   R e w r i t e   / m n t / . /   ( p a t h s   b e g i n n i n g   w i t h   / m n t / c / ,   / m n t / d / ,   e t c . ) 
 
 +     t e s t _ w s l _ m n t _ w i n d o w s _ p a t h = ` $ E C H O   $ p a t h   |   $ G R E P   ^ / m n t / . / ` 
 
 + 
 
 +     #   R e w r i t e   . : \   ( p a t h s   b e g i n n i n g   w i t h   C : \ ,   D : \ ,   e t c . ) 
 
 +     t e s t _ w i n d o w s _ p a t h = ` $ E C H O   $ p a t h   |   $ G R E P   ' ^ . : \ \ \ \ ' ` 
 
 +     
 
 +     i f   t e s t   " x $ t e s t _ w s l _ m n t _ w i n d o w s _ p a t h $ t e s t _ w i n d o w s _ p a t h "   ! =   x ;   t h e n 
 
 +         B A S I C _ W I N D O W S _ R E W R I T E _ A S _ W I N D O W S _ M I X E D _ P A T H ( n e w _ p a t h ) 
 
 +         B A S I C _ M A K E _ W I N D O W S _ S P A C E _ S A F E _ S H O R T _ P A T H ( [ $ n e w _ p a t h ] ) 
 
 +         B A S I C _ W I N D O W S _ R E W R I T E _ A S _ U N I X _ P A T H ( n e w _ p a t h ) 
 
 +         i f   t e s t   " x $ p a t h "   ! =   " x $ n e w _ p a t h " ;   t h e n 
 
 +             $ 1 = " $ n e w _ p a t h " 
 
 +             A C _ M S G _ N O T I C E ( [ R e w r i t i n g   $ 1   t o   " $ n e w _ p a t h " ] ) 
 
 +         f i 
 
 +     f i 
 
 + ] ) 
 
 + 
 
   A C _ D E F U N ( [ B A S I C _ F I X U P _ E X E C U T A B L E _ C Y G W I N ] , 
 
   [ 
 
       #   F i r s t   s e p a r a t e   t h e   p a t h   f r o m   t h e   a r g u m e n t s .   T h i s   w i l l   s p l i t   a t   t h e   f i r s t 
 
 @ @   - 2 9 4 , 7   + 3 2 7 , 7   @ @ 
 
       e l s e 
 
           #   N o t   i n   m i x e d   o r   W i n d o w s   s t y l e ,   s t a r t   b y   t h a t . 
 
           n e w _ p a t h = ` c m d   / / c   e c h o   $ n e w _ p a t h ` 
 
 -         B A S I C _ M A K E _ W I N D O W S _ S P A C E _ S A F E _ M S Y S ( [ $ n e w _ p a t h ] ) 
 
 +         B A S I C _ M A K E _ W I N D O W S _ S P A C E _ S A F E _ S H O R T _ P A T H ( [ $ n e w _ p a t h ] ) 
 
           #   O u t p u t   i s   i n   $ n e w _ p a t h 
 
           B A S I C _ W I N D O W S _ R E W R I T E _ A S _ U N I X _ P A T H ( n e w _ p a t h ) 
 
           #   r e m o v e   t r a i l i n g   . e x e   i f   a n y 
 
 @ @   - 3 0 5 , 6   + 3 3 8 , 1 1   @ @ 
 
       f i 
 
   ] ) 
 
   
 
 + A C _ D E F U N ( [ B A S I C _ F I X U P _ E X E C U T A B L E _ W S L ] , 
 
 + [ 
 
 +     B A S I C _ F I X U P _ P A T H _ W S L ( $ 1 ) 
 
 + ] ) 
 
 + 
 
   #   S e t u p   b a s i c   c o n f i g u r a t i o n   p a t h s ,   a n d   p l a t f o r m - s p e c i f i c   s t u f f   r e l a t e d   t o   P A T H s . 
 
   A C _ D E F U N ( [ B A S I C _ C H E C K _ P A T H S _ W I N D O W S ] , 
 
   [ 
 
 @ @   - 3 3 9 , 6   + 3 7 7 , 7   @ @ 
 
           i f   t e s t   " x $ t e s t _ c y g d r i v e _ p r e f i x "   =   x ;   t h e n 
 
               A C _ M S G _ E R R O R ( [ Y o u r   c y g d r i v e   p r e f i x   i s   n o t   / c y g d r i v e .   T h i s   i s   c u r r e n t l y   n o t   s u p p o r t e d .   C h a n g e   w i t h   m o u n t   - c . ] ) 
 
           f i 
 
 +         E X E C U T A B L E _ S U F F I X = " " 
 
       e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . m s y s " ;   t h e n 
 
           A C _ M S G _ C H E C K I N G ( [ m s y s   r e l e a s e ] ) 
 
           M S Y S _ V E R S I O N = ` $ U N A M E   - r ` 
 
 @ @   - 3 5 3 , 8   + 3 9 2 , 1 1   @ @ 
 
           B A S I C _ W I N D O W S _ R E W R I T E _ A S _ U N I X _ P A T H ( M S Y S _ R O O T _ P A T H ) 
 
           A C _ M S G _ R E S U L T ( [ $ M S Y S _ R O O T _ P A T H ] ) 
 
           W I N D O W S _ E N V _ R O O T _ P A T H = " $ M S Y S _ R O O T _ P A T H " 
 
 +         E X E C U T A B L E _ S U F F I X = " " 
 
 +     e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . w s l " ;   t h e n 
 
 +         E X E C U T A B L E _ S U F F I X = " . e x e " 
 
       e l s e 
 
 -         A C _ M S G _ E R R O R ( [ U n k n o w n   W i n d o w s   e n v i r o n m e n t .   N e i t h e r   c y g w i n   n o r   m s y s   w a s   d e t e c t e d . ] ) 
 
 +         A C _ M S G _ E R R O R ( [ U n k n o w n   W i n d o w s   e n v i r o n m e n t .   N e i t h e r   c y g w i n ,   m s y s ,   n o r   w s l   w a s   d e t e c t e d . ] ) 
 
       f i 
 
   
 
       #   T e s t   i f   w i n d o w s   o r   u n i x   ( c y g w i n / m s y s )   f i n d   i s   f i r s t   i n   p a t h . 
 
 @ @   - 3 9 5 , 6   + 4 3 7 , 8   @ @ 
 
                       |   t r   '   '   ' \ n '   |   $ G R E P   ' ^ / . / '   |   $ S O R T   |   $ U N I Q ` 
 
               f i x p a t h _ a r g u m e n t _ l i s t = ` e c h o   $ a l l _ u n i q u e _ p r e f i x e s     |   t r   '   '   ' @ ' ` 
 
               F I X P A T H = " $ F I X P A T H _ B I N   - m $ f i x p a t h _ a r g u m e n t _ l i s t " 
 
 +         e l i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   x w i n d o w s . w s l ;   t h e n 
 
 +             F I X P A T H = " $ F I X P A T H _ B I N   - w " 
 
           f i 
 
           F I X P A T H _ S R C _ W = " $ F I X P A T H _ S R C " 
 
           F I X P A T H _ B I N _ W = " $ F I X P A T H _ B I N " 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / a u t o c o n f / b o o t - j d k . m 4 
 
 - - -   a / m a k e / a u t o c o n f / b o o t - j d k . m 4 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / a u t o c o n f / b o o t - j d k . m 4 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 6 3 , 1 8   + 6 3 , 1 8   @ @ 
 
           #   I f   p r e v i o u s   s t e p   c l a i m e d   t o   h a v e   f o u n d   a   J D K ,   c h e c k   i t   t o   s e e   i f   i t   s e e m s   t o   b e   v a l i d . 
 
           i f   t e s t   " x $ B O O T _ J D K _ F O U N D "   =   x m a y b e ;   t h e n 
 
               #   D o   w e   h a v e   a   b i n / j a v a ? 
 
 -             i f   t e s t   !   - x   " $ B O O T _ J D K / b i n / j a v a " ;   t h e n 
 
 +             i f   t e s t   !   - x   " $ B O O T _ J D K / b i n / j a v a $ E X E C U T A B L E _ S U F F I X " ;   t h e n 
 
                   A C _ M S G _ N O T I C E ( [ P o t e n t i a l   B o o t   J D K   f o u n d   a t   $ B O O T _ J D K   d i d   n o t   c o n t a i n   b i n / j a v a ;   i g n o r i n g ] ) 
 
                   B O O T _ J D K _ F O U N D = n o 
 
               e l s e 
 
                   #   D o   w e   h a v e   a   b i n / j a v a c ? 
 
 -                 i f   t e s t   !   - x   " $ B O O T _ J D K / b i n / j a v a c " ;   t h e n 
 
 +                 i f   t e s t   !   - x   " $ B O O T _ J D K / b i n / j a v a c $ E X E C U T A B L E _ S U F F I X " ;   t h e n 
 
                       A C _ M S G _ N O T I C E ( [ P o t e n t i a l   B o o t   J D K   f o u n d   a t   $ B O O T _ J D K   d i d   n o t   c o n t a i n   b i n / j a v a c ;   i g n o r i n g ] ) 
 
                       A C _ M S G _ N O T I C E ( [ ( T h i s   m i g h t   b e   a n   J R E   i n s t e a d   o f   a n   J D K ) ] ) 
 
                       B O O T _ J D K _ F O U N D = n o 
 
                   e l s e 
 
                       #   O h ,   t h i s   i s   l o o k i n g   g o o d !   W e   p r o b a b l y   h a v e   f o u n d   a   p r o p e r   J D K .   I s   i t   t h e   c o r r e c t   v e r s i o n ? 
 
 -                     B O O T _ J D K _ V E R S I O N = ` " $ B O O T _ J D K / b i n / j a v a "   $ U S E R _ B O O T _ J D K _ O P T I O N S   - v e r s i o n   2 > & 1   |   $ H E A D   - n   1 ` 
 
 +                     B O O T _ J D K _ V E R S I O N = ` " $ B O O T _ J D K / b i n / j a v a $ E X E C U T A B L E _ S U F F I X "   $ U S E R _ B O O T _ J D K _ O P T I O N S   - v e r s i o n   2 > & 1   |   $ H E A D   - n   1 ` 
 
                       i f   [   [ [   " $ B O O T _ J D K _ V E R S I O N "   = ~   " P i c k e d   u p "   ] ]   ] ;   t h e n 
 
                           A C _ M S G _ N O T I C E ( [ Y o u   h a v e   _ J A V A _ O P T I O N S   o r   J A V A _ T O O L _ O P T I O N S   s e t .   T h i s   c a n   m e s s   u p   t h e   b u i l d .   P l e a s e   u s e   - - w i t h - b o o t - j d k - j v m a r g s   i n s t e a d . ] ) 
 
                           A C _ M S G _ N O T I C E ( [ J a v a   r e p o r t s :   " $ B O O T _ J D K _ V E R S I O N " . ] ) 
 
 @ @   - 1 0 1 , 7   + 1 0 1 , 7   @ @ 
 
                           A C _ M S G _ C H E C K I N G ( [ f o r   B o o t   J D K ] ) 
 
                           A C _ M S G _ R E S U L T ( [ $ B O O T _ J D K ] ) 
 
                           A C _ M S G _ C H E C K I N G ( [ B o o t   J D K   v e r s i o n ] ) 
 
 -                         B O O T _ J D K _ V E R S I O N = ` " $ B O O T _ J D K / b i n / j a v a "   $ U S E R _ B O O T _ J D K _ O P T I O N S   - v e r s i o n   2 > & 1   |   $ T R   ' \ n \ r '   '     ' ` 
 
 +                         B O O T _ J D K _ V E R S I O N = ` " $ B O O T _ J D K / b i n / j a v a $ E X E C U T A B L E _ S U F F I X "   $ U S E R _ B O O T _ J D K _ O P T I O N S   - v e r s i o n   2 > & 1   |   $ T R   ' \ n \ r '   '     ' ` 
 
                           A C _ M S G _ R E S U L T ( [ $ B O O T _ J D K _ V E R S I O N ] ) 
 
                       f i   #   e n d   c h e c k   j d k   v e r s i o n 
 
                   f i   #   e n d   c h e c k   j a v a c 
 
 @ @   - 3 3 5 , 1 1   + 3 3 5 , 1 1   @ @ 
 
       A C _ S U B S T ( B O O T _ J D K ) 
 
   
 
       #   S e t u p   t o o l s   f r o m   t h e   B o o t   J D K . 
 
 -     B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A ,   j a v a ) 
 
 -     B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A C ,   j a v a c ) 
 
 -     B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A D O C ,   j a v a d o c ) 
 
 -     B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A R ,   j a r ) 
 
 -     B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A R S I G N E R ,   j a r s i g n e r ) 
 
 +     B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A ,   j a v a $ E X E C U T A B L E _ S U F F I X ) 
 
 +     B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A C ,   j a v a c $ E X E C U T A B L E _ S U F F I X ) 
 
 +     B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A V A D O C ,   j a v a d o c $ E X E C U T A B L E _ S U F F I X ) 
 
 +     B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A R ,   j a r $ E X E C U T A B L E _ S U F F I X ) 
 
 +     B O O T J D K _ C H E C K _ T O O L _ I N _ B O O T J D K ( J A R S I G N E R ,   j a r s i g n e r $ E X E C U T A B L E _ S U F F I X ) 
 
   
 
       #   F i n a l l y ,   s e t   s o m e   o t h e r   o p t i o n s . . . 
 
   
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / a u t o c o n f / b u i l d - a u x / c o n f i g . g u e s s 
 
 - - -   a / m a k e / a u t o c o n f / b u i l d - a u x / c o n f i g . g u e s s 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / a u t o c o n f / b u i l d - a u x / c o n f i g . g u e s s 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 6 0 , 6   + 6 0 , 1 5   @ @ 
 
       e s a c 
 
   f i 
 
   
 
 + #   T e s t   a n d   f i x   w s l 
 
 + e c h o   $ O U T   |   g r e p   x 8 6 _ 6 4 - u n k n o w n - l i n u x - g n u   >   / d e v / n u l l   2 >   / d e v / n u l l 
 
 + i f   t e s t   $ ?   =   0 ;   t h e n 
 
 +     u n a m e   - r   |   g r e p   M i c r o s o f t   >   / d e v / n u l l   2 >   / d e v / n u l l 
 
 +     i f   t e s t   $ ?   =   0 ;   t h e n 
 
 +         O U T = " x 8 6 _ 6 4 - p c - w s l " 
 
 +     f i 
 
 + f i 
 
 + 
 
   #   T e s t   a n d   f i x   a r c h i t e c t u r e   s t r i n g   o n   A I X 
 
   #   O n   A I X   ' c o n f i g . g u e s s '   r e t u r n s   ' p o w e r p c '   a s   a r c h i t e c t u r e   b u t   ' p o w e r p c '   i s 
 
   #   i m p l i c i t e l y   h a n d l e d   a s   3 2 - b i t   a r c h i t e c t u r e   i n   ' p l a t f o r m . m 4 '   s o   w e   c h e c k 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / a u t o c o n f / b u i l d - a u x / c o n f i g . s u b 
 
 - - -   a / m a k e / a u t o c o n f / b u i l d - a u x / c o n f i g . s u b 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / a u t o c o n f / b u i l d - a u x / c o n f i g . s u b 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 2 9 , 7   + 2 9 , 1 3   @ @ 
 
   
 
   D I R = ` d i r n a m e   $ 0 ` 
 
   
 
 - #   F i r s t ,   f i l t e r   o u t   e v e r y t h i n g   t h a t   d o e s n ' t   b e g i n   w i t h   " a a r c h 6 4 - " 
 
 + #   A l l o w   w s l 
 
 + i f   e c h o   $ *   |   g r e p   x 8 6 _ 6 4 - p c - w s l   > / d e v / n u l l   ;   t h e n 
 
 +         e c h o   $ * 
 
 +         e x i t 
 
 + f i 
 
 + 
 
 + #   F i l t e r   o u t   e v e r y t h i n g   t h a t   d o e s n ' t   b e g i n   w i t h   " a a r c h 6 4 - " 
 
   i f   !   e c h o   $ *   |   g r e p   ' ^ a a r c h 6 4 - '   > / d e v / n u l l   ;   t h e n 
 
           .   $ D I R / a u t o c o n f - c o n f i g . s u b   " $ @ " 
 
           #   a u t o c o n f - c o n f i g . s u b   e x i t s ,   s o   w e   n e v e r   r e a c h   h e r e ,   b u t   j u s t   i n 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / a u t o c o n f / p l a t f o r m . m 4 
 
 - - -   a / m a k e / a u t o c o n f / p l a t f o r m . m 4 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / a u t o c o n f / p l a t f o r m . m 4 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 1 8 8 , 6   + 1 8 8 , 1 0   @ @ 
 
               V A R _ O S = w i n d o w s 
 
               V A R _ O S _ E N V = w i n d o w s . c y g w i n 
 
               ; ; 
 
 +         * w s l * ) 
 
 +             V A R _ O S = w i n d o w s 
 
 +             V A R _ O S _ E N V = w i n d o w s . w s l 
 
 +             ; ; 
 
           * m i n g w * ) 
 
               V A R _ O S = w i n d o w s 
 
               V A R _ O S _ E N V = w i n d o w s . m s y s 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / a u t o c o n f / t o o l c h a i n . m 4 
 
 - - -   a / m a k e / a u t o c o n f / t o o l c h a i n . m 4 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / a u t o c o n f / t o o l c h a i n . m 4 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 2 8 1 , 1 3   + 2 8 1 , 1 3   @ @ 
 
   
 
       T O O L C H A I N _ C C _ B I N A R Y _ c l a n g = " c l a n g " 
 
       T O O L C H A I N _ C C _ B I N A R Y _ g c c = " g c c " 
 
 -     T O O L C H A I N _ C C _ B I N A R Y _ m i c r o s o f t = " c l " 
 
 +     T O O L C H A I N _ C C _ B I N A R Y _ m i c r o s o f t = " c l $ E X E C U T A B L E _ S U F F I X " 
 
       T O O L C H A I N _ C C _ B I N A R Y _ s o l s t u d i o = " c c " 
 
       T O O L C H A I N _ C C _ B I N A R Y _ x l c = " x l c _ r " 
 
   
 
       T O O L C H A I N _ C X X _ B I N A R Y _ c l a n g = " c l a n g + + " 
 
       T O O L C H A I N _ C X X _ B I N A R Y _ g c c = " g + + " 
 
 -     T O O L C H A I N _ C X X _ B I N A R Y _ m i c r o s o f t = " c l " 
 
 +     T O O L C H A I N _ C X X _ B I N A R Y _ m i c r o s o f t = " c l $ E X E C U T A B L E _ S U F F I X " 
 
       T O O L C H A I N _ C X X _ B I N A R Y _ s o l s t u d i o = " C C " 
 
       T O O L C H A I N _ C X X _ B I N A R Y _ x l c = " x l C _ r " 
 
   
 
 @ @   - 4 3 0 , 7   + 4 3 0 , 7   @ @ 
 
           #   T h e r e   i s   n o   s p e c i f i c   v e r s i o n   f l a g ,   b u t   a l l   o u t p u t   s t a r t s   w i t h   a   v e r s i o n   s t r i n g . 
 
           #   F i r s t   l i n e   t y p i c a l l y   l o o k s   s o m e t h i n g   l i k e : 
 
           #   M i c r o s o f t   ( R )   3 2 - b i t   C / C + +   O p t i m i z i n g   C o m p i l e r   V e r s i o n   1 6 . 0 0 . 4 0 2 1 9 . 0 1   f o r   8 0 x 8 6 
 
 -         C O M P I L E R _ V E R S I O N _ O U T P U T = ` $ C O M P I L E R   2 > & 1   |   $ H E A D   - n   1   |   $ T R   - d   ' \ r ' ` 
 
 +         C O M P I L E R _ V E R S I O N _ O U T P U T = ` " $ C O M P I L E R "   2 > & 1   |   $ H E A D   - n   1   |   $ T R   - d   ' \ r ' ` 
 
           #   C h e c k   t h a t   t h i s   i s   l i k e l y   t o   b e   M i c r o s o f t   C L . E X E . 
 
           $ E C H O   " $ C O M P I L E R _ V E R S I O N _ O U T P U T "   |   $ G R E P   " M i c r o s o f t . * C o m p i l e r "   >   / d e v / n u l l 
 
           i f   t e s t   $ ?   - n e   0 ;   t h e n 
 
 @ @   - 6 9 8 , 7   + 6 9 8 , 7   @ @ 
 
           #   I n   t h e   M i c r o s o f t   t o o l c h a i n   w e   h a v e   a   s e p a r a t e   L D   c o m m a n d   " l i n k " . 
 
           #   M a k e   s u r e   w e   r e j e c t   / u s r / b i n / l i n k   ( a s   d e t e r m i n e d   i n   C Y G W I N _ L I N K ) ,   w h i c h   i s 
 
           #   a   c y g w i n   p r o g r a m   f o r   s o m e t h i n g   c o m p l e t e l y   d i f f e r e n t . 
 
 -         A C _ C H E C K _ P R O G ( [ L D ] ,   [ l i n k ] , [ l i n k ] , , ,   [ $ C Y G W I N _ L I N K ] ) 
 
 +         A C _ C H E C K _ P R O G ( [ L D ] ,   [ l i n k $ E X E C U T A B L E _ S U F F I X ] , [ l i n k $ E X E C U T A B L E _ S U F F I X ] , , ,   [ $ C Y G W I N _ L I N K ] ) 
 
           B A S I C _ F I X U P _ E X E C U T A B L E ( L D ) 
 
           #   V e r i f y   t h a t   w e   i n d e e d   s u c c e e d e d   w i t h   t h i s   t r i c k . 
 
           A C _ M S G _ C H E C K I N G ( [ i f   t h e   f o u n d   l i n k . e x e   i s   a c t u a l l y   t h e   V i s u a l   S t u d i o   l i n k e r ] ) 
 
 @ @   - 7 5 0 , 7   + 7 5 0 , 7   @ @ 
 
       # 
 
       i f   t e s t   " x $ T O O L C H A I N _ T Y P E "   =   x m i c r o s o f t ;   t h e n 
 
           #   T h e   c o r r e s p o n d i n g   a r   t o o l   i s   l i b . e x e   ( u s e d   t o   c r e a t e   s t a t i c   l i b r a r i e s ) 
 
 -         A C _ C H E C K _ P R O G ( [ A R ] ,   [ l i b ] , [ l i b ] , , , ) 
 
 +         A C _ C H E C K _ P R O G ( [ A R ] ,   [ l i b $ E X E C U T A B L E _ S U F F I X ] , [ l i b $ E X E C U T A B L E _ S U F F I X ] , , , ) 
 
       e l i f   t e s t   " x $ T O O L C H A I N _ T Y P E "   =   x g c c ;   t h e n 
 
           B A S I C _ C H E C K _ T O O L S ( A R ,   a r   g c c - a r ) 
 
       e l s e 
 
 @ @   - 7 7 4 , 1 2   + 7 7 4 , 1 2   @ @ 
 
       f i 
 
   
 
       i f   t e s t   " x $ T O O L C H A I N _ T Y P E "   =   x m i c r o s o f t ;   t h e n 
 
 -         A C _ C H E C K _ P R O G ( [ M T ] ,   [ m t ] ,   [ m t ] , , ,   [ / u s r / b i n / m t ] ) 
 
 +         A C _ C H E C K _ P R O G ( [ M T ] ,   [ m t $ E X E C U T A B L E _ S U F F I X ] ,   [ m t $ E X E C U T A B L E _ S U F F I X ] , , ,   [ / u s r / b i n / m t ] ) 
 
           B A S I C _ F I X U P _ E X E C U T A B L E ( M T ) 
 
           #   S e t u p   t h e   r e s o u r c e   c o m p i l e r   ( R C ) 
 
 -         A C _ C H E C K _ P R O G ( [ R C ] ,   [ r c ] ,   [ r c ] , , ,   [ / u s r / b i n / r c ] ) 
 
 +         A C _ C H E C K _ P R O G ( [ R C ] ,   [ r c $ E X E C U T A B L E _ S U F F I X ] ,   [ r c $ E X E C U T A B L E _ S U F F I X ] , , ,   [ / u s r / b i n / r c ] ) 
 
           B A S I C _ F I X U P _ E X E C U T A B L E ( R C ) 
 
 -         A C _ C H E C K _ P R O G ( [ D U M P B I N ] ,   [ d u m p b i n ] ,   [ d u m p b i n ] , , , ) 
 
 +         A C _ C H E C K _ P R O G ( [ D U M P B I N ] ,   [ d u m p b i n $ E X E C U T A B L E _ S U F F I X ] ,   [ d u m p b i n $ E X E C U T A B L E _ S U F F I X ] , , , ) 
 
           B A S I C _ F I X U P _ E X E C U T A B L E ( D U M P B I N ) 
 
           #   W e   n e e d   t o   c h e c k   f o r   ' m s b u i l d . e x e '   b e c a u s e   a t   t h e   p l a c e   w h e r e   w e   e x p e c t   t o 
 
           #   f i n d   ' m s b u i l d . e x e '   t h e r e ' s   a l s o   a   d i r e c t o r y   c a l l e d   ' m s b u i l d '   a n d   c o n f i g u r e 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / a u t o c o n f / t o o l c h a i n _ w i n d o w s . m 4 
 
 - - -   a / m a k e / a u t o c o n f / t o o l c h a i n _ w i n d o w s . m 4 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / a u t o c o n f / t o o l c h a i n _ w i n d o w s . m 4 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 1 1 5 , 7   + 1 1 5 , 7   @ @ 
 
                   V C V A R S F I L E S = " v c / b i n / v c v a r s 3 2 . b a t   v c / a u x i l i a r y / b u i l d / v c v a r s 3 2 . b a t " 
 
               e l s e 
 
                   V C V A R S F I L E S = " v c / b i n / a m d 6 4 / v c v a r s 6 4 . b a t   v c / b i n / x 8 6 _ a m d 6 4 / v c v a r s x 8 6 _ a m d 6 4 . b a t   \ 
 
 -                         v c / a u x i l i a r y / b u i l d / v c v a r s x 8 6 _ a m d 6 4 . b a t   v c / a u x i l i a r y / b u i l d / v c v a r s 6 4 . b a t " 
 
 +                         V C / A u x i l i a r y / B u i l d / v c v a r s x 8 6 _ a m d 6 4 . b a t   V C / A u x i l i a r y / B u i l d / v c v a r s 6 4 . b a t " 
 
               f i 
 
   
 
               f o r   V C V A R S F I L E   i n   $ V C V A R S F I L E S ;   d o 
 
 @ @   - 2 2 2 , 7   + 2 2 2 , 6   @ @ 
 
               [ C : / P r o g r a m   F i l e s / $ V S _ I N S T A L L _ D I R ] ,   [ w e l l - k n o w n   n a m e ] ) 
 
       T O O L C H A I N _ C H E C K _ P O S S I B L E _ V I S U A L _ S T U D I O _ R O O T ( [ $ { V S _ V E R S I O N } ] , 
 
               [ C : / P r o g r a m   F i l e s   ( x 8 6 ) / $ V S _ I N S T A L L _ D I R ] ,   [ w e l l - k n o w n   n a m e ] ) 
 
 - 
 
       i f   t e s t   " x $ S D K _ I N S T A L L _ D I R "   ! =   x ;   t h e n 
 
           i f   t e s t   " x $ P r o g r a m W 6 4 3 2 "   ! =   x ;   t h e n 
 
               T O O L C H A I N _ C H E C K _ P O S S I B L E _ W I N _ S D K _ R O O T ( [ $ { V S _ V E R S I O N } ] , 
 
 @ @   - 3 7 2 , 8   + 3 7 1 , 1 3   @ @ 
 
               #   I n s t e a d   c r e a t e   a   s h e l l   s c r i p t   w h i c h   w i l l   s e t   t h e   r e l e v a n t   v a r i a b l e s   w h e n   r u n . 
 
               W I N P A T H _ V S _ E N V _ C M D = " $ V S _ E N V _ C M D " 
 
               B A S I C _ W I N D O W S _ R E W R I T E _ A S _ W I N D O W S _ M I X E D _ P A T H ( [ W I N P A T H _ V S _ E N V _ C M D ] ) 
 
 -             W I N P A T H _ B A S H = " $ B A S H " 
 
 -             B A S I C _ W I N D O W S _ R E W R I T E _ A S _ W I N D O W S _ M I X E D _ P A T H ( [ W I N P A T H _ B A S H ] ) 
 
 +             
 
 +             i f   t e s t   " x $ O P E N J D K _ B U I L D _ O S _ E N V "   =   " x w i n d o w s . w s l " ;   t h e n 
 
 +                 W I N P A T H _ B A S H = " b a s h " 
 
 +             e l s e 
 
 +                 W I N P A T H _ B A S H = " $ B A S H " 
 
 +                 B A S I C _ W I N D O W S _ R E W R I T E _ A S _ W I N D O W S _ M I X E D _ P A T H ( [ W I N P A T H _ B A S H ] ) 
 
 +             f i 
 
   
 
               #   G e n e r a t e   a   D O S   b a t c h   f i l e   w h i c h   r u n s   $ V S _ E N V _ C M D ,   a n d   t h e n   c r e a t e s   a   s h e l l 
 
               #   s c r i p t   ( e x e c u t a b l e   b y   b a s h )   t h a t   w i l l   s e t u p   t h e   i m p o r t a n t   v a r i a b l e s . 
 
 @ @   - 3 8 1 , 7   + 3 8 5 , 7   @ @ 
 
               $ E C H O   " @ e c h o   o f f "   >     $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
               #   T h i s   w i l l   e n d   u p   s o m e t h i n g   l i k e : 
 
               #   c a l l   C : / p r o g r a ~ 2 / m i c r o s ~ 2 . 0 / v c / b i n / a m d 6 4 / v c v a r s 6 4 . b a t 
 
 -             $ E C H O   " c a l l   $ W I N P A T H _ V S _ E N V _ C M D   $ V S _ E N V _ A R G S "   > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 +             $ E C H O   " c a l l   \ " $ W I N P A T H _ V S _ E N V _ C M D \ "   $ V S _ E N V _ A R G S "   > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
               #   I n   s o m e   c a s e s ,   t h e   V S _ E N V _ C M D   w i l l   c h a n g e   d i r e c t o r y ,   c h a n g e   b a c k   s o 
 
               #   t h e   s e t - v s - e n v . s h   e n d s   u p   i n   t h e   r i g h t   p l a c e . 
 
               $ E C H O   ' c d   % ~ d p 0 '   > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 @ @   - 3 8 9 , 2 8   + 3 9 3 , 2 8   @ @ 
 
               #   C : / C y g W i n / b i n / b a s h   - c   ' e c h o   V S _ P A T H = \ " $ P A T H \ "   >   l o c a l d e v e n v . s h 
 
               #   T h e   t r a i l i n g   s p a c e   f o r   e v e r y o n e   e x c e p t   P A T H   i s   n o   t y p o ,   b u t   i s   n e e d e d   d u e 
 
               #   t o   t r a i l i n g   \   i n   t h e   W i n d o w s   p a t h s .   T h e s e   w i l l   b e   s t r i p p e d   l a t e r . 
 
 -             $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   V S _ P A T H = " ' \ " $ P A T H \ "   >   s e t - v s - e n v . s h '   \ 
 
 +             $ E C H O   " $ W I N P A T H _ B A S H " '   - c   " e c h o   V S _ P A T H = \ \ \ " \ " $ P A T H \ " \ \ \ "   >   s e t - v s - e n v . s h " '   \ 
 
                       > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 -             $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   V S _ I N C L U D E = " ' \ " $ I N C L U D E \ ; $ i n c l u d e   \ "   > >   s e t - v s - e n v . s h '   \ 
 
 +             $ E C H O   " $ W I N P A T H _ B A S H " '   - c   " e c h o   V S _ I N C L U D E = \ \ \ " \ " $ I N C L U D E \ ; $ i n c l u d e   \ " \ \ \ "   > >   s e t - v s - e n v . s h " '   \ 
 
                       > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 -             $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   V S _ L I B = " ' \ " $ L I B \ ; $ l i b   \ "   > >   s e t - v s - e n v . s h '   \ 
 
 +             $ E C H O   " $ W I N P A T H _ B A S H " '   - c   " e c h o   V S _ L I B = \ \ \ " \ " $ L I B \ ; $ l i b   \ " \ \ \ "   > >   s e t - v s - e n v . s h " '   \ 
 
                       > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 -             $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   V C I N S T A L L D I R = " ' \ " $ V C I N S T A L L D I R   \ "   > >   s e t - v s - e n v . s h '   \ 
 
 +             $ E C H O   " $ W I N P A T H _ B A S H " '   - c   " e c h o   V C I N S T A L L D I R = \ \ \ " \ " $ V C I N S T A L L D I R   \ " \ \ \ "   > >   s e t - v s - e n v . s h " '   \ 
 
                       > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 -             $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   W i n d o w s S d k D i r = " ' \ " $ W i n d o w s S d k D i r   \ "   > >   s e t - v s - e n v . s h '   \ 
 
 +             $ E C H O   " $ W I N P A T H _ B A S H " '   - c   " e c h o   W i n d o w s S d k D i r = \ \ \ " \ " $ W i n d o w s S d k D i r   \ " \ \ \ "   > >   s e t - v s - e n v . s h " '   \ 
 
                       > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
 -             $ E C H O   " $ W I N P A T H _ B A S H   - c   ' e c h o   W I N D O W S S D K D I R = " ' \ " $ W I N D O W S S D K D I R   \ "   > >   s e t - v s - e n v . s h '   \ 
 
 +             $ E C H O   " $ W I N P A T H _ B A S H " '   - c   " e c h o   W I N D O W S S D K D I R = \ \ \ " \ " $ W I N D O W S S D K D I R   \ " \ \ \ "   > >   s e t - v s - e n v . s h " '   \ 
 
                       > >   $ E X T R A C T _ V C _ E N V _ B A T _ F I L E 
 
   
 
               #   N o w   e x e c u t e   t h e   n e w l y   c r e a t e d   b a t   f i l e . 
 
               #   T h e   |   c a t   i s   t o   s t o p   S e t E n v . C m d   t o   m e s s   w i t h   s y s t e m   c o l o r s   o n   m s y s . 
 
               #   C h a n g e   d i r e c t o r y   s o   w e   d o n ' t   n e e d   t o   m e s s   w i t h   W i n d o w s   p a t h s   i n   r e d i r e c t s . 
 
               c d   $ V S _ E N V _ T M P _ D I R 
 
 -             c m d   / c   e x t r a c t - v s - e n v . b a t   |   $ C A T 
 
 +             c m d $ E X E C U T A B L E _ S U F F I X   / c   e x t r a c t - v s - e n v . b a t   |   $ C A T 
 
               c d   $ C U R D I R 
 
   
 
               i f   t e s t   !   - s   $ V S _ E N V _ T M P _ D I R / s e t - v s - e n v . s h ;   t h e n 
 
 -                 A C _ M S G _ N O T I C E ( [ C o u l d   n o t   s u c c e s f u l l y   e x t r a c t   t h e   e n v i o n m e n t   v a r i a b l e s   n e e d e d   f o r   t h e   V S   s e t u p . ] ) 
 
 +                 A C _ M S G _ N O T I C E ( [ C o u l d   n o t   s u c c e s f u l l y   e x t r a c t   t h e   e n v i r o n m e n t   v a r i a b l e s   n e e d e d   f o r   t h e   V S   s e t u p . ] ) 
 
                   A C _ M S G _ N O T I C E ( [ T r y   s e t t i n g   - - w i t h - t o o l s - d i r   t o   t h e   V C / b i n   d i r e c t o r y   w i t h i n   t h e   V S   i n s t a l l a t i o n ] ) 
 
                   A C _ M S G _ N O T I C E ( [ o r   r u n   " b a s h . e x e   - l "   f r o m   a   V S   c o m m a n d   p r o m p t   a n d   t h e n   r u n   c o n f i g u r e   f r o m   t h e r e . ] ) 
 
                   A C _ M S G _ E R R O R ( [ C a n n o t   c o n t i n u e ] ) 
 
 @ @   - 6 0 0 , 1 0   + 6 0 4 , 1 0   @ @ 
 
               B A S I C _ W I N D O W S _ R E W R I T E _ A S _ U N I X _ P A T H ( C Y G W I N _ V S _ T O O L S _ D I R ) 
 
               i f   t e s t   " x $ O P E N J D K _ T A R G E T _ C P U _ B I T S "   =   x 6 4 ;   t h e n 
 
                   P O S S I B L E _ M S V C _ D L L = ` $ F I N D   " $ C Y G W I N _ V S _ T O O L S _ D I R "   - n a m e   $ D L L _ N A M E   \ 
 
 - 	         |   $ G R E P   - i   / x 6 4 /   |   $ H E A D   - - l i n e s   1 ` 
 
 +                 |   $ G R E P   - i   / x 6 4 /   |   $ H E A D   - - l i n e s   1 ` 
 
               e l s e 
 
                   P O S S I B L E _ M S V C _ D L L = ` $ F I N D   " $ C Y G W I N _ V S _ T O O L S _ D I R "   - n a m e   $ D L L _ N A M E   \ 
 
 - 	         |   $ G R E P   - i   / x 8 6 /   |   $ H E A D   - - l i n e s   1 ` 
 
 +                 |   $ G R E P   - i   / x 8 6 /   |   $ H E A D   - - l i n e s   1 ` 
 
               f i 
 
               T O O L C H A I N _ C H E C K _ P O S S I B L E _ M S V C _ D L L ( [ $ D L L _ N A M E ] ,   [ $ P O S S I B L E _ M S V C _ D L L ] , 
 
                       [ s e a r c h   o f   V S 1 0 0 C O M N T O O L S ] ) 
 
 @ @   - 6 1 6 , 1 4   + 6 2 0 , 1 4   @ @ 
 
           i f   t e s t   " x $ C Y G W I N _ V C _ I N S T A L L _ D I R "   ! =   x ;   t h e n 
 
               i f   t e s t   " x $ O P E N J D K _ T A R G E T _ C P U _ B I T S "   =   x 6 4 ;   t h e n 
 
                   P O S S I B L E _ M S V C _ D L L = ` $ F I N D   " $ C Y G W I N _ V C _ I N S T A L L _ D I R "   - n a m e   $ D L L _ N A M E   \ 
 
 - 	         |   $ G R E P   x 6 4   |   $ H E A D   - - l i n e s   1 ` 
 
 +                 |   $ G R E P   x 6 4   |   $ H E A D   - - l i n e s   1 ` 
 
               e l s e 
 
                   P O S S I B L E _ M S V C _ D L L = ` $ F I N D   " $ C Y G W I N _ V C _ I N S T A L L _ D I R "   - n a m e   $ D L L _ N A M E   \ 
 
 - 	         |   $ G R E P   x 8 6   |   $ G R E P   - v   i a 6 4   |   $ G R E P   - v   x 6 4   |   $ H E A D   - - l i n e s   1 ` 
 
 +                 |   $ G R E P   x 8 6   |   $ G R E P   - v   i a 6 4   |   $ G R E P   - v   x 6 4   |   $ H E A D   - - l i n e s   1 ` 
 
                   i f   t e s t   " x $ P O S S I B L E _ M S V C _ D L L "   =   x ;   t h e n 
 
                       #   W e ' r e   g r a s p i n g   a t   s t r a w s   n o w . . . 
 
                       P O S S I B L E _ M S V C _ D L L = ` $ F I N D   " $ C Y G W I N _ V C _ I N S T A L L _ D I R "   - n a m e   $ D L L _ N A M E   \ 
 
 - 	             |   $ H E A D   - - l i n e s   1 ` 
 
 +                     |   $ H E A D   - - l i n e s   1 ` 
 
                   f i 
 
               f i 
 
   
 
 @ @   - 6 9 3 , 1 3   + 6 9 7 , 1 3   @ @ 
 
       i f   t e s t   " x $ U S E _ U C R T "   =   " x t r u e " ;   t h e n 
 
           A C _ M S G _ C H E C K I N G ( [ f o r   U C R T   D L L   d i r ] ) 
 
           i f   t e s t   " x $ w i t h _ u c r t _ d l l _ d i r "   ! =   x ;   t h e n 
 
 -             i f   t e s t   - z   " $ ( l s   - d   " $ w i t h _ u c r t _ d l l _ d i r / * . d l l "   2 >   / d e v / n u l l ) " ;   t h e n 
 
 +             U C R T _ D L L _ D I R = " $ w i t h _ u c r t _ d l l _ d i r " 
 
 +             B A S I C _ F I X U P _ P A T H ( [ U C R T _ D L L _ D I R ] ) 
 
 +             i f   t e s t   - z   " $ ( l s   - d   $ U C R T _ D L L _ D I R / * . d l l   2 >   / d e v / n u l l ) " ;   t h e n 
 
                   A C _ M S G _ R E S U L T ( [ n o ] ) 
 
 -                 A C _ M S G _ E R R O R ( [ C o u l d   n o t   f i n d   a n y   d l l s   i n   $ w i t h _ u c r t _ d l l _ d i r ] ) 
 
 +                 A C _ M S G _ E R R O R ( [ C o u l d   n o t   f i n d   a n y   d l l s   i n   $ U C R T _ D L L _ D I R ] ) 
 
               e l s e 
 
                   A C _ M S G _ R E S U L T ( [ $ w i t h _ u c r t _ d l l _ d i r ] ) 
 
 -                 U C R T _ D L L _ D I R = " $ w i t h _ u c r t _ d l l _ d i r " 
 
 -                 B A S I C _ F I X U P _ P A T H ( [ U C R T _ D L L _ D I R ] ) 
 
               f i 
 
           e l i f   t e s t   " x $ D E V K I T _ U C R T _ D L L _ D I R "   ! =   " x " ;   t h e n 
 
               U C R T _ D L L _ D I R = " $ D E V K I T _ U C R T _ D L L _ D I R " 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / g e n d a t a / G e n d a t a - j a v a . b a s e . g m k 
 
 - - -   a / m a k e / g e n d a t a / G e n d a t a - j a v a . b a s e . g m k 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / g e n d a t a / G e n d a t a - j a v a . b a s e . g m k 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 5 5 , 7   + 5 5 , 7   @ @ 
 
   $ ( G E N D A T A _ C U R D A T A ) :   $ ( T O P D I R ) / m a k e / d a t a / c u r r e n c y / C u r r e n c y D a t a . p r o p e r t i e s   $ ( B U I L D _ T O O L S _ J D K ) 
 
   	 $ ( c a l l   M a k e D i r ,   $ ( @ D ) ) 
 
   	 $ ( R M )   $ @ 
 
 - 	 $ ( T O O L _ G E N E R A T E C U R R E N C Y D A T A )   - o   $ @ . t m p   <   $ < 
 
 + 	 $ ( T O O L _ G E N E R A T E C U R R E N C Y D A T A )   - o   $ @ . t m p   - i   $ < 
 
   	 $ ( M V )   $ @ . t m p   $ @ 
 
   	 $ ( C H M O D )   4 4 4   $ @ 
 
   
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / g e n s r c / G e n s r c B u f f e r . g m k 
 
 - - -   a / m a k e / g e n s r c / G e n s r c B u f f e r . g m k 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / g e n s r c / G e n s r c B u f f e r . g m k 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 2 3 0 , 7   + 2 3 0 , 8   @ @ 
 
       e n d i f 
 
   
 
       $ $ ( $ 1 _ D S T ) :   $ $ ( $ 1 _ D E P )   $ ( G E N S R C _ B U F F E R _ D S T ) / _ t h e . b u f f e r . d i r 
 
 - 	 $ ( T O O L _ S P P )   <   $ $ ( $ 1 _ S R C )   >   $ $ ( $ 1 _ O U T ) . t m p   \ 
 
 + 	 $ ( R M )   $ $ ( $ 1 _ O U T ) . t m p 
 
 + 	 $ ( T O O L _ S P P )   - i $ $ ( $ 1 _ S R C )   - o $ $ ( $ 1 _ O U T ) . t m p   \ 
 
   	         - K $ $ ( $ 1 _ t y p e )   \ 
 
   	         - K $ $ ( $ 1 _ c a t e g o r y )   \ 
 
   	         - K $ $ ( $ 1 _ s t r e a m s )   \ 
 
 @ @   - 2 6 0 , 1 2   + 2 6 1 , 1 2   @ @ 
 
                   i f e q   ( $ $ ( $ 1 _ B I N ) ,   1 ) 
 
   	     $ ( S E D )   - e   ' / # B I N / , $ $ $ $ d '   <   $ $ ( $ 1 _ O U T )   >   $ $ ( $ 1 _ D S T ) . t m p 
 
   	     $ ( R M )   $ $ ( $ 1 _ O U T ) 
 
 - 	     $ $ ( $ 1 _ c h a r _ C M D )   <   $ $ ( $ 1 _ S R C _ B I N )   > >   $ $ ( $ 1 _ D S T ) . t m p 
 
 - 	     $ $ ( $ 1 _ s h o r t _ C M D )   <   $ $ ( $ 1 _ S R C _ B I N )   > >   $ $ ( $ 1 _ D S T ) . t m p 
 
 - 	     $ $ ( $ 1 _ i n t _ C M D )   <   $ $ ( $ 1 _ S R C _ B I N )   > >   $ $ ( $ 1 _ D S T ) . t m p 
 
 - 	     $ $ ( $ 1 _ l o n g _ C M D )   <   $ $ ( $ 1 _ S R C _ B I N )   > >   $ $ ( $ 1 _ D S T ) . t m p 
 
 - 	     $ $ ( $ 1 _ f l o a t _ C M D )   <   $ $ ( $ 1 _ S R C _ B I N )   > >   $ $ ( $ 1 _ D S T ) . t m p 
 
 - 	     $ $ ( $ 1 _ d o u b l e _ C M D )   <   $ $ ( $ 1 _ S R C _ B I N )   > >   $ $ ( $ 1 _ D S T ) . t m p 
 
 + 	     $ $ ( $ 1 _ c h a r _ C M D )   - i $ $ ( $ 1 _ S R C _ B I N )   - o $ $ ( $ 1 _ D S T ) . t m p 
 
 + 	     $ $ ( $ 1 _ s h o r t _ C M D )   - i $ $ ( $ 1 _ S R C _ B I N )   - o $ $ ( $ 1 _ D S T ) . t m p 
 
 + 	     $ $ ( $ 1 _ i n t _ C M D )   - i $ $ ( $ 1 _ S R C _ B I N )   - o $ $ ( $ 1 _ D S T ) . t m p 
 
 + 	     $ $ ( $ 1 _ l o n g _ C M D )   - i $ $ ( $ 1 _ S R C _ B I N )   - o $ $ ( $ 1 _ D S T ) . t m p 
 
 + 	     $ $ ( $ 1 _ f l o a t _ C M D )   - i $ $ ( $ 1 _ S R C _ B I N )   - o $ $ ( $ 1 _ D S T ) . t m p 
 
 + 	     $ $ ( $ 1 _ d o u b l e _ C M D )   - i $ $ ( $ 1 _ S R C _ B I N )   - o $ $ ( $ 1 _ D S T ) . t m p 
 
   	     $ ( P R I N T F )   " } \ n "   > >   $ $ ( $ 1 _ D S T ) . t m p 
 
   	     m v   $ $ ( $ 1 _ D S T ) . t m p   $ $ ( $ 1 _ D S T ) 
 
                   e n d i f 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / g e n s r c / G e n s r c C h a r s e t C o d e r . g m k 
 
 - - -   a / m a k e / g e n s r c / G e n s r c C h a r s e t C o d e r . g m k 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / g e n s r c / G e n s r c C h a r s e t C o d e r . g m k 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 3 6 , 7   + 3 6 , 7   @ @ 
 
   $ ( G E N S R C _ C H A R S E T C O D E R _ D S T ) / C h a r s e t D e c o d e r . j a v a :   $ ( G E N S R C _ C H A R S E T C O D E R _ T E M P L A T E ) 
 
   	 $ ( c a l l   M a k e T a r g e t D i r ) 
 
   	 $ ( R M )   $ @ . t m p 
 
 - 	 $ ( T O O L _ S P P )   <   $ <   > $ @ . t m p   \ 
 
 + 	 $ ( T O O L _ S P P )   - i $ <   - o $ @ . t m p   \ 
 
   	         - K d e c o d e r   \ 
 
   	         - D A = ' A '   \ 
 
   	         - D a = ' a '   \ 
 
 @ @   - 7 1 , 7   + 7 1 , 7   @ @ 
 
   $ ( G E N S R C _ C H A R S E T C O D E R _ D S T ) / C h a r s e t E n c o d e r . j a v a :   $ ( G E N S R C _ C H A R S E T C O D E R _ T E M P L A T E ) 
 
   	 $ ( c a l l   M a k e T a r g e t D i r ) 
 
   	 $ ( R M )   $ @ . t m p 
 
 - 	 $ ( T O O L _ S P P )   <   $ <   > $ @ . t m p   \ 
 
 + 	 $ ( T O O L _ S P P )   - i $ <   - o $ @ . t m p   \ 
 
   	         - K e n c o d e r   \ 
 
   	         - D A = ' A n '   \ 
 
   	         - D a = ' a n '   \ 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / g e n s r c / G e n s r c V a r H a n d l e s . g m k 
 
 - - -   a / m a k e / g e n s r c / G e n s r c V a r H a n d l e s . g m k 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / g e n s r c / G e n s r c V a r H a n d l e s . g m k 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 5 9 , 8   + 5 9 , 9   @ @ 
 
   	     $ $ ( e v a l   $ 1 _ t y p e   : =   $ $ $ $ ( s h e l l   $ ( T R )   ' [ : u p p e r : ] '   ' [ : l o w e r : ] '   < < <   $ $ $ $ ( $ 1 _ T y p e ) ) ) 
 
                   e n d i f 
 
   	 $ $ ( c a l l   M a k e D i r ,   $ $ ( @ D ) ) 
 
 + 	 $ ( R M )   $ $ @ 
 
   	 $ ( T O O L _ S P P )   - n e l   - K $ $ ( $ 1 _ t y p e )   - D t y p e = $ $ ( $ 1 _ t y p e )   - D T y p e = $ $ ( $ 1 _ T y p e )   \ 
 
 - 	         $ $ ( $ 1 _ A R G S )   <   $ $ <   >   $ $ @ 
 
 + 	         $ $ ( $ 1 _ A R G S )   - i $ $ <   - o $ $ @ 
 
   
 
       G E N S R C _ V A R H A N D L E S   + =   $ $ ( $ 1 _ F I L E N A M E ) 
 
   e n d e f 
 
 @ @   - 1 4 7 , 1 0   + 1 4 8 , 1 1   @ @ 
 
   
 
       $ $ ( $ 1 _ F I L E N A M E ) :   $ ( V A R H A N D L E S _ S R C _ D I R ) / X - V a r H a n d l e B y t e A r r a y V i e w . j a v a . t e m p l a t e   $ ( B U I L D _ T O O L S _ J D K ) 
 
   	 $ $ ( c a l l   M a k e D i r ,   $ $ ( @ D ) ) 
 
 + 	 $ ( R M )   $ $ @ 
 
   	 $ ( T O O L _ S P P )   - n e l   - K $ $ ( $ 1 _ t y p e )   \ 
 
   	         - D t y p e = $ $ ( $ 1 _ t y p e )   - D T y p e = $ $ ( $ 1 _ T y p e )   - D B o x T y p e = $ $ ( $ 1 _ B o x T y p e )   \ 
 
   	         - D r a w T y p e = $ $ ( $ 1 _ r a w T y p e )   - D R a w T y p e = $ $ ( $ 1 _ R a w T y p e )   - D R a w B o x T y p e = $ $ ( $ 1 _ R a w B o x T y p e )   \ 
 
 - 	         $ $ ( $ 1 _ A R G S )   <   $ $ <   >   $ $ @ 
 
 + 	         $ $ ( $ 1 _ A R G S )   - i $ $ <   - o $ $ @ 
 
   
 
       G E N S R C _ V A R H A N D L E S   + =   $ $ ( $ 1 _ F I L E N A M E ) 
 
   e n d e f 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / j d k / s r c / c l a s s e s / b u i l d / t o o l s / g e n e r a t e c u r r e n c y d a t a / G e n e r a t e C u r r e n c y D a t a . j a v a 
 
 - - -   a / m a k e / j d k / s r c / c l a s s e s / b u i l d / t o o l s / g e n e r a t e c u r r e n c y d a t a / G e n e r a t e C u r r e n c y D a t a . j a v a 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / j d k / s r c / c l a s s e s / b u i l d / t o o l s / g e n e r a t e c u r r e n c y d a t a / G e n e r a t e C u r r e n c y D a t a . j a v a 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 2 8 , 7   + 2 8 , 9   @ @ 
 
   i m p o r t   j a v a . i o . I O E x c e p t i o n ; 
 
   i m p o r t   j a v a . i o . F i l e N o t F o u n d E x c e p t i o n ; 
 
   i m p o r t   j a v a . i o . D a t a O u t p u t S t r e a m ; 
 
 + i m p o r t   j a v a . i o . F i l e I n p u t S t r e a m ; 
 
   i m p o r t   j a v a . i o . F i l e O u t p u t S t r e a m ; 
 
 + i m p o r t   j a v a . i o . I n p u t S t r e a m ; 
 
   i m p o r t   j a v a . t e x t . S i m p l e D a t e F o r m a t ; 
 
   i m p o r t   j a v a . u t i l . D a t e ; 
 
   i m p o r t   j a v a . u t i l . H a s h M a p ; 
 
 @ @   - 1 3 4 , 1 9   + 1 3 6 , 4 4   @ @ 
 
           p r i v a t e   s t a t i c   S t r i n g   c u r r e n c i e s W i t h M i n o r U n i t s U n d e f i n e d ; 
 
   
 
           p u b l i c   s t a t i c   v o i d   m a i n ( S t r i n g [ ]   a r g s )   { 
 
 - 
 
 + 	         I n p u t S t r e a m   i n   =   S y s t e m . i n ; 
 
                   / /   L o o k   f o r   " - o   o u t p u t f i l e n a m e "   o p t i o n 
 
 -                 i f   (   a r g s . l e n g t h   = =   2   & &   a r g s [ 0 ] . e q u a l s ( " - o " )   )   { 
 
 -                         t r y   { 
 
 -                                 o u t   =   n e w   D a t a O u t p u t S t r e a m ( n e w   F i l e O u t p u t S t r e a m ( a r g s [ 1 ] ) ) ; 
 
 -                         }   c a t c h   (   F i l e N o t F o u n d E x c e p t i o n   e   )   { 
 
 -                                 S y s t e m . e r r . p r i n t l n ( " E r r o r :   "   +   e . g e t M e s s a g e ( ) ) ; 
 
 -                                 e . p r i n t S t a c k T r a c e ( S y s t e m . e r r ) ; 
 
 -                                 S y s t e m . e x i t ( 1 ) ; 
 
 -                         } 
 
 -                 }   e l s e   { 
 
 -                         S y s t e m . e r r . p r i n t l n ( " E r r o r :   I l l e g a l   a r g   c o u n t " ) ; 
 
 -                         S y s t e m . e x i t ( 1 ) ; 
 
 +                 f o r   ( i n t   n   =   0 ;   n   <   a r g s . l e n g t h ;   + + n )   { 
 
 +                         i f   ( a r g s [ n ] . e q u a l s ( " - o " ) )   { 
 
 + 	 	 	 	 + + n ; 
 
 + 	 	 	 	 i f   ( n   > =   a r g s . l e n g t h )   { 
 
 + 	 	 	 	 	 S y s t e m . e r r . p r i n t l n ( " E r r o r :   I n v a l i d   a r g u m e n t   f o r m a t " ) ; 
 
 + 	 	 	 	 	 S y s t e m . e x i t ( 1 ) ; 
 
 + 	 	 	 	 } 
 
 + 	 	 	 	 t r y   { 
 
 + 	 	 	 	 	 o u t   =   n e w   D a t a O u t p u t S t r e a m ( n e w   F i l e O u t p u t S t r e a m ( a r g s [ n ] ) ) ; 
 
 + 	 	 	 	 }   c a t c h   (   F i l e N o t F o u n d E x c e p t i o n   e   )   { 
 
 + 	 	 	 	 	 S y s t e m . e r r . p r i n t l n ( " E r r o r :   "   +   e . g e t M e s s a g e ( ) ) ; 
 
 + 	 	 	 	 	 e . p r i n t S t a c k T r a c e ( S y s t e m . e r r ) ; 
 
 + 	 	 	 	 	 S y s t e m . e x i t ( 1 ) ; 
 
 + 	 	 	 	 } 
 
 + 	 	 	 }   e l s e   i f   ( a r g s [ n ] . e q u a l s ( " - i " ) )   { 
 
 + 	 	 	 	 + + n ; 
 
 + 	 	 	 	 i f   ( n   > =   a r g s . l e n g t h )   { 
 
 + 	 	 	 	 	 S y s t e m . e r r . p r i n t l n ( " E r r o r :   I n v a l i d   a r g u m e n t   f o r m a t " ) ; 
 
 + 	 	 	 	 	 S y s t e m . e x i t ( 1 ) ; 
 
 + 	 	 	 	 } 
 
 + 	 	 	 	 t r y   { 
 
 + 	 	 	 	 	 i n   =   n e w   F i l e I n p u t S t r e a m ( a r g s [ n ] ) ; 
 
 + 	 	 	 	 }   c a t c h   (   F i l e N o t F o u n d E x c e p t i o n   e   )   { 
 
 + 	 	 	 	 	 S y s t e m . e r r . p r i n t l n ( " E r r o r :   "   +   e . g e t M e s s a g e ( ) ) ; 
 
 + 	 	 	 	 	 e . p r i n t S t a c k T r a c e ( S y s t e m . e r r ) ; 
 
 + 	 	 	 	 	 S y s t e m . e x i t ( 1 ) ; 
 
 + 	 	 	 	 } 
 
 + 	 	 	 }   e l s e   { 
 
 + 	 	 	 	 S y s t e m . e r r . p r i n t l n ( " E r r o r :   I n v a l i d   a r g u m e n t   "   +   a r g s [ n ] ) ; 
 
 + 	 	 	 	 S y s t e m . e x i t ( 1 ) ; 
 
 + 	 	 	 } 
 
 +                 } 
 
 + 
 
 +                 i f   ( o u t   = =   n u l l )   { 
 
 + 	 	 	 S y s t e m . e r r . p r i n t l n ( " E r r o r :   I n v a l i d   a r g u m e n t   f o r m a t " ) ; 
 
 + 	 	 	 S y s t e m . e x i t ( 1 ) ; 
 
                   } 
 
   
 
                   f o r m a t   =   n e w   S i m p l e D a t e F o r m a t ( " y y y y - M M - d d - H H - m m - s s " ,   L o c a l e . U S ) ; 
 
 @ @   - 1 5 4 , 7   + 1 8 1 , 7   @ @ 
 
                   f o r m a t . s e t L e n i e n t ( f a l s e ) ; 
 
   
 
                   t r y   { 
 
 -                         r e a d I n p u t ( ) ; 
 
 +                         r e a d I n p u t ( i n ) ; 
 
                           b u i l d M a i n A n d S p e c i a l C a s e T a b l e s ( ) ; 
 
                           b u i l d O t h e r T a b l e s ( ) ; 
 
                           w r i t e O u t p u t ( ) ; 
 
 @ @   - 1 6 7 , 9   + 1 9 4 , 9   @ @ 
 
                   } 
 
           } 
 
   
 
 -         p r i v a t e   s t a t i c   v o i d   r e a d I n p u t ( )   t h r o w s   I O E x c e p t i o n   { 
 
 +         p r i v a t e   s t a t i c   v o i d   r e a d I n p u t ( I n p u t S t r e a m   i n )   t h r o w s   I O E x c e p t i o n   { 
 
                   c u r r e n c y D a t a   =   n e w   P r o p e r t i e s ( ) ; 
 
 -                 c u r r e n c y D a t a . l o a d ( S y s t e m . i n ) ; 
 
 +                 c u r r e n c y D a t a . l o a d ( i n ) ; 
 
   
 
                   / /   i n i t i a l i z e   o t h e r   l o o k u p   s t r i n g s 
 
                   f o r m a t V e r s i o n   =   ( S t r i n g )   c u r r e n c y D a t a . g e t ( " f o r m a t V e r s i o n " ) ; 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / j d k / s r c / c l a s s e s / b u i l d / t o o l s / s p p / S p p . j a v a 
 
 - - -   a / m a k e / j d k / s r c / c l a s s e s / b u i l d / t o o l s / s p p / S p p . j a v a 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / j d k / s r c / c l a s s e s / b u i l d / t o o l s / s p p / S p p . j a v a 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 2 5 , 6   + 2 5 , 8   @ @ 
 
   
 
   p a c k a g e   b u i l d . t o o l s . s p p ; 
 
   
 
 + i m p o r t   j a v a . i o . F i l e I n p u t S t r e a m ; 
 
 + i m p o r t   j a v a . i o . F i l e O u t p u t S t r e a m ; 
 
   i m p o r t   j a v a . u t i l . * ; 
 
   i m p o r t   j a v a . u t i l . r e g e x . * ; 
 
   
 
 @ @   - 6 9 , 6   + 7 1 , 8   @ @ 
 
                   S e t < S t r i n g >   k e y s   =   n e w   H a s h S e t < > ( ) ; 
 
                   b o o l e a n   b e   =   f a l s e ; 
 
                   b o o l e a n   e l   =   t r u e ; 
 
 + 	 	 S t r i n g   i n p u t F i l e   =   n u l l ; 
 
 + 	 	 S t r i n g   o u t p u t F i l e   =   n u l l ; 
 
   
 
                   f o r   ( S t r i n g   a r g : a r g s )   { 
 
                           i f   ( a r g . s t a r t s W i t h ( " - D " ) )   { 
 
 @ @   - 7 6 , 6   + 8 0 , 1 0   @ @ 
 
                                   v a r s . p u t ( a r g . s u b s t r i n g ( 2 ,   i ) , a r g . s u b s t r i n g ( i + 1 ) ) ; 
 
                           }   e l s e   i f   ( a r g . s t a r t s W i t h ( " - K " ) )   { 
 
                                   k e y s . a d d ( a r g . s u b s t r i n g ( 2 ) ) ; 
 
 +                         }   e l s e   i f   ( a r g . s t a r t s W i t h ( " - i " ) )   { 
 
 +                                 i n p u t F i l e   =   a r g . s u b s t r i n g ( 2 ) ; 
 
 +                         }   e l s e   i f   ( a r g . s t a r t s W i t h ( " - o " ) )   { 
 
 +                                 o u t p u t F i l e   =   a r g . s u b s t r i n g ( 2 ) ; 
 
                           }   e l s e   i f   ( " - b e " . e q u a l s ( a r g ) )   { 
 
                                   b e   =   t r u e ; 
 
                           }   e l s e   i f   ( " - n e l " . e q u a l s ( a r g ) )   { 
 
 @ @   - 8 7 , 1 1   + 9 5 , 1 1   @ @ 
 
                   } 
 
   
 
                   S t r i n g B u f f e r   o u t   =   n e w   S t r i n g B u f f e r ( ) ; 
 
 -                 n e w   S p p ( ) . s p p ( n e w   S c a n n e r ( S y s t e m . i n ) , 
 
 +                 n e w   S p p ( ) . s p p ( n e w   S c a n n e r ( n e w   F i l e I n p u t S t r e a m ( i n p u t F i l e ) ) , 
 
                                               o u t ,   " " , 
 
                                               k e y s ,   v a r s ,   b e ,   e l , 
 
                                               f a l s e ) ; 
 
 -                 S y s t e m . o u t . p r i n t ( o u t . t o S t r i n g ( ) ) ; 
 
 +                 n e w   F i l e O u t p u t S t r e a m ( o u t p u t F i l e ,   t r u e ) . w r i t e ( o u t . t o S t r i n g ( ) . g e t B y t e s ( ) ) ; 
 
           } 
 
   
 
           s t a t i c   f i n a l   S t r i n g   L N S E P   =   S y s t e m . g e t P r o p e r t y ( " l i n e . s e p a r a t o r " ) ; 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / s c r i p t s / w i n d o w s S h o r t N a m e . b a t 
 
 - - -   / d e v / n u l l 	 T h u   J a n   0 1   0 0 : 0 0 : 0 0   1 9 7 0   + 0 0 0 0 
 
 + + +   b / m a k e / s c r i p t s / w i n d o w s S h o r t N a m e . b a t 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 0 , 0   + 1 , 2 4   @ @ 
 
 + @ e c h o   o f f 
 
 + R E M 
 
 + R E M   C o p y r i g h t   ( c )   2 0 1 8 ,   O r a c l e   a n d / o r   i t s   a f f i l i a t e s .   A l l   r i g h t s   r e s e r v e d . 
 
 + R E M   D O   N O T   A L T E R   O R   R E M O V E   C O P Y R I G H T   N O T I C E S   O R   T H I S   F I L E   H E A D E R . 
 
 + R E M 
 
 + R E M   T h i s   c o d e   i s   f r e e   s o f t w a r e ;   y o u   c a n   r e d i s t r i b u t e   i t   a n d / o r   m o d i f y   i t 
 
 + R E M   u n d e r   t h e   t e r m s   o f   t h e   G N U   G e n e r a l   P u b l i c   L i c e n s e   v e r s i o n   2   o n l y ,   a s 
 
 + R E M   p u b l i s h e d   b y   t h e   F r e e   S o f t w a r e   F o u n d a t i o n . 
 
 + R E M 
 
 + R E M   T h i s   c o d e   i s   d i s t r i b u t e d   i n   t h e   h o p e   t h a t   i t   w i l l   b e   u s e f u l ,   b u t   W I T H O U T 
 
 + R E M   A N Y   W A R R A N T Y ;   w i t h o u t   e v e n   t h e   i m p l i e d   w a r r a n t y   o f   M E R C H A N T A B I L I T Y   o r 
 
 + R E M   F I T N E S S   F O R   A   P A R T I C U L A R   P U R P O S E .     S e e   t h e   G N U   G e n e r a l   P u b l i c   L i c e n s e 
 
 + R E M   v e r s i o n   2   f o r   m o r e   d e t a i l s   ( a   c o p y   i s   i n c l u d e d   i n   t h e   L I C E N S E   f i l e   t h a t 
 
 + R E M   a c c o m p a n i e d   t h i s   c o d e ) . 
 
 + R E M 
 
 + R E M   Y o u   s h o u l d   h a v e   r e c e i v e d   a   c o p y   o f   t h e   G N U   G e n e r a l   P u b l i c   L i c e n s e   v e r s i o n 
 
 + R E M   2   a l o n g   w i t h   t h i s   w o r k ;   i f   n o t ,   w r i t e   t o   t h e   F r e e   S o f t w a r e   F o u n d a t i o n , 
 
 + R E M   I n c . ,   5 1   F r a n k l i n   S t ,   F i f t h   F l o o r ,   B o s t o n ,   M A   0 2 1 1 0 - 1 3 0 1   U S A . 
 
 + R E M 
 
 + R E M   P l e a s e   c o n t a c t   O r a c l e ,   5 0 0   O r a c l e   P a r k w a y ,   R e d w o o d   S h o r e s ,   C A   9 4 0 6 5   U S A 
 
 + R E M   o r   v i s i t   w w w . o r a c l e . c o m   i f   y o u   n e e d   a d d i t i o n a l   i n f o r m a t i o n   o r   h a v e   a n y 
 
 + R E M   q u e s t i o n s . 
 
 + R E M 
 
 + i f   ' % 1 '   N E Q   ' '   e c h o   % ~ s 1 
 
 d i f f   - r   4 b e f 1 9 5 7 a 1 d 8   m a k e / s r c / n a t i v e / f i x p a t h . c 
 
 - - -   a / m a k e / s r c / n a t i v e / f i x p a t h . c 	 T h u   N o v   2 2   1 0 : 1 5 : 3 2   2 0 1 8   - 0 8 0 0 
 
 + + +   b / m a k e / s r c / n a t i v e / f i x p a t h . c 	 W e d   D e c   1 2   2 3 : 3 1 : 4 6   2 0 1 8   - 0 8 0 0 
 
 @ @   - 2 4 , 6   + 2 4 , 7   @ @ 
 
     * / 
 
   
 
   # i n c l u d e   < W i n d o w s . h > 
 
 + # i n c l u d e   < s t d b o o l . h > 
 
   # i n c l u d e   < i o . h > 
 
   # i n c l u d e   < s t d i o . h > 
 
   # i n c l u d e   < s t r i n g . h > 
 
 @ @   - 5 3 , 2 5   + 5 4 , 1 6   @ @ 
 
   } 
 
   
 
   / * 
 
 -   *   T e s t   i f   p o s   p o i n t s   t o   / c y g d r i v e / _ /   w h e r e   _   c a n 
 
 +   *   T e s t   i f   p o s   p o i n t s   t o   / p r e f i x / _ /   w h e r e   _   c a n 
 
     *   b e   a n y   c h a r a c t e r . 
 
     * / 
 
 - i n t   i s _ c y g d r i v e _ h e r e ( i n t   p o s ,   c h a r   c o n s t   * i n ,   i n t   l e n ) 
 
 + i n t   i s _ p r e f i x _ h e r e ( i n t   p o s ,   c h a r   c o n s t   * i n ,   i n t   l e n ,   c o n s t   c h a r *   p r e f i x ) 
 
   { 
 
 -     / /   L e n g t h   o f   / c y g d r i v e / c /   i s   1 2 
 
 -     i f   ( p o s + 1 2   >   l e n )   r e t u r n   0 ; 
 
 -     i f   ( i n [ p o s + 1 1 ] = = ' / '   & & 
 
 -             i n [ p o s + 9 ] = = ' / '   & & 
 
 -             i n [ p o s + 8 ] = = ' e '   & & 
 
 -             i n [ p o s + 7 ] = = ' v '   & & 
 
 -             i n [ p o s + 6 ] = = ' i '   & & 
 
 -             i n [ p o s + 5 ] = = ' r '   & & 
 
 -             i n [ p o s + 4 ] = = ' d '   & & 
 
 -             i n [ p o s + 3 ] = = ' g '   & & 
 
 -             i n [ p o s + 2 ] = = ' y '   & & 
 
 -             i n [ p o s + 1 ] = = ' c '   & & 
 
 -             i n [ p o s + 0 ] = = ' / ' )   { 
 
 -         r e t u r n   1 ; 
 
 +     / /   L e n g t h   o f   c /   i s   2 
 
 +     i n t   p r e f i x _ s i z e   =   s t r l e n ( p r e f i x ) ; 
 
 +     i f   ( p o s + p r e f i x _ s i z e + 2   >   l e n )   r e t u r n   0 ; 
 
 +     i f   ( i n [ p o s + p r e f i x _ s i z e + 1 ] = = ' / ' )   { 
 
 +         r e t u r n   s t r n c m p ( i n   +   p o s ,   p r e f i x ,   p r e f i x _ s i z e )   = =   0 ; 
 
       } 
 
       r e t u r n   0 ; 
 
   } 
 
 @ @   - 9 3 , 7   + 8 5 , 7   @ @ 
 
       } 
 
   
 
       f o r   ( i   =   0 ,   j   =   0 ;   i < l e n ; )   { 
 
 -         i f   ( i s _ c y g d r i v e _ h e r e ( i ,   i n ,   l e n ) )   { 
 
 +         i f   ( i s _ p r e f i x _ h e r e ( i ,   i n ,   l e n ,   " / c y g d r i v e / " ) )   { 
 
               o u t [ j + + ]   =   i n [ i + 1 0 ] ; 
 
               o u t [ j + + ]   =   ' : ' ; 
 
               i + = 1 1 ; 
 
 @ @   - 1 9 6 , 7   + 1 8 8 , 3 9   @ @ 
 
       r e t u r n   s t r ; 
 
   } 
 
   
 
 + / * 
 
 +   *   R e p l a c e   / m n t / _ /   w i t h   _ : / 
 
 +   *   W o r k s   i n   p l a c e   s i n c e   d r i v e   l e t t e r   i s   a l w a y s 
 
 +   *   s h o r t e r   t h a n   / m n t / 
 
 +   * / 
 
 + c h a r   * r e p l a c e _ c y g d r i v e _ w s l ( c h a r   c o n s t   * i n ) 
 
 + { 
 
 +     s i z e _ t   l e n   =   s t r l e n ( i n ) ; 
 
 +     c h a r   * o u t   =   ( c h a r * )   m a l l o c ( l e n + 1 ) ; 
 
 +     i n t   i , j ; 
 
 + 
 
 +     i f   ( l e n   <   7 )   { 
 
 +         m e m m o v e ( o u t ,   i n ,   l e n   +   1 ) ; 
 
 +         r e t u r n   o u t ; 
 
 +     } 
 
 + 
 
 +     f o r   ( i   =   0 ,   j   =   0 ;   i < l e n ; )   { 
 
 +         i f   ( i s _ p r e f i x _ h e r e ( i ,   i n ,   l e n ,   " / m n t / " ) )   { 
 
 +             o u t [ j + + ]   =   i n [ i + 5 ] ; 
 
 +             o u t [ j + + ]   =   ' : ' ; 
 
 +             i + = 6 ; 
 
 +         }   e l s e   { 
 
 +             o u t [ j ]   =   i n [ i ] ; 
 
 +             i + + ; 
 
 +             j + + ; 
 
 +         } 
 
 +     } 
 
 +     o u t [ j ]   =   ' \ 0 ' ; 
 
 +     r e t u r n   o u t ; 
 
 + } 
 
 + 
 
   c h a r * ( * r e p l a c e _ c y g d r i v e ) ( c h a r   c o n s t   * i n )   =   N U L L ; 
 
 + b o o l   d e b u g _ f i x p a t h   =   f a l s e ; 
 
   
 
   c h a r   * f i l e s _ t o _ d e l e t e [ 1 0 2 4 ] ; 
 
   i n t   n u m _ f i l e s _ t o _ d e l e t e   =   0 ; 
 
 @ @   - 2 5 0 , 1 1   + 2 7 4 , 1 1   @ @ 
 
           a p p e n d ( & b u f f e r ,   & b u f l e n ,   & u s e d ,   b l o c k ,   b l o c k l e n ) ; 
 
       } 
 
       b u f f e r [ u s e d ]   =   0 ; 
 
 -     i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +     i f   ( d e b u g _ f i x p a t h )   { 
 
           f p r i n t f ( s t d e r r ,   " f i x p a t h   i n p u t   f r o m   @ - f i l e   % s :   % s \ n " ,   & i n [ 1 ] ,   b u f f e r ) ; 
 
       } 
 
       f i x e d   =   r e p l a c e _ c y g d r i v e ( b u f f e r ) ; 
 
 -     i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +     i f   ( d e b u g _ f i x p a t h )   { 
 
           f p r i n t f ( s t d e r r ,   " f i x p a t h   c o n v e r t e d   t o   @ - f i l e   % s   i s :   % s \ n " ,   n a m e ,   f i x e d ) ; 
 
       } 
 
       f w r i t e ( f i x e d ,   s t r l e n ( f i x e d ) ,   1 ,   a t o u t ) ; 
 
 @ @   - 3 6 3 , 2 7   + 3 8 7 , 3 4   @ @ 
 
           B O O L   p r o c e s s I n h e r i t H a n d l e s   =   T R U E ; 
 
           B O O L   w a i t F o r C h i l d   =   T R U E ; 
 
   
 
 -         i f   ( a r g c < 2   | |   a r g v [ 1 ] [ 0 ]   ! =   ' - '   | |   ( a r g v [ 1 ] [ 1 ]   ! =   ' c '   & &   a r g v [ 1 ] [ 1 ]   ! =   ' m ' ) )   { 
 
 -                 f p r i n t f ( s t d e r r ,   " U s a g e :   f i x p a t h   - c | m < p a t h @ p a t h @ . . . >   [ - - d e t a c h ]   / c y g d r i v e / c / W I N D O W S / n o t e p a d . e x e   [ / c y g d r i v e / c / x / t e s t . t x t | @ / c y g d r i v e / c / x / a t f i l e ] \ n " ) ; 
 
 + 	 d e b u g _ f i x p a t h   =   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L ) ; 
 
 + 
 
 +         i f   ( a r g c < 2   | |   a r g v [ 1 ] [ 0 ]   ! =   ' - '   | |   ( a r g v [ 1 ] [ 1 ]   ! =   ' c '   & &   a r g v [ 1 ] [ 1 ]   ! =   ' m '   & &   a r g v [ 1 ] [ 1 ]   ! =   ' w ' ) )   { 
 
 +                 f p r i n t f ( s t d e r r ,   " U s a g e :   f i x p a t h   - c | m | w < p a t h @ p a t h @ . . . >   [ - - d e t a c h ]   / c y g d r i v e / c / W I N D O W S / n o t e p a d . e x e   [ / c y g d r i v e / c / x / t e s t . t x t | @ / c y g d r i v e / c / x / a t f i l e ] \ n " ) ; 
 
                   e x i t ( 0 ) ; 
 
           } 
 
   
 
 -         i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +         i f   ( d e b u g _ f i x p a t h )   { 
 
               c h a r   c o n s t   *   c m d l i n e   =   G e t C o m m a n d L i n e ( ) ; 
 
               f p r i n t f ( s t d e r r ,   " f i x p a t h   i n p u t   l i n e   > % s < \ n " ,   s t r s t r ( c m d l i n e ,   a r g v [ 1 ] ) ) ; 
 
           } 
 
   
 
           i f   ( a r g v [ 1 ] [ 1 ]   = =   ' c '   & &   a r g v [ 1 ] [ 2 ]   = =   ' \ 0 ' )   { 
 
 -             i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +             i f   ( d e b u g _ f i x p a t h )   { 
 
                   f p r i n t f ( s t d e r r ,   " f i x p a t h   u s i n g   c y g w i n   m o d e \ n " ) ; 
 
               } 
 
               r e p l a c e _ c y g d r i v e   =   r e p l a c e _ c y g d r i v e _ c y g w i n ; 
 
           }   e l s e   i f   ( a r g v [ 1 ] [ 1 ]   = =   ' m ' )   { 
 
 -             i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +             i f   ( d e b u g _ f i x p a t h )   { 
 
                   f p r i n t f ( s t d e r r ,   " f i x p a t h   u s i n g   m s y s   m o d e ,   w i t h   p a t h   l i s t :   % s \ n " ,   & a r g v [ 1 ] [ 2 ] ) ; 
 
               } 
 
               s e t u p _ m s y s _ p a t h _ l i s t ( a r g v [ 1 ] ) ; 
 
               r e p l a c e _ c y g d r i v e   =   r e p l a c e _ c y g d r i v e _ m s y s ; 
 
 + 	 }   e l s e   i f   ( a r g v [ 1 ] [ 1 ]   = =   ' w ' )   { 
 
 +             i f   ( d e b u g _ f i x p a t h )   { 
 
 +                 f p r i n t f ( s t d e r r ,   " f i x p a t h   u s i n g   w s l   m o d e ,   w i t h   p a t h   l i s t :   % s \ n " ,   & a r g v [ 1 ] [ 2 ] ) ; 
 
 +             } 
 
 +             r e p l a c e _ c y g d r i v e   =   r e p l a c e _ c y g d r i v e _ w s l ; 
 
           }   e l s e   { 
 
               f p r i n t f ( s t d e r r ,   " f i x p a t h   U n k n o w n   m o d e :   % s \ n " ,   a r g v [ 1 ] ) ; 
 
               e x i t ( - 1 ) ; 
 
 @ @   - 3 9 1 , 7   + 4 2 2 , 7   @ @ 
 
   
 
           i f   ( a r g v [ 2 ] [ 0 ]   = =   ' - ' )   { 
 
               i f   ( s t r c m p ( a r g v [ 2 ] ,   " - - d e t a c h " )   = =   0 )   { 
 
 -                 i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +                 i f   ( d e b u g _ f i x p a t h )   { 
 
                       f p r i n t f ( s t d e r r ,   " f i x p a t h   i n   d e t a c h e d   m o d e \ n " ) ; 
 
                   } 
 
                   p r o c e s s F l a g s   | =   D E T A C H E D _ P R O C E S S ; 
 
 @ @   - 4 1 7 , 7   + 4 4 8 , 7   @ @ 
 
                   v a r [ v a r _ l e n   -   1 ]   =   ' \ 0 ' ; 
 
                   s t r u p r ( v a r ) ; 
 
   
 
 -                 i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +                 i f   ( d e b u g _ f i x p a t h )   { 
 
                       f p r i n t f ( s t d e r r ,   " f i x p a t h   s e t t i n g   v a r   > % s <   t o   > % s < \ n " ,   v a r ,   v a l ) ; 
 
                   } 
 
   
 
 @ @   - 4 8 0 , 1 2   + 5 1 1 , 1 2   @ @ 
 
           } 
 
           * c u r r e n t   =   ' \ 0 ' ; 
 
   
 
 -         i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +         i f   ( d e b u g _ f i x p a t h )   { 
 
               f p r i n t f ( s t d e r r ,   " f i x p a t h   c o n v e r t e d   l i n e   > % s < \ n " ,   l i n e ) ; 
 
           } 
 
   
 
           i f   ( c m d   = =   a r g c )   { 
 
 -               i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +               i f   ( d e b u g _ f i x p a t h )   { 
 
                     f p r i n t f ( s t d e r r ,   " f i x p a t h   n o   c o m m a n d   p r o v i d e d ! \ n " ) ; 
 
                 } 
 
                 e x i t ( 0 ) ; 
 
 @ @   - 5 1 8 , 7   + 5 4 9 , 7   @ @ 
 
               W a i t F o r S i n g l e O b j e c t ( p i . h P r o c e s s ,   I N F I N I T E ) ; 
 
               G e t E x i t C o d e P r o c e s s ( p i . h P r o c e s s ,   & e x i t C o d e ) ; 
 
   
 
 -             i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +             i f   ( d e b u g _ f i x p a t h )   { 
 
                   f o r   ( i = 0 ;   i < n u m _ f i l e s _ t o _ d e l e t e ;   + + i )   { 
 
                       f p r i n t f ( s t d e r r ,   " f i x p a t h   N o t   d e l e t i n g   t e m p o r a r y   f i l e   % s \ n " , 
 
                                       f i l e s _ t o _ d e l e t e [ i ] ) ; 
 
 @ @   - 5 3 0 , 1 3   + 5 6 1 , 1 3   @ @ 
 
               } 
 
   
 
               i f   ( e x i t C o d e   ! =   0 )   { 
 
 -                 i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +                 i f   ( d e b u g _ f i x p a t h )   { 
 
                       f p r i n t f ( s t d e r r ,   " f i x p a t h   e x i t   c o d e   % d \ n " , 
 
                                       e x i t C o d e ) ; 
 
                   } 
 
               } 
 
           }   e l s e   { 
 
 -             i f   ( g e t e n v ( " D E B U G _ F I X P A T H " )   ! =   N U L L )   { 
 
 +             i f   ( d e b u g _ f i x p a t h )   { 
 
                   f p r i n t f ( s t d e r r ,   " f i x p a t h   N o t   w a i t i n g   f o r   c h i l d   p r o c e s s " ) ; 
 
               } 
 
           } 
 
 


More information about the build-dev mailing list