This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
Re: [bootstrap] Tentative fix for PR 54281
Hi!
On Fri, Aug 17, 2012 at 08:23:02AM -0400, Diego Novillo wrote:
> --- a/gcc/intl.h
> +++ b/gcc/intl.h
> @@ -27,8 +27,16 @@
> # define setlocale(category, locale) (locale)
> #endif
>
> +/* If libintl.h is available, include it before testing for NLS. If we
> + are building with --disable-nls and another header file includes
> + libintl.h, the stubs defined down below will cause syntax errors
> + when parsing libintl.h. See http://gcc.gnu.org/bugzilla/show_bug.cgi?id=54281
> + for details. */
> +#ifdef HAVE_LIBINTL_H
> +# include <libintl.h>
> +#endif
> +
> #ifdef ENABLE_NLS
> -#include <libintl.h>
> extern void gcc_init_libintl (void);
> extern size_t gcc_gettext_width (const char *);
> #else
Will that handle even the case where without --disable-nls intl/
creates its own libintl.h? Dunno which targets need that, but
I'd guess configury wouldn't find it in that case. So perhaps
it should be #if defined(HAVE_LIBINTL_H) || defined(ENABLE_NLS) ?
Jakub