Mail Archives: djgpp/1996/02/06/08:00:57
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 -