autoconf-patches
[Top][All Lists]
Advanced

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

Re: autoheader should protect config.h against multiple inclusion


From: Steven G. Johnson
Subject: Re: autoheader should protect config.h against multiple inclusion
Date: Thu, 18 Jan 2001 11:53:51 -0500 (EST)

On 18 Jan 2001, Akim Demaille wrote:
> As you say, it's pointless in the case of config.h, so why do you want
> to do it?  I'm a bit reluctant, because I don't want people to
> transform config.h into some sort of system.h, as it would forbid
> future evolutions precisely towards autosystem.  A good config.h can
> be reread several times, it should not typedef, prototype etc.
> [...]
> I agree ``I can't think of any reason *not* to do it.'' is a good
> argument, but would you have positive arguments?

Although it may not be the approved style have typedefs, etcetera, in
config.h, it's not actually forbidden, and many people may do it anyway.  
For example, a natural interpretation of the AC_FUNC_ALLOCA documentation
might be to put the recommended declarations in config.h (although I'm not
sure that any of those particular declarations would cause problems).  In
general, you don't want to force people to be careful about such things
when constructing their config.h in the way they want.  If nothing else,
there's the fact that some compilers issue warnings if preprocessor
symbols are defined multiple times.

(config.h can easily be multiply-included, since it often may be required
and included by other header files in a program.)

I don't think it is a huge issue; my main reason, honestly, is just that
it is generally good style to protect header files in this way, and the
patch is simple.  And GNU projects should promote good style.  =)

Steven





reply via email to

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