[crossfire] [Crossfire-cvs] CVS commit: crossfire
Mark Wedel
mwedel at sonic.net
Tue Jun 6 23:22:27 CDT 2006
Alex Schultz wrote:
> Crossfire CVS repository messages. wrote:
>
>> Module Name: crossfire
>> Committed By: ryo_saeba
>> Date: Tue Jun 6 22:16:25 UTC 2006
>>
>> Modified Files:
>> crossfire/common: loader.c
>> crossfire/make_win32: crossfire32.dsp
>>
>> Log Message:
>> Fix Win32 compilation
>>
>>
>>
> <snip>
>
>> *** 9,15 ****
>> --- 9,17 ----
>> #define YY_FLEX_MINOR_VERSION 5
>>
>> #include <stdio.h>
>> + #ifndef WIN32
>> #include <unistd.h>
>> + #endif
>>
> I'm not sure this is the best fix for it as loader.c is code generated
> from loader.l by flex. Next time someone updates loader.l and
> regenerates loader.c this change will be undone. As this include is made
> by flex and not from loader.l, it would be best to see what options for
> regenerating that flex might have that might help this.
I think I looked, and flex doesn't have any option (the presumption probably
being that you could just use flex to generate a proper .c file on whatever system).
The only thing that could perhaps be done is to add some shell script commands
to the makefile to put in the #ifndef and #endif lines (probably could be done
by sed).
Other possibility, which I'm not sure how easy it would be to do, would be to
have an empty unistd.h file someplace in the code that the windows build uses
(-Iwindows_includes) so it finds the file, but nothing of use in it.
I believe this unistd.h also would happen with the other lex files, but the
only other one is probably the random map code.
More information about the crossfire
mailing list