From owner-freebsd-hackers Thu Oct 10 12:28:45 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 49CD737B401; Thu, 10 Oct 2002 12:28:44 -0700 (PDT) Received: from conure.mail.pas.earthlink.net (conure.mail.pas.earthlink.net [207.217.120.54]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1E1143E4A; Thu, 10 Oct 2002 12:28:43 -0700 (PDT) (envelope-from tlambert2@mindspring.com) Received: from pool0397.cvx21-bradley.dialup.earthlink.net ([209.179.193.142] helo=mindspring.com) by conure.mail.pas.earthlink.net with esmtp (Exim 3.33 #1) id 17ziyR-0001f6-00; Thu, 10 Oct 2002 12:27:55 -0700 Message-ID: <3DA5D473.21A43EDD@mindspring.com> Date: Thu, 10 Oct 2002 12:26:43 -0700 From: Terry Lambert X-Mailer: Mozilla 4.79 [en] (Win98; U) X-Accept-Language: en MIME-Version: 1.0 To: Giorgos Keramidas Cc: Garrett Wollman , Craig Rodrigues , freebsd-standards@freebsd.org, freebsd-hackers@freebsd.org Subject: Re: Problem detecting POSIX symbolic constants References: <20021009222307.A9894@attbi.com> <200210100549.g9A5nFLn060516@khavrinen.lcs.mit.edu> <3DA5354F.9BB3E54B@mindspring.com> <20021010112434.GS21391@hades.hell.gr> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG Giorgos Keramidas wrote: > > 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. You can always wrap the whole thing with a POSIX test, which would dictate the preprocessor support, as well, I think. -- Terry To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message