[PATCH] libiberty: add HAVE_CONFIG_H check to all files (lacking it already)
Ian Lance Taylor
iant@google.com
Tue Aug 17 04:17:00 GMT 2010
Mike Frysinger <vapier@gentoo.org> 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.
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.
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.
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.
Ian
More information about the Binutils
mailing list