[PATCH] libiberty: add HAVE_CONFIG_H check to all files (lacking it already)

Mike Frysinger vapier@gentoo.org
Tue Aug 17 05:03:00 GMT 2010


On Tue, Aug 17, 2010 at 12:02 AM, Ian Lance Taylor wrote:
> Mike Frysinger writes:
>> Most of the files in libiberty protect the config.h include with a
>> HAVE_CONFIG_H check, but some don't.  So add it to all the files that
>> are missing it.  I noticed when I tried hand compiling a few files
>> while testing things but didn't have a config.h locally.  Can't see
>> anything wrong with this, but posting in case I missed something
>> obvious.
>
> I don't think this is particularly useful.  When libiberty is built
> correctly, config.h will always exist when building libiberty itself.

it isnt an issue of libiberty being compiled correctly.  i
specifically wanted to compile a few files by hand to simplify some
local testing.

> The cases where libiberty .c files check #ifdef HAVE_CONFIG_H are
> generally cases where libiberty has copied code from other projects,
> which have their own reasons for testing HAVE_CONFIG_H.

so if i include an arbitrary file in my own project, i can request it
be given a HAVE_CONFIG_H ?

> On the grounds that there is no reason to make code even a tiny bit more
> complex for no good reason, I would prefer to reject that patch.

personally, i found this functionality in some files useful.  i did
the rest so things were consistent.

> For future reference, patches to libiberty should be sent to
> gcc-patches@gcc.gnu.org, as the master libiberty source code lives in
> the gcc repostiory, from where it is copied to the binutils repository.

thanks, wasnt aware
-mike



More information about the Binutils mailing list