Hi,
The following is from libibtery.h
/* HAVE_DECL_* is a three-state macro: undefined, 0 or 1. If it is
undefined, we haven't run the autoconf check so provide the
declaration without arguments. If it is 0, we checked and failed
to find the declaration so provide a fully prototyped one. If it
is 1, we found it so don't provide any declaration at all. */
However, that appears to be incorrect because what configure output in
config.h is not HAVE_DECL_XXX, but HAVE_XXX. Therefore, it appears
that libiberty would be misdetecting declarations -- it thinks
something is missing, whereas in fact it is not.
Am I missing something here?
The way I ran into this problem is when trying to compile libiberty
with a C++ compiler, which is quite intolerant about declaration
mismatches:
/home/gdr/tmp/ipr.gcc-4.1/libiberty/../include/libiberty.h:78: error:
declaration of 'char* basename(const char*)' throws different exceptions
/usr/include/string.h:345: error: than previous declaration 'char*
basename(const char*) throw ()'
Of course, configure #defines HAVE_BASENAME to 1, but libiberty is
testing for HAVE_DECL_BASENAME.
-- Gaby