From patchwork Mon May 5 20:07:01 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 806 Return-Path: X-Original-To: siddhesh@wilcox.dreamhost.com Delivered-To: siddhesh@wilcox.dreamhost.com Received: from homiemail-mx21.g.dreamhost.com (peon2454.g.dreamhost.com [208.113.200.127]) by wilcox.dreamhost.com (Postfix) with ESMTP id CC7FF360076 for ; Mon, 5 May 2014 13:07:07 -0700 (PDT) Received: by homiemail-mx21.g.dreamhost.com (Postfix, from userid 14307373) id 4F9821A4D50E; Mon, 5 May 2014 13:07:07 -0700 (PDT) X-Original-To: glibc@patchwork.siddhesh.in Delivered-To: x14307373@homiemail-mx21.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-mx21.g.dreamhost.com (Postfix) with ESMTPS id 9FCB91A730A5 for ; Mon, 5 May 2014 13:07:06 -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:subject:message-id:date; q= dns; s=default; b=wXHRGEW80nvASsXRVWUrFF2BX34iTRk8v3isMS7gEsYZ59 pLuq2n9D8YikQPplRPrh3X6RATC2jZpHeOcURGzoDWOdLMr4rZ5/DQy5IeJN8Ue2 0DDoWXqMM0XoDGOOAM4JAw01XRED/ba5h8+xb/bC3qpANDEBGLSGDr03eBZR8= 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:subject:message-id:date; s= default; bh=gvgv+Gyiv3VaZ+kiTcmQ+vaQMzo=; b=Q8wTFEP/gfI8i+1KSNwS UxnmHT7bwRihpA9BXjtPf2aJh+SXuZijAlznKtIGR0FtxV9ANjJmJaLHANOIIu0e 7ippxxhDQQEemoowTq2mwglgOEYH51XSKxLVo24224NqIHzyPGSDBvPTvov2nWwV dmSmen499nNDZ2zK38qhuL8= Received: (qmail 2886 invoked by alias); 5 May 2014 20:07:04 -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 2876 invoked by uid 89); 5 May 2014 20:07:04 -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: "GNU C. Library" Subject: [COMMITTED PATCH] Fix -Wundef issues in generated errlist.c. Message-Id: <20140505200701.7367B2C39CB@topped-with-meat.com> Date: Mon, 5 May 2014 13:07:01 -0700 (PDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=J405smXS c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=EWH_HJFbW9wA:10 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=6LYCDgQH0xm3IxB6w70A:9 a=CjuIK1q_8ugA:10 X-DH-Original-To: glibc@patchwork.siddhesh.in 2014-05-05 Roland McGrath * sysdeps/gnu/errlist.awk (BEGIN): Emit an initial #define of ERR_MAX to 0, so the first #if test emitted later doesn't see it undefined. (END): Emit "!defined ERRLIST_NO_COMPAT" to match what BEGIN does. * sysdeps/gnu/errlist.c: Regenerated. --- a/sysdeps/gnu/errlist.awk +++ b/sysdeps/gnu/errlist.awk @@ -52,6 +52,7 @@ BEGIN { print "#ifdef ERR_MAX"; print "# define ERRLIST_SIZE ERR_MAX + 1"; print "#else" + print "# define ERR_MAX 0"; print "# define ERRLIST_SIZE"; print "#endif"; @@ -109,7 +110,7 @@ END { print " (sizeof _sys_errlist_internal / sizeof _sys_errlist_internal [0])"; print "const int _sys_nerr_internal = NERR;" print ""; - print "#if !defined NOT_IN_libc && !ERRLIST_NO_COMPAT"; + print "#if !defined NOT_IN_libc && !defined ERRLIST_NO_COMPAT"; print "# include "; print "#endif"; print ""; --- a/sysdeps/gnu/errlist.c +++ b/sysdeps/gnu/errlist.c @@ -13,6 +13,7 @@ #ifdef ERR_MAX # define ERRLIST_SIZE ERR_MAX + 1 #else +# define ERR_MAX 0 # define ERRLIST_SIZE #endif const char *const _sys_errlist_internal[ERRLIST_SIZE] = @@ -1479,7 +1480,7 @@ TRANS error; @pxref{Cancel AIO Operations}. */ (sizeof _sys_errlist_internal / sizeof _sys_errlist_internal [0]) const int _sys_nerr_internal = NERR; -#if !defined NOT_IN_libc && !ERRLIST_NO_COMPAT +#if !defined NOT_IN_libc && !defined ERRLIST_NO_COMPAT # include #endif