how-to use _WIN32 preprocessor with cygwin ?

Tim Prince tprince@computer.org
Sun Nov 10 11:27:00 GMT 2002


On Sunday 10 November 2002 10:24, Eric Belhomme wrote:

> #ifndef _WIN32
> # include <inttypes.h>
> #else
> # include "myheader.h"
> #endif
>
> So as I readen on the cygwin FAQ, _WIN32 sould be declared ans "myheader.h"
> sould be used instead of <inttypes.h> but that' not the case :-(
>
> So i deduce the _WIN32 preprocessor is not known under cygwin environment.
> I wonder I have to declare something, somewhere, but as I said in intro,
> I'm not familliar with the gnu C compiller...

The cygwin-specific gcc compile flag -mwin32 causes the _WIN32 macro to be 
defined.  Certain cygwin applications predate that arrangement, so confusion 
is understandable.
-- 
Tim Prince

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/



More information about the Cygwin mailing list