From owner-freebsd-hackers Wed Jun 27 5:15:19 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from pcnet1.pcnet.com (pcnet1.pcnet.com [204.213.232.3]) by hub.freebsd.org (Postfix) with ESMTP id 1BDEB37B406 for ; Wed, 27 Jun 2001 05:15:13 -0700 (PDT) (envelope-from eischen@vigrid.com) Received: (from eischen@localhost) by pcnet1.pcnet.com (8.8.7/PCNet) id IAA11817; Wed, 27 Jun 2001 08:14:28 -0400 (EDT) Date: Wed, 27 Jun 2001 08:14:28 -0400 (EDT) From: Daniel Eischen To: Will Andrews Cc: David Petrou , freebsd-hackers@FreeBSD.ORG Subject: Re: what #define for thread-safeness? In-Reply-To: <20010627050121.B97456@bohr.physics.purdue.edu> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 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