Mail Archives: djgpp/2001/04/30/12:03:36
When are __DJGPP__ and __MSDOS__ guaranteed to be defined and valid for
#ifdef testing?
My experiments lead me to believe that __MSDOS__ is defined `immediately'
by the preprocessor (by virtue of using a gcc that was built for DOS),
but that __DJGPP__ is not defined until I #include a *system* header.
Therefore, in the following sequence
#include "foo.h"
#include <stdio.h>
[rest of code]
I can validly #ifdef __MSDOS__ inside "foo.h", but I have to wait until
_after_ <stdio.h> to validly #ifdef __DJGPP__?
Which would argue for always #include'ing system headers first, right?
--
TIA/jtw
- Raw text -