www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/08/03:11:02

Date: Thu, 8 Aug 1996 10:06:20 +0200 (IST)
From: Eli Zaretskii <eliz AT is DOT elta DOT co DOT il>
To: "Steven M. Gibson" <76711 DOT 2621 AT CompuServe DOT COM>
Cc: djgpp AT delorie DOT com
Subject: Re: Target-Dependent DEFINES ??
In-Reply-To: <4tprvs$l5v$1@mhade.production.compuserve.com>
Message-Id: <Pine.SUN.3.91.960808100329.19168T-100000@is>
Mime-Version: 1.0

On 1 Aug 1996, Steven M. Gibson wrote:

> Does GCC have any target-dependent DEFINES?  I'd like to assemble 
> slightly different code under GCC/Unix than under GCC/PC ... and 
> I'd like to not have to REMEMBER to set my own DEFINE to do so.

If you need to write code that is only compiled on DJGPP, use the 
__DJGPP__ symbol (like in "#ifdef __DJGPP__").  Other platforms have 
their own symbols, but that is specific to each platform.

You can see what does GCC define automatically by looking at the `specs' 
file that exists on every GCC installation (for DJGPP, it is in the lib/ 
subdirectory).

- Raw text -


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