delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/03/30/22:18:13

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <002301c2f734$736febf0$9a7586d9@ellixia>
Reply-To: "Elfyn McBratney" <elfyn-cygwin AT exposure DOT org DOT uk>
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>
References: <b68arh$j9m$1 AT main DOT gmane DOT org>
Subject: Re: gcc/Cygwin awareness
Date: Mon, 31 Mar 2003 04:20:15 +0100
MIME-Version: 1.0
X-Priority: 3
X-MSMail-Priority: Normal
X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300

> 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/

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019