del junk.o\r
\r
:checkgcc\r
-if (%nocygwin%) == (Y) goto checkw32api\r
+Rem WARNING -- COMMAND.COM on some systems only looks at the first\r
+Rem 8 characters of a lable. So do NOT be tempted to change\r
+Rem chkapi* into something fancier like checkw32api\r
+Rem You HAVE been warned!\r
+if (%nocygwin%) == (Y) goto chkapi\r
echo Checking whether gcc requires '-mno-cygwin'...\r
echo #include "cygwin/version.h" >junk.c\r
echo main(){} >>junk.c\r
gcc -c junk.c\r
-if not exist junk.o goto checkw32api\r
+if not exist junk.o goto chkapi\r
gcc -mno-cygwin -c junk.c\r
if exist junk.o set nocygwin=Y\r
rm -f junk.c junk.o\r
\r
-:checkw32api\r
+:chk32api\r
rem ----------------------------------------------------------------------\r
rem Older versions of the Windows API headers either don't have any of\r
rem the IMAGE_xxx definitions (the headers that come with Cygwin b20.1\r
echo #include "windows.h" >junk.c\r
echo test(PIMAGE_NT_HEADERS pHeader) >>junk.c\r
echo {PIMAGE_SECTION_HEADER pSection = IMAGE_FIRST_SECTION(pHeader);} >>junk.c\r
-if (%nocygwin%) == (Y) goto checkw32api1\r
+if (%nocygwin%) == (Y) goto chkapi1\r
set cf=%usercflags%\r
-goto checkw32api2\r
-:checkw32api1\r
+goto chkapi2\r
+:chkapi1\r
set cf=%usercflags% -mno-cygwin\r
-:checkw32api2\r
+:chkapi2\r
echo on\r
gcc %cf% -c junk.c\r
echo off\r