[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Checking for POSIX&Co



Adrian Ratnapala wrote:

>> >Well you are definately right about __POSIX__, and I assume you are
>>
>> I just checked it, and __POSIX__ is *not* defined here !!!
>> Is this an error in my config or is __POSIX__ the wrong one?
>
>I was reading the  libc info pages.

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.

Can you please check this?

Cu
	Christian
--

C:\DOS\COMMAND\SYSTEM\HELP\WHERE\THE\F*CK\AM_I