This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: gcc/Cygwin awareness
- From: "Elfyn McBratney" <elfyn-cygwin at exposure dot org dot uk>
- To: "cygwin" <cygwin at cygwin dot com>,"John Williams" <jwilliams at itee dot uq dot edu dot au>
- Date: Mon, 31 Mar 2003 04:20:15 +0100
- Subject: Re: gcc/Cygwin awareness
- References: <b68arh$j9m$1@main.gmane.org>
- Reply-to: "Elfyn McBratney" <elfyn-cygwin at exposure dot org dot uk>
> Is there a macro defined in gcc when running under Cygwin as opposed to,
> say, linux?
Not too sure, All I could find was GCC_VERSION , __GNUC__ and IN_GCC .
> I'd like to code something like
>
> #ifdef _GCC_UNDER_CYGWIN
> blah blah
> #else
> blah blah
> #endif
You could use this
#if defined(__GNUC__) && defined(__CYGWIN__)
/* do blah on Cygwin under gcc */
blah ();
#else
/* no Cygwin, do fooblah */
fooblah ();
#endif
--
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/