[Top][All Lists]

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

bug#8881: config.h double inclusion

From: Paul Eggert
Subject: bug#8881: config.h double inclusion
Date: Thu, 16 Jun 2011 13:29:35 -0700
User-agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv: Gecko/20110428 Fedora/3.1.10-1.fc14 Thunderbird/3.1.10

On 06/16/11 10:36, Alfred M. Szmidt wrote:
> I'm thinking that maybe <config.h> should be generated with a double
> inclusion guard

But the general rule is that <config.h> must always be included first, no?
So there shouldn't ever be a possibility of including it twice.

It might be better to have config.h do something like this:

#ifdef CONFIG_H
# error "config.h included twice"
#define CONFIG_H

> A bit later, we do:
>   #include <libinetutils.h>
> which will cause warnings like:
>   ../config.h:561:1: warning "HAVE_DECL_PROGRAM_INVOCATION_NAME" redefined

Sp libinetutils.h includes config.h?  Then that is a problem.
One possible fix is to arrange for libinetutils.h to be built from
libinetutils.in.h, the same way that (for example) stdint.h is built
from stdint.in.h in gnulib.

reply via email to

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