bug-gnulib
[Top][All Lists]
Advanced

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

Re: double inclusion guard


From: Bruce Korb
Subject: Re: double inclusion guard
Date: Mon, 11 Oct 2010 21:07:25 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.1.11) Gecko/20100714 SUSE/3.0.6 Thunderbird/3.0.6

On 10/11/10 20:18, Gary V. Vaughan wrote:
> Then I believe the only viable option to provide stable support
> for multiple gnulib directories in a single tree is to add a
> switch to gnulib-tool to rewrite gnulib #include_next lines
> on import, so that both types of compilers include header
> files in the same order.  It's certainly doable, but it's
> going to be finicky and easy to break.
> 
> I believe this is the problem Bruce was thinking about

Precisely.

> (and which I dismissed prematurely.. sorry Bruce!) with
> symbols in installed gnulib headers from libposix clashing
> with non-libposix gnulib headers in a gnulib client project
> that also uses libposix... perhaps more patches like Bruno's
> patch from earlier in this thread will also be required.

Blech.  KISS:  once you've included a gnulib mumble.h, all other
gnulib mumble.h-es are noop-ed.  OK, so it is theoretically possible
for the contents to vary based on how the installing package
gets configured.  If that's a problem, don't use libposix because
it is not clear how you choose which is authoritative.  If someone
really, really wants libposix and uses gnulib modules that pull in
duplicate posix headers, then you have just become a volunteer
to walk through the mine field to help show the way. :)

So for now, I recommend *not* fiddling multi-inclusion guards,
though I will do it because I said I would.  I recommend against.

Cheers - Bruce



reply via email to

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