From owner-freebsd-hackers Tue Mar 12 17:14: 6 2002 Delivered-To: freebsd-hackers@freebsd.org Received: from loquat.bbn.com (crodrigues.bbn.com [128.89.72.49]) by hub.freebsd.org (Postfix) with ESMTP id 21EEF37B402 for ; Tue, 12 Mar 2002 17:13:22 -0800 (PST) Received: (from crodrigu@localhost) by loquat.bbn.com (8.11.2/8.11.2) id g2D1DEj02352; Tue, 12 Mar 2002 20:13:14 -0500 Date: Tue, 12 Mar 2002 20:13:14 -0500 From: Craig Rodrigues To: Alfred Perlstein Cc: freebsd-hackers@FreeBSD.ORG Subject: Re: How to correctly detect POSIX 1003.1b features on FreeBSD? Message-ID: <20020312201314.A2345@bbn.com> References: <20020312140904.A799@bbn.com> <3C8E742C.7C2E63B8@mindspring.com> <20020312193514.A2226@bbn.com> <20020313005940.GB32410@elvis.mu.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i In-Reply-To: <20020313005940.GB32410@elvis.mu.org>; from bright@mu.org on Tue, Mar 12, 2002 at 04:59:40PM -0800 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 On Tue, Mar 12, 2002 at 04:59:40PM -0800, Alfred Perlstein wrote: > * Craig Rodrigues [020312 16:35] wrote: > > > > Can someone tell me how I can detect if these functions are available > > on a system at compile time? I cannot use an autoconf type of test, > > and need to use a preprocessor macro type of test. > > __FreeBSD__version. How about giving me useful information, instead of incomplete hints? I already have some code which does: #if (__FreeBSD_version > 440000) /* Do some stuff which uses sigqueue(), sigwaitinfo(), sigtimedwait() */ #endif That test is broken, because it does work on FreeBSD 4.5 (and probably won't work on 4.6, 4.7, etc.). Is there a version of FreeBSD where sigqueue(), sigwaitinfo(), and sigtimedwait() are available by default? If so, what is this version, and what is the correct value of __FreeBSD_version to check for? If someone goes and re-configures their kernel or libc to contain these functions, will a new preprocessor macro value be defined that I can detect? -- Craig Rodrigues Distributed Systems and Logistics, Office 6/304 crodrigu@bbn.com BBN Technologies, a Verizon company (617) 873-4725 Cambridge, MA To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-hackers" in the body of the message