From patchwork Fri Mar 14 17:48:29 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 330413 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id E14E02C0089 for ; Sat, 15 Mar 2014 04:48:42 +1100 (EST) DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:cc:subject:in-reply-to :references:message-id:date; q=dns; s=default; b=Oaug8qC/RIo2Meh BxclGId5CnnW3PuhXsLCI1u+c2TmJI0oaYwxAgUSpK5oWiL4vtuLHkCMK80iOAI9 IEJQcmEVV46/cD24t+bhjbQki8BdGg1nbOoi8ZxiSC5Gaddz+vU+giGJlGdX05FZ mASIjmLxs29cbtVXmfvCJxOhptLo= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id :list-unsubscribe:list-subscribe:list-archive:list-post :list-help:sender:mime-version:content-type :content-transfer-encoding:from:to:cc:subject:in-reply-to :references:message-id:date; s=default; bh=Kub0CaFOO4lwpX9hPEydz joslso=; b=Tj8W02Iw2tP428kV0wX6l9ZKZWhSLF7uZwHv3K9PkXsA4YTB9lF4O /Atkug6+vMmaibeGgiayBHRMjWKzxHLrorJ/xwPq13mNapnfmvYF8FQ3fxXWOL/o BYgn6LLN5zGefmc9cxTKgthvzEM1C0xXxEPnqysWX75IKDJQIETkYw= Received: (qmail 4303 invoked by alias); 14 Mar 2014 17:48:36 -0000 Mailing-List: contact libc-alpha-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-alpha-owner@sourceware.org Delivered-To: mailing list libc-alpha@sourceware.org Received: (qmail 4084 invoked by uid 89); 14 Mar 2014 17:48:32 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.3 required=5.0 tests=AWL, BAYES_00 autolearn=ham version=3.3.2 X-HELO: topped-with-meat.com MIME-Version: 1.0 From: Roland McGrath To: Thomas Schwinge Cc: "GNU C. Library" Subject: Re: [PATCH roland/Wundef] Compile with -Wundef. In-Reply-To: Thomas Schwinge's message of Monday, 3 March 2014 10:02:51 +0100 <87wqgbmz7o.fsf@kepler.schwinge.homeip.net> References: <20140228232805.1163D744B4@topped-with-meat.com> <87wqgbmz7o.fsf@kepler.schwinge.homeip.net> Message-Id: <20140314174829.5A32974443@topped-with-meat.com> Date: Fri, 14 Mar 2014 10:48:29 -0700 (PDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=Rt9WckWK c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=3kYcMmzvDcgA:10 a=Z6MIti7PxpgA:10 a=8nJEP1OIZ-IA:10 a=hOe2yjtxAAAA:8 a=eRQhzjyONMsdr3j4D0gA:9 a=wPNLvfGTeEIA:10 > > --- a/sysdeps/mach/hurd/i386/tls.h > > +++ b/sysdeps/mach/hurd/i386/tls.h > > @@ -26,6 +26,7 @@ > > /* The TCB can have any size and the memory following the address the > > thread pointer points to is unspecified. Allocate the TCB there. */ > > #define TLS_TCB_AT_TP 1 > > +#define TLS_TCB_AT_TP 0 > > :-) Hmm? (Should that have been TLS_DTV_AT_TP, I think?) Oops. Fixed on the branch. > Also, not relevant for Hurd but for NPTL: don't all »#ifdef > TLS_TCB_AT_TP« need to be adapted now? Most existing cases are #if and all should have been. I've just fixed the two outliers with the patch below. > And, all the instances of »#error "Either TLS_TCB_AT_TP or TLS_DTV_AT_TP > must be defined"« are not longer appropriate in this wording, too. Those are still correct, since they use #if rather than #ifdef (or #elif defined ...) in the tests. Thanks, Roland 2014-03-14 Roland McGrath * nptl/pthread_create.c (__pthread_create_2_1): Test TLS_TCB_AT_TP with #if rather than #ifdef. * nptl/sysdeps/pthread/createthread.c (create_thread): Likewise. --- a/nptl/pthread_create.c +++ b/nptl/pthread_create.c @@ -496,7 +496,7 @@ __pthread_create_2_1 (newthread, attr, start_routine, arg) performed in 'get_cached_stack'. This way we avoid doing this if the stack freshly allocated with 'mmap'. */ -#ifdef TLS_TCB_AT_TP +#if TLS_TCB_AT_TP /* Reference to the TCB itself. */ pd->header.self = pd; --- a/nptl/sysdeps/pthread/createthread.c +++ b/nptl/sysdeps/pthread/createthread.c @@ -147,7 +147,7 @@ static int create_thread (struct pthread *pd, const struct pthread_attr *attr, STACK_VARIABLES_PARMS) { -#ifdef TLS_TCB_AT_TP +#if TLS_TCB_AT_TP assert (pd->header.tcb != NULL); #endif