This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: how-to use _WIN32 preprocessor with cygwin ?
- From: Tim Prince <tprince at computer dot org>
- To: Eric Belhomme <eric dot belhomme at free dot fr>, cygwin at cygwin dot com
- Date: Sun, 10 Nov 2002 11:27:51 -0800
- Subject: Re: how-to use _WIN32 preprocessor with cygwin ?
- References: <Xns92C2C61BC83D7ericbelhommefreefr@80.91.224.249>
- Reply-to: tprince at computer dot org
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/