On 03/10/2011 03:58 PM, Peter O'Gorman wrote: > Hi, > > In the past gnulib-tool --import vsnprintf used to bring in wchar.h, but > it no longer does, so we get this failure on Tru64 5.1: > cc -DHAVE_CONFIG_H -I. -g -c -MD printf-args.c -DPIC -o .libs/printf-args.o > 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); > ----------------^ > > This is noted in gnulib's wchar.h replacement - stdio.h must be included > before whcar.h. > > We can fix this by adding #include <stdio.h> before the #include > <wchar.h> in printf-args.h, but I'm not sure that it's correct. Gnulib > undoubtedly has many more #include <wchar.h> that may be missing a prior > #include <stdio.h>
In general, if the replacement <wchar.h> header is available, this issue should be worked around. So the real question is why vsnprintf is not depending on the <wchar.h> replacement? It's not listed as a direct dependency, so it must have been coming in from an indirect dependency where we recently pruned things. Indeed - vsnprintf depends on vasnprintf depends on stdint, but commit 9a354cd cut the ties from stdint -> wchar. (Actually, the error came from printf-args.c, which is in the Files section of vasnprintf, not vsnprintf). I'm applying this, after searching for all other modules that ship a .c file that includes <wchar.h>. diff --git i/ChangeLog w/ChangeLog index 3ff30cd..f3a122f 100644 --- i/ChangeLog +++ w/ChangeLog @@ -1,3 +1,13 @@ +2011-03-10 Eric Blake <[email protected]> + + wchar: add explicit dependencies, for Tru64 + * modules/mbmemcasecoll (Depends-on): Add wchar. + * modules/mbtowc (Depends-on): Likewise. + * modules/vasnprintf (Depends-on): Likewise. + * modules/unistdio/u-printf-args (Depends-on): Likewise. + * modules/wctomb (Depends-on): Likewise. + Reported by Peter O'Gorman. + 2011-03-08 Bruno Haible <[email protected]> passfd module, part 1, tweaks. diff --git i/modules/mbmemcasecoll w/modules/mbmemcasecoll index 9820097..941b646 100644 --- i/modules/mbmemcasecoll +++ w/modules/mbmemcasecoll @@ -13,6 +13,7 @@ mbrtowc wcrtomb memcmp2 memcoll +wchar configure.ac: diff --git i/modules/mbtowc w/modules/mbtowc index 7e28768..f41d508 100644 --- i/modules/mbtowc +++ w/modules/mbtowc @@ -9,6 +9,7 @@ m4/mbtowc.m4 Depends-on: stdlib mbrtowc +wchar configure.ac: gl_FUNC_MBTOWC diff --git i/modules/unistdio/u-printf-args w/modules/unistdio/u-printf-args index eb15f13..a115d2b 100644 --- i/modules/unistdio/u-printf-args +++ w/modules/unistdio/u-printf-args @@ -13,6 +13,7 @@ m4/inttypes_h.m4 Depends-on: unitypes +wchar configure.ac: gl_PREREQ_PRINTF_ARGS diff --git i/modules/vasnprintf w/modules/vasnprintf index 6d266a1..35f5f3a 100644 --- i/modules/vasnprintf +++ w/modules/vasnprintf @@ -27,6 +27,7 @@ xsize errno memchr verify +wchar configure.ac: gl_FUNC_VASNPRINTF diff --git i/modules/wctomb w/modules/wctomb index 33a785e..81d41c4 100644 --- i/modules/wctomb +++ w/modules/wctomb @@ -9,6 +9,7 @@ m4/wctomb.m4 Depends-on: stdlib wcrtomb +wchar configure.ac: gl_FUNC_WCTOMB -- Eric Blake [email protected] +1-801-349-2682 Libvirt virtualization library http://libvirt.org
signature.asc
Description: OpenPGP digital signature
