On 2002-10-10 01:07, Terry Lambert <[EMAIL PROTECTED]> wrote:
>
> So the test is:
>
> #ifdef _POSIX_REALTIME_SIGNALS
> #if _POSIX_REALTIME_SIGNALS > 0
>
> ...or, if you want to assume all preprocessors support "#if":
>
> #if defined(_POSIX_REALTIME_SIGNALS) && (_POSIX_REALTIME_SIGNALS > 0)
>
> I think the first is safer, in that if "#if" is not supported, it
> being an undefined preprocessor directive would be non-fatal,
> being in an uncompiled "#ifdef" block...

Well, almost.  There is one exception.  A compiler that doesn't support
#if but happens to run in an environment that has _POSIX_REALTIME_SIGNALS
defined and equal to -1.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-hackers" in the body of the message

Reply via email to