Hello, Tom G. Christensen wrote: > While trying to build a snapshot of gnulib on Solaris 2.6 I got this > build error: > depbase=`echo regex-quote.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\ > gcc -DHAVE_CONFIG_H -I. -I.. -DGNULIB_STRICT_CHECKING=1 -D_REENTRANT > -g -O2 -MT regex-quote.o -MD -MP -MF $depbase.Tpo -c -o regex-quote.o > regex-quote.c &&\ > mv -f $depbase.Tpo $depbase.Po > regex-quote.c: In function 'regex_quote_spec_posix': > regex-quote.c:40: error: expected identifier before '(' token > regex-quote.c: In function 'regex_quote_spec_gnu': > regex-quote.c:86: error: expected identifier before '(' token > regex-quote.c: In function 'regex_quote_spec_pcre': > regex-quote.c:123: error: expected identifier before '(' token > regex-quote.c: In function 'regex_quote_length': > regex-quote.c:139: error: expected identifier before '(' token > regex-quote.c: In function 'regex_quote_copy': > regex-quote.c:174: error: expected identifier before '(' token > make[4]: *** [regex-quote.o] Error 1 > > The problem is that /usr/include/euc.h has this: > #define multibyte (__ctype[520] > 1) > That file is being included by <widec.h> which is included by <wctype.h> > which is included by gnulib wctype.h.
Ouch. How ridiculous. I'm adding this workaround: 2011-05-29 Bruno Haible <br...@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 <t...@jupiterrise.com>. --- lib/wctype.in.h.orig Sun May 29 21:34:58 2011 +++ lib/wctype.in.h Sun May 29 21:33:02 2011 @@ -59,6 +59,19 @@ /* 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 --- doc/posix-headers/wctype.texi.orig Sun May 29 21:37:21 2011 +++ doc/posix-headers/wctype.texi Sun May 29 21:36:41 2011 @@ -25,6 +25,10 @@ @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: -- In memoriam John Penry <http://en.wikipedia.org/wiki/John_Penry>