aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bfd/ChangeLog5
-rw-r--r--bfd/sysdep.h11
2 files changed, 16 insertions, 0 deletions
diff --git a/bfd/ChangeLog b/bfd/ChangeLog
index d96cc78..e0cb2bf 100644
--- a/bfd/ChangeLog
+++ b/bfd/ChangeLog
@@ -1,5 +1,10 @@
2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+ * sysdep.h [!ENABLE_NLS]: Prevent inclusion of <libintl.h> on
+ Solaris.
+
+2021-07-07 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
+
* configure.ac: Check for strnlen declaration.
* configure, config.in: Regenerate.
diff --git a/bfd/sysdep.h b/bfd/sysdep.h
index aa6b095..8919e76 100644
--- a/bfd/sysdep.h
+++ b/bfd/sysdep.h
@@ -126,6 +126,17 @@ extern int fseeko64 (FILE *stream, off64_t offset, int whence);
#define offsetof(TYPE, MEMBER) ((size_t) &((TYPE *)0)->MEMBER)
#endif
+#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
+#include <locale.h>
+
#ifdef ENABLE_NLS
# include <libintl.h>
/* Note the redefinition of gettext and ngettext here to use PACKAGE.