This is the mail archive of the
binutils@sourceware.org
mailing list for the binutils project.
Re: [PATCH] libiberty: add HAVE_CONFIG_H check to all files (lacking it already)
- From: Ian Lance Taylor <iant at google dot com>
- To: Mike Frysinger <vapier at gentoo dot org>
- Cc: binutils at sourceware dot org
- Date: Mon, 16 Aug 2010 21:02:13 -0700
- Subject: Re: [PATCH] libiberty: add HAVE_CONFIG_H check to all files (lacking it already)
- References: <1281767203-21421-1-git-send-email-vapier@gentoo.org>
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