aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2012-11-01 22:44:57 +0000
committerRoland McGrath <roland@gnu.org>2012-11-01 22:44:57 +0000
commitc0aef673be9f2f2396f43ea255aa2132a4f69d85 (patch)
tree4e6cced0d470da960b538c5e82d3e12839d2cd15
parent14eea92564edcf338dc8e2c0c33e03501530ea07 (diff)
downloadbinutils-c0aef673be9f2f2396f43ea255aa2132a4f69d85.tar.gz
gold/
* system.h: Move inclusion of <clocale> to after <libintl.h> in [ENABLE_NLS] section, and separately at top of [!ENABLE_NLS] section.
-rw-r--r--gold/ChangeLog3
-rw-r--r--gold/system.h8
2 files changed, 7 insertions, 4 deletions
diff --git a/gold/ChangeLog b/gold/ChangeLog
index 176e1911c..edb103dc1 100644
--- a/gold/ChangeLog
+++ b/gold/ChangeLog
@@ -8,6 +8,9 @@
2012-11-01 Roland McGrath <mcgrathr@google.com>
+ * system.h: Move inclusion of <clocale> to after <libintl.h> in
+ [ENABLE_NLS] section, and separately at top of [!ENABLE_NLS] section.
+
* nacl.cc: Include "libiberty.h" for vasprintf declaration.
2012-11-01 Roland McGrath <mcgrathr@google.com>
diff --git a/gold/system.h b/gold/system.h
index ce2d93979..3e6fe1d4c 100644
--- a/gold/system.h
+++ b/gold/system.h
@@ -33,12 +33,10 @@
# 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
+// On some systems, things go awry when <libintl.h> comes after <clocale>.
# include <libintl.h>
+# include <clocale>
# define _(String) gettext (String)
# ifdef gettext_noop
# define N_(String) gettext_noop (String)
@@ -46,6 +44,8 @@
# define N_(String) (String)
# endif
#else
+// Include <clocale> first to avoid conflicts with these macros.
+# include <clocale>
# define gettext(Msgid) (Msgid)
# define dgettext(Domainname, Msgid) (Msgid)
# define dcgettext(Domainname, Msgid, Category) (Msgid)