Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm Sender: cygwin-owner AT sourceware DOT cygnus DOT com Delivered-To: mailing list cygwin AT sourceware DOT cygnus DOT com Message-ID: <37218038.23663084@hem2.passagen.se> Date: Sat, 24 Apr 1999 10:26:32 +0200 From: Anders Norlander X-Mailer: Mozilla 4.01 [en] (Win95; I) MIME-Version: 1.0 To: Mumit Khan CC: cygwin AT sourceware DOT cygnus DOT com Subject: Re: gcc -U_WIN32 pitfalls! X-Priority: 3 (Normal) References: Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit 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) || defined(__CYGWIN__) I don't think there are more of these bugs, a grep for _WIN32 didn't reveal anything. Regards, Anders -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com