Date: Thu, 10 Oct 2002 14:24:34 +0300 From: Giorgos Keramidas <keramida@ceid.upatras.gr> To: Terry Lambert <tlambert2@mindspring.com> Cc: Garrett Wollman <wollman@lcs.mit.edu>, Craig Rodrigues <rodrigc@attbi.com>, freebsd-standards@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Problem detecting POSIX symbolic constants Message-ID: <20021010112434.GS21391@hades.hell.gr> In-Reply-To: <3DA5354F.9BB3E54B@mindspring.com> References: <20021009222307.A9894@attbi.com> <200210100549.g9A5nFLn060516@khavrinen.lcs.mit.edu> <3DA5354F.9BB3E54B@mindspring.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 2002-10-10 01:07, Terry Lambert <tlambert2@mindspring.com> 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 majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021010112434.GS21391>