From patchwork Mon Mar 17 12:23:18 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Will Newton X-Patchwork-Id: 26349 Return-Path: X-Original-To: linaro@patches.linaro.org Delivered-To: linaro@patches.linaro.org Received: from mail-pd0-f197.google.com (mail-pd0-f197.google.com [209.85.192.197]) by ip-10-151-82-157.ec2.internal (Postfix) with ESMTPS id 2D43B202FA for ; Mon, 17 Mar 2014 12:23:52 +0000 (UTC) Received: by mail-pd0-f197.google.com with SMTP id fp1sf13357353pdb.8 for ; Mon, 17 Mar 2014 05:23:51 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:delivered-to:mailing-list :precedence:list-id:list-unsubscribe:list-subscribe:list-archive :list-post:list-help:sender:delivered-to:from:to:subject:date :message-id:x-original-sender:x-original-authentication-results; bh=OvZxrTH/4IFIYDe8Zeij2llbH5AigxZxdjfi8O2x+M8=; b=mcaOa8wRC8ay/Xf3R697q8nhOunKivZy05h1YxzqpS4NEU03dFF6JNlyk7LxIOvAf0 4u0m0MGZLCAWY8Ewj4+aB4sTjwvniZF1CZFxJFbCxWsrQLcZiFUQS7XGvOdyFnsBNGtj /7Kc1U5kwojvMzF2YCFenrwrYdAuRkVtKnsNLJRvZhzQCxyD7TKf/zdxW+3PWXBeIo47 O6BgneQOKddz9tlNHpKTRYkJsA+oOeFaYirbhePsxnFN8j+gmRboviwhpxjb/JCtbDOk Bt3sDW3oDRJjHCLs5Wbl2YAEu7L9VLbYS0aMBAJPfoCfhZZ3KbUutNI+mzA02UWr1rh/ x6Pw== X-Gm-Message-State: ALoCoQnssq/JNu58Hk7HwWAeW4wqMe4eJ3fNyANXaICzcbNriKkaiEloTSO1t5ii9QvFVY0Y6KXz X-Received: by 10.66.122.69 with SMTP id lq5mr9414101pab.17.1395059031332; Mon, 17 Mar 2014 05:23:51 -0700 (PDT) MIME-Version: 1.0 X-BeenThere: patchwork-forward@linaro.org Received: by 10.140.81.17 with SMTP id e17ls988186qgd.55.gmail; Mon, 17 Mar 2014 05:23:51 -0700 (PDT) X-Received: by 10.52.250.236 with SMTP id zf12mr16664945vdc.9.1395059031210; Mon, 17 Mar 2014 05:23:51 -0700 (PDT) Received: from mail-vc0-x234.google.com (mail-vc0-x234.google.com [2607:f8b0:400c:c03::234]) by mx.google.com with ESMTPS id us10si5187518vcb.59.2014.03.17.05.23.51 for (version=TLSv1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 17 Mar 2014 05:23:51 -0700 (PDT) Received-SPF: neutral (google.com: 2607:f8b0:400c:c03::234 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) client-ip=2607:f8b0:400c:c03::234; Received: by mail-vc0-f180.google.com with SMTP id lf12so5489200vcb.25 for ; Mon, 17 Mar 2014 05:23:51 -0700 (PDT) X-Received: by 10.52.30.230 with SMTP id v6mr16569779vdh.6.1395059031102; Mon, 17 Mar 2014 05:23:51 -0700 (PDT) X-Forwarded-To: patchwork-forward@linaro.org X-Forwarded-For: patch@linaro.org patchwork-forward@linaro.org Delivered-To: patch@linaro.org Received: by 10.220.78.9 with SMTP id i9csp123152vck; Mon, 17 Mar 2014 05:23:50 -0700 (PDT) X-Received: by 10.68.2.99 with SMTP id 3mr25734460pbt.49.1395059030223; Mon, 17 Mar 2014 05:23:50 -0700 (PDT) Received: from sourceware.org (server1.sourceware.org. [209.132.180.131]) by mx.google.com with ESMTPS id se7si10295621pbb.310.2014.03.17.05.23.49 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Mon, 17 Mar 2014 05:23:50 -0700 (PDT) Received-SPF: pass (google.com: domain of libc-alpha-return-48209-patch=linaro.org@sourceware.org designates 209.132.180.131 as permitted sender) client-ip=209.132.180.131; Received: (qmail 18761 invoked by alias); 17 Mar 2014 12:23:38 -0000 Mailing-List: list patchwork-forward@linaro.org; contact patchwork-forward+owners@linaro.org Precedence: list 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 18721 invoked by uid 89); 17 Mar 2014 12:23:34 -0000 X-Virus-Found: No X-Spam-SWARE-Status: No, score=-1.7 required=5.0 tests=AWL, BAYES_00, RCVD_IN_DNSWL_LOW, SPF_PASS autolearn=ham version=3.3.2 X-HELO: mail-we0-f177.google.com X-Received: by 10.180.12.14 with SMTP id u14mr9710794wib.0.1395059009607; Mon, 17 Mar 2014 05:23:29 -0700 (PDT) From: Will Newton To: libc-alpha@sourceware.org Subject: [PATCH 1/7] Fix __PTHREAD_MUTEX_HAVE_ELISION -Wundef warning Date: Mon, 17 Mar 2014 12:23:18 +0000 Message-Id: <1395059004-20960-1-git-send-email-will.newton@linaro.org> X-Original-Sender: will.newton@linaro.org X-Original-Authentication-Results: mx.google.com; spf=neutral (google.com: 2607:f8b0:400c:c03::234 is neither permitted nor denied by best guess record for domain of patch+caf_=patchwork-forward=linaro.org@linaro.org) smtp.mail=patch+caf_=patchwork-forward=linaro.org@linaro.org; dkim=pass header.i=@sourceware.org X-Google-Group-Id: 836684582541 ChangeLog: 2014-03-17 Will Newton * nptl/sysdeps/pthread/pthread.h: Check __PTHREAD_MUTEX_HAVE_ELISION is defined before testing its value. --- nptl/sysdeps/pthread/pthread.h | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/nptl/sysdeps/pthread/pthread.h b/nptl/sysdeps/pthread/pthread.h index 1e0c5dc..142da63 100644 --- a/nptl/sysdeps/pthread/pthread.h +++ b/nptl/sysdeps/pthread/pthread.h @@ -83,12 +83,16 @@ enum /* Mutex initializers. */ -#if __PTHREAD_MUTEX_HAVE_ELISION == 1 /* 64bit layout. */ -#define __PTHREAD_SPINS 0, 0 -#elif __PTHREAD_MUTEX_HAVE_ELISION == 2 /* 32bit layout. */ -#define __PTHREAD_SPINS { 0, 0 } +#ifdef __PTHREAD_MUTEX_HAVE_ELISION +# if __PTHREAD_MUTEX_HAVE_ELISION == 1 /* 64bit layout. */ +# define __PTHREAD_SPINS 0, 0 +# elif __PTHREAD_MUTEX_HAVE_ELISION == 2 /* 32bit layout. */ +# define __PTHREAD_SPINS { 0, 0 } +# else +# error "Unknown value of __PTHREAD_MUTEX_HAVE_ELISION" +# endif #else -#define __PTHREAD_SPINS 0 +# define __PTHREAD_SPINS 0 #endif #ifdef __PTHREAD_MUTEX_HAVE_PREV