]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Fix a compilation error if <locale.h> is included after gettext.h on Solaris
authorBruno Haible <bruno@clisp.org>
Fri, 10 May 2002 11:33:37 +0000 (11:33 +0000)
committerBruno Haible <bruno@clisp.org>
Tue, 23 Jun 2009 10:07:57 +0000 (12:07 +0200)
with --disable-nls.

lib/ChangeLog
lib/gettext.h

index 835e19be3a4027b1bdc9609f7de24e0ee69cf1a3..37e9931fbd2ebbd5e1333ffab1933d544bb10386 100644 (file)
@@ -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
index ea67f30815abb41c798ec330486e89752c1803c5..8b262f4cfd789f4c367d6427d391ca83cff0c5c2 100644 (file)
 
 #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.