Date: Fri, 24 Jan 2003 15:36:28 +1100 (EST) From: Bruce Evans <bde@zeta.org.au> To: Mike Barcroft <mike@FreeBSD.ORG> Cc: Ben Mesander <ben@timing.com>, Warner Losh <imp@harmony.village.org>, Daniel Eischen <eischen@pcnet1.pcnet.com>, <freebsd-arch@FreeBSD.ORG> Subject: Re: _REENTRANT in math.h & libm oddities. Message-ID: <20030124152541.U4363-100000@gamplex.bde.org> In-Reply-To: <20030123170330.A32279@espresso.q9media.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 23 Jan 2003, Mike Barcroft wrote: > Ben Mesander <ben@timing.com> 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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030124152541.U4363-100000>