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: 91 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx22.g.dreamhost.com (caibbdcaabij.dreamhost.com [208.113.200.189]) by wilcox.dreamhost.com (Postfix) with ESMTP id 80AE536007D for ; Fri, 14 Mar 2014 10:48:40 -0700 (PDT) Received: by homiemail-mx22.g.dreamhost.com (Postfix, from userid 14307373) id 2BBC84F8D54C; Fri, 14 Mar 2014 10:48:40 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx22.g.dreamhost.com 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 homiemail-mx22.g.dreamhost.com (Postfix) with ESMTPS id 050294F89EF9 for ; Fri, 14 Mar 2014 10:48:39 -0700 (PDT) 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=rKP4Z0Y7Jrykib4 fMDoHdNltjKV/anrbb+1P1Msf5fh0pjpGXnPo6Jb4HMzu5un+iMshP9+JaxHOfGm hYy6rQjBho4kuC2xg31Na9bJhsI5TGaRIdcf7HHNNmkr2y03lVHIxLX/su67w67f 7NDLIwxhVg9WtAcdVJndMeuPJrbE= 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=OI6Hh1m35H5N3ZrDbRKF0f7JE5T5/G2qvNmrhRqiELoNFm6z/Rvok 760V1nI4ytIqtGY1H6OWftIKG9vfvBWDz8JUyWsBZQxbJ2nQZ2vY9IAf2LdbZdlo JDnSzlhdcSEJM5pxI7CfcKWVzwTuvD/nUocJQMGZBu/+gVInfwmGDA= 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 X-DH-Original-To: glibc@patchwork.siddhesh.in > > --- 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