This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [WIP] Fix HAVE_CONFIG_H -Wundef warnings.
- From: "Carlos O'Donell" <carlos at redhat dot com>
- To: Will Newton <will dot newton at linaro dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Roland McGrath <roland at hack dot frob dot com>
- Date: Fri, 02 May 2014 04:36:41 -0400
- Subject: Re: [WIP] Fix HAVE_CONFIG_H -Wundef warnings.
- Authentication-results: sourceware.org; auth=none
- References: <5363562D dot 6030902 at redhat dot com> <CANu=Dmi8ce2zyto7Sv+Z-WB8yyf9n1CmAz8CK+tFC0UnG2451g at mail dot gmail dot com>
On 05/02/2014 04:28 AM, Will Newton wrote:
> On 2 May 2014 09:24, Carlos O'Donell <carlos@redhat.com> wrote:
>
> Hi Carlos,
>
>> Is fixing the HAVE_CONFIG_H -Wundef warnings as easy as this?
>>
>> diff --git a/Makeconfig b/Makeconfig
>> index f965398..64b64fc 100644
>> --- a/Makeconfig
>> +++ b/Makeconfig
>> @@ -1081,6 +1081,9 @@ endif
>> sysd-rules-targets := $(sort $(foreach p,$(sysd-rules-patterns),\
>> $(firstword $(subst :, ,$p))))
>>
>> +# We always configure glibc such that config.h is available.
>> +defines += -DHAVE_CONFIG_H=1
>> +
>> # A sysdeps Makeconfig fragment may set libc-reentrant to yes.
>> ifeq (yes,$(libc-reentrant))
>> defines += -D_LIBC_REENTRANT
>> ---
>>
>> Followed by the mechanical change of all the `#idfef HAVE_CONFIG_H`
>> to `#if HAVE_CONFIG_H`.
>>
>> Then verify the built binaries are identical and pass the testsuite?
>>
>> We always create a config.h for glibc so this looks correct.
>>
>> I don't want to waste my time fixing all of this if I've got it wrong.
>
> A reasonable number of these are from files shared with gnulib. The
> gnulib versions of the files have in some cases switched to use
> #ifndef _LIBC instead of #if HAVE_CONFIG_H but I haven't delved into
> why that is yet.
I can ignore the gnulib files, thanks to your nice list, and I can
change only glibc ones to use `#if HAVE_CONFIG_H`, but still define
`-DHAVE_CONFIG_H=1`, that way we're ready for the gnulib update.
I've been looking at the gettext update today, but it's more work
than I have time for right now (repeating myself today).
Cheers,
Carlos.