summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2002-05-10 11:33:37 +0000
committerBruno Haible <bruno@clisp.org>2009-06-23 12:07:57 +0200
commit0b5a38d2c59b2c528987a83ee8785243c2db60c4 (patch)
treee8d87fb7a83b0fa7e0b88b99a24774c069c1f133 /lib
parentc14c89c9854b32962aceb217ed934c316f5b98d5 (diff)
downloadexternal_gettext-0b5a38d2c59b2c528987a83ee8785243c2db60c4.zip
external_gettext-0b5a38d2c59b2c528987a83ee8785243c2db60c4.tar.gz
external_gettext-0b5a38d2c59b2c528987a83ee8785243c2db60c4.tar.bz2
Fix a compilation error if <locale.h> is included after gettext.h on Solaris
with --disable-nls.
Diffstat (limited to 'lib')
-rw-r--r--lib/ChangeLog4
-rw-r--r--lib/gettext.h10
2 files changed, 14 insertions, 0 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog
index 835e19b..37e9931 100644
--- a/lib/ChangeLog
+++ b/lib/ChangeLog
@@ -1,3 +1,7 @@
+2002-05-10 Bruno Haible <bruno@clisp.org>
+
+ * gettext.h: On Solaris, include <locale.h>.
+
2002-05-04 Bruno Haible <bruno@clisp.org>
* javacomp.c (compile_java_class): Ignore non-digits in the first
diff --git a/lib/gettext.h b/lib/gettext.h
index ea67f30..8b262f4 100644
--- a/lib/gettext.h
+++ b/lib/gettext.h
@@ -27,6 +27,16 @@
#else
+/* Solaris /usr/include/locale.h includes /usr/include/libintl.h, which
+ chokes if dcgettext is defined as a macro. So include it now, to make
+ later inclusions of <locale.h> a NOP. We don't include <libintl.h>
+ as well because people using "gettext.h" will not include <libintl.h>,
+ and also including <libintl.h> would fail on SunOS 4, whereas <locale.h>
+ is OK. */
+#if defined(__sun)
+# include <locale.h>
+#endif
+
/* Disabled NLS.
The casts to 'const char *' serve the purpose of producing warnings
for invalid uses of the value returned from these functions.