From owner-freebsd-hackers@FreeBSD.ORG Thu Nov 8 20:43:33 2012 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C137269C for ; Thu, 8 Nov 2012 20:43:33 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-lb0-f182.google.com (mail-lb0-f182.google.com [209.85.217.182]) by mx1.freebsd.org (Postfix) with ESMTP id 38CB58FC0C for ; Thu, 8 Nov 2012 20:43:33 +0000 (UTC) Received: by mail-lb0-f182.google.com with SMTP id b5so3206761lbd.13 for ; Thu, 08 Nov 2012 12:43:32 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=eitanadler.com; s=0xdeadbeef; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type; bh=iISXg8A31/USBXXae/XQt24yPGdpfZ61fQ13Vn7F2QQ=; b=Ooi8NG2jdQtDEvXrukLx76ToqkTk0i2A/CqjpuL/Zfi0nUTMlXeGhp9QlLTdPxHlsi AjH9M6muI77W1zG2usQQajbgLImeOyqxPBMiBszJW8bcWYGS/LajpB+dUxEGytP+EMYx KbiRO932dfd9u/c12EGzbkDbIkqcc3OCQa/RE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :content-type:x-gm-message-state; bh=iISXg8A31/USBXXae/XQt24yPGdpfZ61fQ13Vn7F2QQ=; b=Dbro4qWrBApNYOyL0M2OYzQGHkxiuiEm7I6dUEDqIqHapd5AzIQ3VM8ZRYfxIg015N Hka9D84xmEHOf6ikhwBxp/tsTGnxhUs49k/P43f0yMyYtoZTZqIbVkAgnfEz+MJZ9TvV LNf9oKEJR6BRHDSmSWlkhqp4310A6st/suwmgbnEegjKYeKwp2tjLzt2KHRa69DC+NZo fpFrzXUsMTxX56FO+bMoQ/8IcSNnaNZGTd0ls6EnFYzKmJ3LoAR4L+g9EgHS4KW4xL1P MyNdwDeN/7Ys0MAc7qrZ0+uaEMxUu+QcW4wRWSGGTG7jVpuHdJwYm6kC0oh+OXT12kaE kn/A== Received: by 10.152.131.200 with SMTP id oo8mr8641823lab.34.1352407412198; Thu, 08 Nov 2012 12:43:32 -0800 (PST) MIME-Version: 1.0 Received: by 10.112.25.166 with HTTP; Thu, 8 Nov 2012 12:43:01 -0800 (PST) In-Reply-To: References: From: Eitan Adler Date: Thu, 8 Nov 2012 15:43:01 -0500 Message-ID: Subject: Re: -lpthread vs -pthread: does -D_REENTRANT matter? To: FreeBSD Hackers Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQnrOQQyrfwlFpNPyOMOHaPvmSljc97R0F8yFwTpQv8O7X7tZPDvJrarDy5vOghUrlHrgVLj X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Nov 2012 20:43:33 -0000 On 8 October 2012 12:17, Eitan Adler wrote: > The only difference between -lpthread and -pthread that I could see is > that the latter also sets -D_REENTRANT. > However, I can't find any uses of _REENTRANT anywhere outside of a few > utilities that seem to define it manually. > > Testing with various manually written pthread programs resulted in > identical binaries, let alone identical results. > > Is there an actual difference between -pthread and -lpthread or is > this just a historical artifact? does anyone know the answer to this question? I've been experimenting but can't find a difference at all. -- Eitan Adler