delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/08/06/01:36:10

From: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: sizeof() in #if
Date: 1 Aug 1997 06:42:20 GMT
Organization: The National Capital FreeNet
Lines: 34
Message-ID: <5rs0gc$7l8@freenet-news.carleton.ca>
References: <199707251705 DOT KAA26965 AT adit DOT ap DOT net> <5relc5$3ls AT freenet-news DOT carleton DOT ca> <33DC4DB4 DOT 244D901F AT Mathematik DOT TU-Chemnitz DOT DE>
Reply-To: ao950 AT FreeNet DOT Carleton DOT CA (Paul Derbyshire)
NNTP-Posting-Host: freenet2.carleton.ca
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Robert Hoehne (Robert DOT Hoehne AT Mathematik DOT TU-Chemnitz DOT DE) writes:
> Paul Derbyshire wrote:
>> 
>> Nate Eldredge (eldredge AT ap DOT net) writes:
>> > At 05:34  7/24/1997 +0100, you wrote:
>> >>Now, how do I in a portable way test for which C compiler might be available?
>> >>I can do it easily in 4DOS, but COMMAND.COM compatibility is a lot harder...
>> > Well, there's always the method of <gasp> asking the user! My approach would
>> > be to define $(CC) = gcc at the top of the makefile, and let the user change
>> > it if they want.
>> > The better question is, what compiler besides GCC would be available that
>> > would work?
>> 
>> #if defined __GNU_C__
> 
> Use __DJGPP__ for conditional preprocessing when
> writing code for DJGPP, since __GNUC__ is defined
> also for other platforms.
> 
> BTW: __GNU_C__ is not defined but __GNUC__.
> 

I know that. You'd use __GNUC__ for stuff that is available in GCC in
general, like __attribute__ and so forth. You might use __DJGPP__ instead
when dealing with something that sure won't work in Linux or off a
non-Intel box, such as a DOS call or some sort of DOS-specific file
access.

--
    .*.  Where feelings are concerned, answers are rarely simple [GeneDeWeese]
 -()  <  When I go to the theater, I always go straight to the "bag and mix"
    `*'  bulk candy section...because variety is the spice of life... [me]
Paul Derbyshire ao950 AT freenet DOT carleton DOT ca, http://chat.carleton.ca/~pderbysh

- Raw text -


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