www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/08/05:48:01

Xref: news2.mv.net comp.os.msdos.djgpp:869
From: Broeker AT axp04 DOT physik DOT rwth-aachen DOT de (Hans-Bernhard Broeker)
Newsgroups: comp.os.msdos.djgpp
Subject: Re: defines for djgpp V1.x and V2
Date: 6 Feb 96 11:48:45 GMT
Organization: RWTH -Aachen / Rechnerbetrieb Informatik
Lines: 26
Message-ID: <Broeker.823607325@axp04>
References: <Pine DOT HPP DOT 3 DOT 91 DOT 960201175334 DOT 13778A-100000 AT santaka DOT sc-uni DOT ktu DOT lt>
NNTP-Posting-Host: axp04.physik.rwth-aachen.de
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Martynas Kunigelis <algikun AT santaka DOT sc-uni DOT ktu DOT lt> writes:

>#if (DJGPP >= 2)
^^^^^^^^^^^^^^^^^

But wouldn't that break if you try it with DJGPP V1? There, DJGPP isn't
defined at all by default.  So poor old cpp would have to find out if
"DJGPP" is larger or equal to "2".  Looking into the cpp manuals, I see
that for undefined DJGPP, it is treated as being zero, and that works. 
But there's at least one major multi-platform software package (gnuplot)
that uses a "-DDJGPP" to flag that DJGPP is the actual platform.  That
would mean cpp had to compare "" >= "2".  Looks like I have to return to
base and re-read K&R and the cpp docs to find out what cpp does with
such comparisons. 

>/* V2 stuff...*/

>#else

>/* V1 stuff... [how come you still use that?] */

>#endif

>Martynas Kunigelis

Hans-Bernhard Broeker (Aachen, Germany)

- Raw text -


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