PR 6716
authorIan Lance Taylor <ian@airs.com>
Thu, 24 Jul 2008 21:45:50 +0000 (21:45 +0000)
committerIan Lance Taylor <ian@airs.com>
Thu, 24 Jul 2008 21:45:50 +0000 (21:45 +0000)
* gold.h: Always include <clocale>.  Add Solaris workarounds
following code in binutils/sysdep.h.

gold/ChangeLog
gold/gold.h

index 70376251cbff44ac77c5df8b52d593f6c55038ee..657f644d56497e4e90cfb5eae328fbfdeee229e7 100644 (file)
@@ -1,5 +1,9 @@
 2008-07-24  Ian Lance Taylor  <iant@google.com>
 
+       PR 6716
+       * gold.h: Always include <clocale>.  Add Solaris workarounds
+       following code in binutils/sysdep.h.
+
        PR 6048
        * ehframe.cc (Eh_frame::add_ehframe_input_section): Check whether
        this->eh_frame_hdr_ is NULL before using it.
index 03e73d3c023704adf6dc2cd0fb9e684ef25c5b01..63df9942ffdbbd8ed51a21787b8005fb9e618945 100644 (file)
 #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)
This page took 0.02907 seconds and 4 git commands to generate.