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: References: NNTP-Posting-Host: axp04.physik.rwth-aachen.de To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Martynas Kunigelis 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)