[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Checking for POSIX&Co
>Hmmm, my info pages say the same, yes. But neither g++ (egcs 1.0.3) nor
gcc >(gcc 2.7.2.3) seem to define it here - on two independent systems.
This is >the construct I tried: >
>---------
>#include <stdio.h>
>
>int main (void)
>{
> printf ("Hello - always\n");
>#if defined (__POSIX__)
> printf ("Hello - POSIX\n");
>#endif
> return 0;
>}
>---------
>
>The "Hello - POSIX" string is *not* printed by the resulting executable.
Update: After looking through my gcc "stats" file and the output of
"gcc -v <srcfile>" I tried this:
....
#if #system(posix)
printf ("Hello - POSIX\n");
#endif
....
And this one works. Here.
Cu
Christian
--
C:\DOS\COMMAND\SYSTEM\HELP\WHERE\THE\F*CK\AM_I