bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: _GL_INLINE_HEADER_BEGIN/END left behind


From: Eric Blake
Subject: Re: _GL_INLINE_HEADER_BEGIN/END left behind
Date: Wed, 28 Aug 2013 17:03:11 -0600
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:17.0) Gecko/20130805 Thunderbird/17.0.8

On 08/28/2013 04:55 PM, Eric Blake wrote:
> On 08/28/2013 04:50 PM, Bruce Korb wrote:
>> The compile error message:
>>
>>> gcc -std=gnu99 -DHAVE_CONFIG_H -I. -I..  -I../lib -I../src -I../lib
>>> -I../libopts \
>>>   -I../libopts   -g -O2 -MT pw-pw.o -MD -MP -MF .deps/pw-pw.Tpo \
>>>   -c -o pw-pw.o `test -f 'pw.c' || echo './'`pw.c
>>> In file included from pw.h:47:0,
>>>                  from pw.c:20:
>>> ../lib/unistd.h:603:1: error: expected '=', ',', ';', 'asm' or
>>> '__attribute__' before 'extern'
>>
>> lib/unistd.h contains:
>>
> 
>>
>> GCC doesn't like that "_GL_INLINE_HEADER_xxx" stuff.
> 
> The _GL_INLINE_HEADER_xxx stuff is defined in config.h.  Is this a case
> of you forgetting to include <config.h> first, before any system header?

And if so, I wonder if we could make gnulib give a bit nicer error
message in cases like this, by putting a canned:

#ifndef _GL_CONFIG_H_WITNESS
# error "Hey, you forgot to include <config.h> - what gives?"
#endif

into each of our replacement headers, as well as a guarantee that
config.h will define _GL_CONFIG_H_WITNESS.

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]