From owner-freebsd-ports@FreeBSD.ORG Wed Feb 11 10:58:48 2004 Return-Path: Delivered-To: freebsd-ports@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 52BD916A4CE for ; Wed, 11 Feb 2004 10:58:48 -0800 (PST) Received: from smtpout.mac.com (A17-250-248-88.apple.com [17.250.248.88]) by mx1.FreeBSD.org (Postfix) with ESMTP id 4C8EE43D31 for ; Wed, 11 Feb 2004 10:58:48 -0800 (PST) (envelope-from cswiger@mac.com) Received: from mac.com (smtpin08-en2 [10.13.10.153]) by smtpout.mac.com (Xserve/MantshX 2.0) with ESMTP id i1BIwla1028761; Wed, 11 Feb 2004 10:58:47 -0800 (PST) Received: from [10.1.1.193] (nfw2.codefab.com [66.234.138.66]) (authenticated bits=0) by mac.com (Xserve/smtpin08/MantshX 3.0) with ESMTP id i1BIwkVB023888; Wed, 11 Feb 2004 10:58:47 -0800 (PST) In-Reply-To: <20040211151107.9CD75172@toad.stack.nl> References: <20040211151107.9CD75172@toad.stack.nl> Mime-Version: 1.0 (Apple Message framework v612) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <51E262FE-5CC4-11D8-A5C2-003065ABFD92@mac.com> Content-Transfer-Encoding: 7bit From: Charles Swiger Date: Wed, 11 Feb 2004 13:58:46 -0500 To: marcov@stack.nl (Marco van de Voort) X-Mailer: Apple Mail (2.612) cc: freebsd-ports@freebsd.org Subject: Re: How to determine which pthread, was: Re: last libc_rdependenciesleft on current X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 Feb 2004 18:58:48 -0000 On Feb 11, 2004, at 10:11 AM, Marco van de Voort wrote: > What does the -D_THREAD_SAFE mean? (I mean does it mean that libc isn't > thread safe, that it is thread_safe etc etc, or does it interact with > the > C code that is being compiled (the port)) libc generally isn't thread safe. libc_r (or libpthread, or whatever the end result of the current shakeup will be called), is thread-safe. The reason for that define is so that the C code you're working on (or building via a port) can do different things depending on whether it will be single-threaded or whether it needs to be thread-safe. For example, your code might allocate and use mutexes if -D_THREAD_SAFE is defined... -- -Chuck