wctype-h: Avoid namespace pollution on Solaris 2.6.
authorBruno Haible <bruno@clisp.org>
Sat, 28 May 2011 18:58:14 +0000 (20:58 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 29 May 2011 19:39:40 +0000 (21:39 +0200)
* lib/wctype.in.h: On Solaris, undefine 'multibyte' and a few other
identifiers.
* doc/posix-headers/wctype.texi: Mention the problem.
Reported by Tom G. Christensen <tgc@jupiterrise.com>.

ChangeLog
doc/posix-headers/wctype.texi
lib/wctype.in.h

index f9ee06b019eeac4cf20a115f1106b9984856e1aa..9c8b3a9e388382a35dbf112e75bee31e595d39da 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2011-05-29  Bruno Haible  <bruno@clisp.org>
+
+       wctype-h: Avoid namespace pollution on Solaris 2.6.
+       * lib/wctype.in.h: On Solaris, undefine 'multibyte' and a few other
+       identifiers.
+       * doc/posix-headers/wctype.texi: Mention the problem.
+       Reported by Tom G. Christensen <tgc@jupiterrise.com>.
+
 2011-05-28  Jim Meyering  <meyering@redhat.com>
 
        parse-datetime.y: accommodate -Wstrict-overflow
index 13c50145c7e9663341885112053306c982865fe1..38c239cb73f4fff06ea3d9a0ca4d2ab1aaad0299 100644 (file)
@@ -25,6 +25,10 @@ IRIX 6.5.30.
 @item
 The functions @code{isw*} are actually defined as macros that don't work,
 on IRIX 5.3.
+@item
+This header file defines some identifiers, such as @code{multibyte}, as macros
+on some platforms:
+Solaris 2.6.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index df98128f646f0e86ef93cba4387495c25d0e0196..5e6798a449c74cab8687b167714645b758748f97 100644 (file)
 
 /* The definition of _GL_WARN_ON_USE is copied here.  */
 
+/* Solaris 2.6 <wctype.h> includes <widec.h> which includes <euc.h> which
+   #defines a number of identifiers in the application namespace.  Revert
+   these #defines.  */
+#ifdef __sun
+# undef multibyte
+# undef eucw1
+# undef eucw2
+# undef eucw3
+# undef scrw1
+# undef scrw2
+# undef scrw3
+#endif
+
 /* Define wint_t and WEOF.  (Also done in wchar.in.h.)  */
 #if !@HAVE_WINT_T@ && !defined wint_t
 # define wint_t int