www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/02/06/08:00:57

Date: Tue, 6 Feb 1996 14:54:34 +0200 (EET)
From: Martynas Kunigelis <algikun AT santaka DOT sc-uni DOT ktu DOT lt>
To: Broeker AT physik DOT rwth-aachen DOT de, DJGPP mailing list <djgpp AT delorie DOT com>
Subject: Re: defines for djgpp V1.x and V2
Message-ID: <Pine.HPP.3.91.960206145314.24420A-100000@santaka.sc-uni.ktu.lt>
MIME-Version: 1.0


On 6 Feb 1996 Broeker AT physik DOT rwth-aachen DOT de wrote:

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


What you though would be "">="2" really is 0>=2. Test it!

Martynas Kunigelis

- Raw text -


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