From patchwork Sat Jun 21 03:08:21 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Roland McGrath X-Patchwork-Id: 362406 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 4C1B414008B for ; Sat, 21 Jun 2014 13:08:39 +1000 (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:subject:message-id:date; q= dns; s=default; b=BwgaofWfXWbZZ3XpJpiZvJgdPFdFcueWU6hfE6Rh4fk/cA P/hch4gokdVpGFKa4jGst+E+Zwo8tymguN3MxjN8083h+SAu578mQ4I9zgxemwrQ sSkvACTJqL/KGDQER+FPwjGEW8DbPtzJV4sDqsiMjG1xxJIM58M8wTe25+Qjc= 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=rshtaPRFPy4gctkf53q7ESKInYM=; b=aqhKJ9e3FKHkcNSk/pp+ 62VnTrzUx54kURvC6XKyiJaM1xnGi3kKNaBtoUzi6Ivo62NwKGyd++xvt4kAA5ob 8XjxI7yjTlwi7pnHLrSvBcwmwheuX48p253qsHmm3AmWStPYdlsKSjruSQRTFmIw xFfc/+92a++iCrahV7RBCkk= Received: (qmail 25233 invoked by alias); 21 Jun 2014 03:08:31 -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 25166 invoked by uid 89); 21 Jun 2014 03:08:25 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-2.2 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] Clean up HAVE_CONFIG_H and STDC_HEADERS. Message-Id: <20140621030821.4A95A2C39A8@topped-with-meat.com> Date: Fri, 20 Jun 2014 20:08:21 -0700 (PDT) X-CMAE-Score: 0 X-CMAE-Analysis: v=2.1 cv=SvUDtp+0 c=1 sm=1 tr=0 a=WkljmVdYkabdwxfqvArNOQ==:117 a=14OXPxybAAAA:8 a=NkeVlbCKM3YA:10 a=Z6MIti7PxpgA:10 a=kj9zAlcOel0A:10 a=hOe2yjtxAAAA:8 a=NmP5UBwMpsNLt9bscvcA:9 a=CjuIK1q_8ugA:10 This change gets rid of -Wundef warnings for these two macros. Verified on x86_64-linux-gnu and i686-linux-gnu that no code changes. * include/libc-symbols.h (HAVE_CONFIG_H, STDC_HEADERS): New macros. * catgets/Makefile (catgets-CPPFLAGS): Remove -DHAVE_CONFIG_H. * locale/Makefile (CPPFLAGS-locale-programs): Likewise. * stdlib/strtol_l.c [_LIBC] (STDC_HEADERS): Don't define it. --- a/catgets/Makefile +++ b/catgets/Makefile @@ -46,8 +46,7 @@ include ../Rules $(objpfx)gencat: $(gencat-modules:%=$(objpfx)%.o) -catgets-CPPFLAGS := -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"' \ - -DHAVE_CONFIG_H +catgets-CPPFLAGS := -DNLSPATH='"$(msgcatdir)/%L/%N:$(msgcatdir)/%L/LC_MESSAGES/%N:$(msgcatdir)/%l/%N:$(msgcatdir)/%l/LC_MESSAGES/%N:"' CPPFLAGS-gencat = -DNOT_IN_libc --- a/include/libc-symbols.h +++ b/include/libc-symbols.h @@ -48,6 +48,19 @@ #include +/* Define this for the benefit of portable GNU code that wants to check it. + Code that checks with #if will not #include again, since we've + already done it (and this file is implicitly included in every compile, + via -include). Code that checks with #ifdef will #include , + but that file should always be idempotent (i.e., it's just #define/#undef + and nothing else anywhere should be changing the macro state it touches), + so it's harmless. */ +#define HAVE_CONFIG_H 0 + +/* Define this for the benefit of portable GNU code that wants to check it. + Of course, it's never false when building libc! */ +#define STDC_HEADERS 1 + /* The symbols in all the user (non-_) macros are C symbols. */ #if !defined HAVE_ASM_WEAK_DIRECTIVE && !defined HAVE_ASM_WEAKEXT_DIRECTIVE --- a/locale/Makefile +++ b/locale/Makefile @@ -89,7 +89,7 @@ CPPFLAGS-locale-programs = -DLOCALE_PATH='$(localepath)' \ -DCHARMAP_PATH='"$(i18ndir)/charmaps"' \ -DREPERTOIREMAP_PATH='"$(i18ndir)/repertoiremaps"' \ -DLOCSRCDIR='"$(i18ndir)/locales"' \ - -DHAVE_CONFIG_H -DNOT_IN_libc + -DNOT_IN_libc CFLAGS-charmap.c = -Wno-write-strings -Wno-char-subscripts CFLAGS-locfile.c = -Wno-write-strings -Wno-char-subscripts --- a/stdlib/strtol_l.c +++ b/stdlib/strtol_l.c @@ -24,7 +24,6 @@ #ifdef _LIBC # define USE_NUMBER_GROUPING -# define STDC_HEADERS # define HAVE_LIMITS_H #endif