From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28290 invoked by alias); 7 Dec 2004 21:03:57 -0000 Mailing-List: contact libc-hacker-help@sources.redhat.com; run by ezmlm Precedence: bulk List-Subscribe: List-Archive: List-Post: List-Help: , Sender: libc-hacker-owner@sources.redhat.com Received: (qmail 28267 invoked from network); 7 Dec 2004 21:03:56 -0000 Received: from unknown (HELO sunsite.mff.cuni.cz) (195.113.15.26) by sourceware.org with SMTP; 7 Dec 2004 21:03:56 -0000 Received: from sunsite.mff.cuni.cz (sunsite.mff.cuni.cz [127.0.0.1]) by sunsite.mff.cuni.cz (8.13.1/8.13.1) with ESMTP id iB7L3qsf005477; Tue, 7 Dec 2004 22:03:52 +0100 Received: (from jj@localhost) by sunsite.mff.cuni.cz (8.13.1/8.13.1/Submit) id iB7L3pHl005472; Tue, 7 Dec 2004 22:03:51 +0100 Date: Tue, 07 Dec 2004 21:03:00 -0000 From: Jakub Jelinek To: Roland McGrath Cc: Ulrich Drepper , Glibc hackers Subject: [PATCH] Shut up a warning in sysconf.c (take 2) Message-ID: <20041207210351.GF5149@sunsite.mff.cuni.cz> Reply-To: Jakub Jelinek References: <20041207204807.GE5149@sunsite.mff.cuni.cz> <200412072054.iB7KsXD4014962@magilla.sf.frob.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200412072054.iB7KsXD4014962@magilla.sf.frob.com> User-Agent: Mutt/1.4.1i X-SW-Source: 2004-12/txt/msg00031.txt.bz2 On Tue, Dec 07, 2004 at 12:54:33PM -0800, Roland McGrath wrote: > Can you replace that repeated #if mess with just one that defines a single > macro for the other to test? Sure. I was too lazy, sorry. 2004-12-07 Jakub Jelinek * sysdeps/posix/sysconf.c (__sysconf_check_spec): Only define if it will be actually used. --- libc/sysdeps/posix/sysconf.c.jj 2004-12-06 12:44:16.000000000 +0100 +++ libc/sysdeps/posix/sysconf.c 2004-12-07 22:01:24.312738283 +0100 @@ -34,7 +34,14 @@ #include +#define NEED_CHECK_SPEC \ + (!defined _XBS5_ILP32_OFF32 || !defined _XBS5_ILP32_OFFBIG \ + || !defined _XBS5_LP64_OFF64 || !defined _XBS5_LPBIG_OFFBIG \ + || !defined _POSIX_V6_ILP32_OFF32 || !defined _POSIX_V6_ILP32_OFFBIG \ + || !defined _POSIX_V6_LP64_OFF64 || !defined _POSIX_V6_LPBIG_OFFBIG) +#if NEED_CHECK_SPEC static long int __sysconf_check_spec (const char *spec); +#endif /* Get the value of the system variable NAME. */ @@ -1210,6 +1217,7 @@ __sysconf (name) weak_alias (__sysconf, sysconf) libc_hidden_def (__sysconf) +#if NEED_CHECK_SPEC static long int __sysconf_check_spec (const char *spec) { @@ -1230,3 +1238,4 @@ __sysconf_check_spec (const char *spec) __set_errno (save_errno); return ret; } +#endif Jakub