summaryrefslogtreecommitdiff
path: root/gcc/intl.h
diff options
context:
space:
mode:
authordnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-17 15:37:57 +0000
committerdnovillo <dnovillo@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-17 15:37:57 +0000
commit4b9beb88f5d49452a1fb25826c00cd81b7461b04 (patch)
tree76d219330f05a882e13d22071c9acfedb91f7040 /gcc/intl.h
parent98d22b3cf706bdf6f206651c47876757e676e9c5 (diff)
downloadgcc-4b9beb88f5d49452a1fb25826c00cd81b7461b04.tar.gz
2012-08-17 Diego Novillo <dnovillo@google.com>
PR bootstrap/54281 * configure.ac: Add libintl.h to AC_CHECK_HEADERS list. * config.in: Regenerate. * configure: Regenerate. * intl.h: Always include libintl.h if HAVE_LIBINTL_H is set. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190487 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/intl.h')
-rw-r--r--gcc/intl.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/gcc/intl.h b/gcc/intl.h
index c4db3545893..03be420fe68 100644
--- 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. */
+#if defined(HAVE_LIBINTL_H) || defined(ENABLE_NLS)
+# 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