From owner-freebsd-arch Thu Jan 23 20:34:48 2003 Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id CACB337B405; Thu, 23 Jan 2003 20:34:46 -0800 (PST) Received: from mailman.zeta.org.au (mailman.zeta.org.au [203.26.10.16]) by mx1.FreeBSD.org (Postfix) with ESMTP id 199C343F1E; Thu, 23 Jan 2003 20:34:45 -0800 (PST) (envelope-from bde@zeta.org.au) Received: from katana.zip.com.au (katana.zip.com.au [61.8.7.246]) by mailman.zeta.org.au (8.9.3/8.8.7) with ESMTP id PAA20585; Fri, 24 Jan 2003 15:34:40 +1100 Date: Fri, 24 Jan 2003 15:36:28 +1100 (EST) From: Bruce Evans X-X-Sender: bde@gamplex.bde.org To: Mike Barcroft Cc: Ben Mesander , Warner Losh , Daniel Eischen , Subject: Re: _REENTRANT in math.h & libm oddities. In-Reply-To: <20030123170330.A32279@espresso.q9media.com> Message-ID: <20030124152541.U4363-100000@gamplex.bde.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-freebsd-arch@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG On Thu, 23 Jan 2003, Mike Barcroft wrote: > Ben Mesander writes: > > Ben Mesander writes: > > > But even so, I disagree that the _r function definitions should only > > > appear in math.h if _REENTRANT is defined. That is, I disagree unless > > > the POSIX specification says otherwise; I've been surprised by it > > > before. I was unaware that POSIX mentioned _REENTRANT. > > > > The folks on freebsd-standards said that the defns for the threadsafe > > gamma funcs should be in the BSD namespace (__BSD_VISIBLE). > > I've only been eyeballing this and the other thread, but I think the > conditional we're looking for is: > > #if defined(__BSD_VISIBLE) || (defined(__POSIX_VISIBLE) && defined(_REENTRANT)) > > This provides the reentrant functions in the unencumbered (no standard > specified) namespace and in the POSIX namespace when requested. The gamma_r functions are not in POSIX and neither is _REENTRANT, so the correct conditional is just: #if defined(__BSD_VISIBLE) (unless we add conditions to support Sun standards). Bruce To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-arch" in the body of the message