On Mon, Aug 07, 2006 at 08:47:38PM +0200, Bruno Haible wrote: > Gary V. Vaughan wrote: > > Here is the culprit: > > > > configure:14791: checking whether wcwidth is declared > > configure:14828: cc -c -g conftest.c >&5 > > cc: Error: /usr/include.dtk/wchar.h, line 78: Ill-formed parameter type > > list. (parmtyplist) > > __VA_LIST__ __arg); > > ----------------^ > > cc: Error: /usr/include.dtk/wchar.h, line 83: Ill-formed parameter type > > list. (parmtyplist) > > __VA_LIST__ __arg); > > ----------------^ > > cc: Error: /usr/include.dtk/wchar.h, line 87: Ill-formed parameter type > > list. (parmtyplist) > > __VA_LIST__ __arg); > > ----------------^ > > configure:14834: $? = 1 > > Ouch. The compiler doesn't grok its own include file. > > I've seen error on another machine too. My fix was to set the CFLAGS so > that /usr/include would override /usr/include.dtk, but still allow > <iconv.h> to be found from my /opt/gnu: > > $ ./configure --prefix=/opt/gnu \ > CC="cc -O" CFLAGS="-I/opt/gnu/include -I/usr/include" > > But maybe there is another solution? Does the compiler support a flag that > makes it grok the __VA_LIST__ in the first place?
The fix is to #include <stdio.h> before <wchar.h>. >From lib/mbswidth.h: /* Avoid a clash of our mbswidth() with a function of the same name defined in UnixWare 7.1.1 <wchar.h>. We need this #include before the #define below. However, we don't want to #include <wchar.h> on all platforms because - Tru64 with Desktop Toolkit C has a bug: <stdio.h> must be included before <wchar.h>. - BSD/OS 4.1 has a bug: <stdio.h> and <time.h> must be included before <wchar.h>. */ #if HAVE_DECL_MBSWIDTH_IN_WCHAR_H # include <wchar.h> #endif -- albert chin ([EMAIL PROTECTED])