[gcc-in-cxx] Trunk fails to bootstrap with --enable-build-with-cxx
Ian Lance Taylor
iant@google.com
Mon Sep 14 02:25:00 GMT 2009
Jerry Quinn <jlquinn@optonline.net> writes:
> Index: include/libiberty.h
> ===================================================================
> --- include/libiberty.h (revision 149964)
> +++ include/libiberty.h (working copy)
> @@ -100,7 +100,7 @@
> 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. */
> -#if !HAVE_DECL_BASENAME
> +#if !HAVE_BASENAME
> #if defined (__GNU_LIBRARY__ ) || defined (__linux__) || defined (__FreeBSD__) || defined (__OpenBSD__) || defined(__NetBSD__) || defined (__CYGWIN__) || defined (__CYGWIN32__) || defined (__MINGW32__) || defined (HAVE_DECL_BASENAME)
> extern char *basename (const char *);
> #else
This is a tough change to make. Several different packages use
libiberty.h, and they are currently responsible for ensuring that
HAVE_DECL_BASENAME is declared correctly before libiberty.h is
#included. Changing this means looking at those packages and, most
likely, changing them too.
It may be better to test whether basename exists as you suggest, but to
define HAVE_DECL_BASENAME based on HAVE_BASENAME.
(By the way, you don't need to send diffs to generate files like
configure and config.in, that just clutters up the patch. It's
sufficient to include a reminder that those files need to be
regenerated.)
Ian
More information about the Gcc
mailing list