This is the mail archive of the email@example.com
mailing list for the Cygwin project. See the Cygwin
home page for more information.
Re: gcc -U_WIN32 pitfalls!
Mumit Khan wrote:
> Just for kicks, I tried to build a small analysis program with -U_WIN32;
> this tool is essentially a filter and doesn't use any win32 specific
> features, so it should be pretty safe, right?
> Looks like certain typedefs are *WRONG* when you undefine _WIN32 and it
> causes amazingly subtle bugs! Any code using stat for example will be
> subtly but surely broken.
Here's the line at the top of sys/types.h causing these bugs:
#if defined (GO32) || defined (__MSDOS__) || defined (_WIN32)
it should be:
#if defined (GO32) || defined (__MSDOS__) || defined (_WIN32) ||
I don't think there are more of these bugs, a grep for _WIN32
didn't reveal anything.
Want to unsubscribe from this list?
Send a message to firstname.lastname@example.org