bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] improve locale handling in m4/wcwidth.m4


From: Eric Blake
Subject: Re: [PATCH] improve locale handling in m4/wcwidth.m4
Date: Tue, 14 Jul 2009 20:16:49 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

Bruno Haible <bruno <at> clisp.org> writes:

> Your suggestion would lead to a correct autoconf test as well. But we try
> to make configure tests fast - run as few programs as possible, skip
> unnecessary tests. There's no big point in making the MacOS X test work
> in a 100% robust way on Cygwin and Solaris - because Cygwin and Solaris
> are likely to have different bugs regarding wcwidth (if they would have
> one at all).

Cygwin 1.7 added wcwidth, and it does pass the test-wcwidth.c unit test.  So we 
may want to consider modifying this patch to also exempt cygwin from the 
expensive tests.

$ ./gnulib-tool --with-tests --test wcwidth
...
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking wctype.h usability... yes
checking wctype.h presence... yes
checking for wctype.h... yes
checking for wint_t... yes
checking for iswcntrl... yes
checking for wcwidth... yes
checking for inline... inline
checking for wchar_t... yes
checking whether stdint.h conforms to C99... yes
checking whether <wchar.h> is standalone... yes
checking whether iswcntrl works... yes
checking whether wcwidth is declared... yes
checking whether wcwidth works reasonably in UTF-8 locales... yes
...
PASS: test-stdint.exe
PASS: test-uc_width.exe
PASS: uniwidth/test-uc_width2.sh
PASS: test-wchar.exe
PASS: test-wctype.exe
PASS: test-wcwidth.exe
==================
All 6 tests passed


However, cygwin does not have full locale support yet (just charsets, including 
ASCII, UTF8, and eucJP), so I am seeing several other failures related to wide 
characters.  I'm not yet sure if these bugs are bad assumptions in gnulib, or 
true bugs in cygwin.  For example:

$ ./gnulib-tool --with-tests --test wcrtomb
...
checking for a traditional japanese locale... ja_JP.eucJP
checking for a transitional chinese locale... none
checking for a french Unicode locale... none
checking for wint_t... yes
checking wchar.h usability... yes
checking wchar.h presence... yes
checking for wchar.h... yes
checking whether the preprocessor supports include_next... yes
checking whether btowc(EOF) is correct... guessing yes
checking whether mbrtowc handles incomplete characters... yes
checking whether mbrtowc works as well as mbtowc... guessing yes
checking whether mbrtowc handles a NULL string argument... guessing yes
checking whether mbrtowc has a correct return value... no
checking whether mbrtowc returns 0 when parsing a NUL character... guessing yes
checking whether mbrtowc handles incomplete characters... (cached) yes
checking whether mbrtowc works as well as mbtowc... (cached) guessing yes
checking whether <wchar.h> is standalone... yes
checking whether mbrtowc handles incomplete characters... (cached) yes
checking whether mbrtowc works as well as mbtowc... (cached) guessing yes
checking whether wcrtomb return value is correct... yes
checking whether wctob works... guessing yes
checking whether wctob is declared... yes
...
Skipping test: no traditional french locale is supported
SKIP: test-btowc1.sh
Skipping test: no french Unicode locale is supported
SKIP: test-btowc2.sh
Skipping test: no traditional french locale is supported
SKIP: test-mbrtowc1.sh
Skipping test: no french Unicode locale is supported
SKIP: test-mbrtowc2.sh
../../gltests/test-mbrtowc.c:240: assertion failed
../../gltests/test-mbrtowc3.sh: line 15: 19980 Aborted                 (core 
dumped) LC_ALL=$LOCALE_JA ./test-mbrtowc${EXEEXT} 3
FAIL: test-mbrtowc3.sh
Skipping test: no transitional chinese locale is supported
SKIP: test-mbrtowc4.sh
Skipping test: no french Unicode locale is supported
SKIP: test-mbsinit.sh
PASS: test-wchar.exe
../../gltests/test-wcrtomb.c:51: assertion failed
../../gltests/test-wcrtomb.sh: line 25:  9880 Aborted                 (core 
dumped) LC_ALL=$LOCALE_JA ./test-wcrtomb${EXEEXT} 3
FAIL: test-wcrtomb.sh
======================
2 of 3 tests failed
(6 tests were not run)

-- 
Eric Blake






reply via email to

[Prev in Thread] Current Thread [Next in Thread]