From owner-freebsd-hackers@FreeBSD.ORG Sun Oct 14 20:55:38 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 4A61CF8 for ; Sun, 14 Oct 2012 20:55:38 +0000 (UTC) (envelope-from lists@eitanadler.com) Received: from mail-pb0-f54.google.com (mail-pb0-f54.google.com [209.85.160.54]) by mx1.freebsd.org (Postfix) with ESMTP id 10FE48FC0A for ; Sun, 14 Oct 2012 20:55:37 +0000 (UTC) Received: by mail-pb0-f54.google.com with SMTP id rp8so4597923pbb.13 for ; Sun, 14 Oct 2012 13:55:37 -0700 (PDT) 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 :cc:content-type; bh=m5rzsz88BPSza7kF+Hk4yrimrNG5v3EejbNq2dBx7es=; b=UlPxpIUQD0EggJ3kfIa3eIPiOB+3qojUq7OM+/VOT98BLpoeI1rS+VUHd3WywML9Or ON/X/pKMJQePHrW3pqarsY6UR2YnBlNmqnRE7ehzvaPy3pnBChqEfTqxeIpJIgQ12M8y 21tUIDELLoh28kQL3j8VwVJuWLm/3s9qltIcs= 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 :cc:content-type:x-gm-message-state; bh=m5rzsz88BPSza7kF+Hk4yrimrNG5v3EejbNq2dBx7es=; b=JgJ9zEnsx89t5ONVEpjiaRpCUu1tljb/jBSzeoa3/o5KPtDGt8f6V6yrOw4EIeZaf9 SY3i2V1BXej3hvVJiwlHNXjj6iOgWDwsMB6bYT4kNThhmeRtLdfQp/OqP3Fp16JEhVb7 WBrcFf+yEmq6FuLfGKuzhD9CzymsGpOZgiBh35r3UWwLrc8Ij0Xpb8x7nm3saaPZj1Bw UEM8f0QZ1wH/wL5ARgZmnXO8SkkCTtmBJMuWERV8gXos0u3fqU03lTOX+wWfjXTjzMxp Z6BXlHKpOLurXQH03vbJhquKzRv/zeA6nKSOHrhHkWanNPePkQtm7f/igeMInu1LK3Fu p55Q== Received: by 10.66.79.65 with SMTP id h1mr3521393pax.71.1350248137633; Sun, 14 Oct 2012 13:55:37 -0700 (PDT) MIME-Version: 1.0 Received: by 10.66.161.163 with HTTP; Sun, 14 Oct 2012 13:55:07 -0700 (PDT) In-Reply-To: <20121014144222.GA14503@stack.nl> References: <20121014144222.GA14503@stack.nl> From: Eitan Adler Date: Sun, 14 Oct 2012 16:55:07 -0400 Message-ID: Subject: Re: -lpthread vs -pthread: does -D_REENTRANT matter? To: Jilles Tjoelker Content-Type: text/plain; charset=UTF-8 X-Gm-Message-State: ALoCoQmCW4h+CBQAn5jRCVajiVFxci0rTxP/zLIaKNTRozenTyZw6/pL9KCDgSIJ36OHZitDahdF Cc: FreeBSD Hackers 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: Sun, 14 Oct 2012 20:55:38 -0000 On 14 October 2012 10:42, Jilles Tjoelker wrote: > Because C99 does not specify threading, it allows these transformations. > In C11, they are forbidden. Passing -pthread disables them as well. Is the man page wrong or do I misunderstand? This option sets flags for both the preprocessor and linker. It does not affect the thread safety of object code produced by the compiler or that of libraries supplied with it. -- Eitan Adler