aboutsummaryrefslogtreecommitdiff
path: root/gold/gold.h
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@airs.com>2008-07-24 21:45:50 +0000
committerIan Lance Taylor <ian@airs.com>2008-07-24 21:45:50 +0000
commit801647d1db24c7bd12b01f8c2aa0df494776c1f7 (patch)
treed2d7941a99dafbb8aede9fc9e8200d2715a72264 /gold/gold.h
parent5edd166e7df6843077b800b2c55a97ea89ce6dcd (diff)
downloadgdb-801647d1db24c7bd12b01f8c2aa0df494776c1f7.zip
gdb-801647d1db24c7bd12b01f8c2aa0df494776c1f7.tar.gz
gdb-801647d1db24c7bd12b01f8c2aa0df494776c1f7.tar.bz2
PR 6716
* gold.h: Always include <clocale>. Add Solaris workarounds following code in binutils/sysdep.h.
Diffstat (limited to 'gold/gold.h')
-rw-r--r--gold/gold.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/gold/gold.h b/gold/gold.h
index 03e73d3..63df994 100644
--- a/gold/gold.h
+++ b/gold/gold.h
@@ -29,6 +29,20 @@
#include <cstddef>
#include <sys/types.h>
+#ifndef ENABLE_NLS
+ // The Solaris version of locale.h always includes libintl.h. If we
+ // have been configured with --disable-nls then ENABLE_NLS will not
+ // be defined and the dummy definitions of bindtextdomain (et al)
+ // below will conflict with the defintions in libintl.h. So we
+ // define these values to prevent the bogus inclusion of libintl.h.
+# define _LIBINTL_H
+# define _LIBGETTEXT_H
+#endif
+
+// Always include <clocale> first to avoid conflicts with the macros
+// used when ENABLE_NLS is not defined.
+#include <clocale>
+
#ifdef ENABLE_NLS
# include <libintl.h>
# define _(String) gettext (String)