[AD] Fix.bat patch and error in windows port

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]



Here's a patch that improves the fix.bat script, which seems to be broken under Mingw32/Win2k. I also made it go to help if the wrong option was selected.

There's a bug on the latest CVS regarding Windows compiling.

[prompt]
G:\MICROS~1\allegro>make
Compiling Allegro for MSVC, optimised. Please wait...
obj/msvc/runner.exe cl @ -nologo -DALLEGRO_SRC -W1 -Gd -Ox -GB -MD -I. -I./inclu
de -Foobj/msvc/alleg/file.obj -c src/file.c
file.c
src/file.c(1246) : error C2491: '_open' : definition of dllimport function not a
llowed
make: *** [obj/msvc/alleg/file.obj] Error 2
[/prompt]

The corresponding line is:

static int _open(AL_CONST char *fname, int flags, int mode) <-- Error is here.

Seems the compiler doens't like _open as a function name.


--
- Robert J Ohannessian
"Microsoft code is probably O(n^20)" (my CS prof)
http://pages.infinit.net/voidstar/
Index: fix.bat
===================================================================
RCS file: /cvsroot/alleg/allegro/fix.bat,v
retrieving revision 1.2
diff -u -b -r1.2 fix.bat
--- fix.bat	2001/10/20 00:46:37	1.2
+++ fix.bat	2001/10/26 21:40:37
@@ -16,19 +16,18 @@
 if [%1] == [rsxnt]   goto rsxnt

 if [%1] == [watcom]  goto watcom

 

-if [%1] == [help]    goto help

-if [%1] == []        goto help

+goto help
 

-goto done

 

 :ooes_error

 

 echo *** ERROR *** Look up the section "Out of Environment space" in the FAQ.

-goto done

+echo.
+goto end
 

 :bcc32

 

-set AL_COMPILER=Windows (BCC32)

+set AL_COMPILER=Windows/BCC32
 set AL_MAKEFILE=makefile.bcc

 set AL_PLATFORM=ALLEGRO_BCC32

 set AL_NOCONV=1

@@ -36,14 +35,14 @@
 

 :djgpp

 

-set AL_COMPILER=DOS (djgpp)

+set AL_COMPILER=DOS/djgpp
 set AL_MAKEFILE=makefile.dj

 set AL_PLATFORM=ALLEGRO_DJGPP

 goto fix

 

 :mingw32

 

-set AL_COMPILER=Windows (Mingw32)

+set AL_COMPILER=Windows/Mingw32
 set AL_MAKEFILE=makefile.mgw

 set AL_PLATFORM=ALLEGRO_MINGW32

 set AL_NOCONV=1

@@ -51,21 +50,21 @@
 

 :msvc

 

-set AL_COMPILER=Windows (MSVC)

+set AL_COMPILER=Windows/MSVC
 set AL_MAKEFILE=makefile.vc

 set AL_PLATFORM=ALLEGRO_MSVC

 goto fix

 

 :rsxnt

 

-set AL_COMPILER=Windows (RSXNT)

+set AL_COMPILER=Windows/RSXNT
 set AL_MAKEFILE=makefile.rsx

 set AL_PLATFORM=ALLEGRO_RSXNT

 goto fix

 

 :watcom

 

-set AL_COMPILER=DOS (Watcom)

+set AL_COMPILER=DOS/Watcom
 set AL_MAKEFILE=makefile.wat

 set AL_PLATFORM=ALLEGRO_WATCOM

 goto fix

@@ -78,7 +77,7 @@
 echo Where platform is one of: bcc32, djgpp, mingw32, msvc, rsxnt or watcom.

 echo The --quick parameter is used to turn off LF to CR/LF conversion.

 echo.

-goto done

+goto end
 

 :fix

 

@@ -109,3 +108,5 @@
 set AL_NOCONV=

 

 echo Done!

+
+:end


Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/