I: gcc ... -U_WIN32 ... may cause problems

Michael Czapski MCzapski@openplus.com.au
Sat Aug 29 00:17:00 GMT 1998

On Saturday, August 29, 1998 4:23 AM, Michael Weiser 
[SMTP:michael@weiser.saale-net.de] wrote:
> Hello Michael, you wrote:
> >Cygwin32 but unix-specific daemon code is compiled instead, for example.  To
> >
> >avoid coding #if defined construct as shown I decided to undefine _WIN32 
> >
> >compiling in Cygwin32 environment by using a command line of a form "gcc ...
> >
> >-U_WIN32 ...".  Before I did that the application worked fine however as 
> >
> Wouldn't it be cleaner and easier to code something like
> #if defined __unix__ || defined __CYGWIN32__
> ...
> #endif
> and
> #if defined _WIN32 && !defined __CYGWIN32__
> ...
> #endif
> around parts of your program that should behave like on unix under
> cygwin? IMHO that wouldn't be more effort than solving your current
> problem and all the others that will arise if something in the headers
> or the cygwin tools gets changed.
> --
Hello Michael,
You are right.   I will, likely, revert to using that form as it may cause more 
problems later on, as you rightly point out, to do it yhe way I am currently 
doing it :-).
Thanks for replying.
Cheers ...
Michael Czapski

For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".

More information about the Cygwin mailing list