Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 27 Jun 2001 08:14:28 -0400 (EDT)
From:      Daniel Eischen <eischen@vigrid.com>
To:        Will Andrews <will@physics.purdue.edu>
Cc:        David Petrou <dpetrou@cs.cmu.edu>, freebsd-hackers@FreeBSD.ORG
Subject:   Re: what #define for thread-safeness?
Message-ID:  <Pine.SUN.3.91.1010627081043.11414A-100000@pcnet1.pcnet.com>
In-Reply-To: <20010627050121.B97456@bohr.physics.purdue.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
On Wed, 27 Jun 2001, Will Andrews wrote:
> On Tue, Jun 26, 2001 at 11:43:02PM -0400, David Petrou (dpetrou@cs.cmu.edu) wrote:
> > Hi.  On linux, I know that when compiling threaded code I need to
> > #define _REENTRANT.  What's the right thing to do on FreeBSD?  I've
> > searched around the FreeBSD pages and have come up empty.  I googled
> > around and found a post from a Mozilla page recommending I #define
> > _THREAD_SAFE.  I'd just like an authoratative answer so I don't get
> > bit by some weirdness down the line.
> 
> -D_THREAD_SAFE is right.  FreeBSD uses it in the ports collection.

This is (kinda) needed for -stable, but has no effect in -current.  When
-current libc/libc_r stuff is merged to -stable, _THREAD_SAFE will go 
bye-bye.  If we need a thread safety flag in the future, it should
be _REENTRANT.

-- 
Dan Eischen

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?Pine.SUN.3.91.1010627081043.11414A-100000>