Re: Bug#748361: m4: build tests are failing on ppc64el

2014-05-16 Thread Eric Blake
adding gnulib, as m4 merely borrows the content from gnulib. On 05/16/2014 09:52 AM, Santiago Vila wrote: > Hello. > > I received the following report from the Debian bug system. > [ Please keep the Cc: lines when replying. Thanks ]. > > - Forwarded message from Erwan Prioul - > > Date

Re: [PATCH] doc: document mbrtowc and mbrlen problem with empty input

2014-05-16 Thread Jim Meyering
On Thu, May 15, 2014 at 6:30 PM, Paul Eggert wrote: > * doc/posix-functions/mbrlen.texi (mbrlen): > * doc/posix-functions/mbrtowc.texi (mbrtowc): > Document portability problem when the input string is empty. See: > https://sourceware.org/bugzilla/show_bug.cgi?id=16950 > ChangeLog

Re: [PATCH] doc: document mbrtowc and mbrlen problem with empty input

2014-05-16 Thread Paul Eggert
On 05/16/2014 11:13 AM, Jim Meyering wrote: Thanks for tracking that down. This sounds like it will deserve compile/run tests so that gnulib-using projects will detect the bug and use the replacement functions. Thanks, good idea. gnulib/tests/test-mbrtowc.c has test cases for zero-length inp

[PATCH] mbrlen, mbrtowc: fix bug with empty input

2014-05-16 Thread Paul Eggert
* lib/mbrtowc.c (rpl_mbrtowc) [MBRTOWC_EMPTY_INPUT_BUG]: Fix the bug. * m4/mbrlen.m4 (gl_MBRLEN_EMPTY_INPUT): New macro. It's not used, so this is mainly for documentation. * m4/mbrtowc.m4 (gl_MBRTOWC_EMPTY_INPUT): New macro. (gl_FUNC_MBRTOWC): Use it. * tests/test-mbrtowc.c (main): Test for the b

Re: [PATCH] mbrlen, mbrtowc: fix bug with empty input

2014-05-16 Thread Pádraig Brady
General question. To me, mbrtowc returning 0 for empty input is not surprising. Also POSIX says for mbr{len,towc} that they shall return 0 "If the next n or fewer bytes complete the character that corresponds to the null wide character" What am I missing? Pádraig. p.s. there is a small "(size_t

Re: [PATCH] mbrlen, mbrtowc: fix bug with empty input

2014-05-16 Thread Jim Meyering
On Fri, May 16, 2014 at 1:56 PM, Paul Eggert wrote: > +*) AC_DEFINE([MBRTOWC_EMPTY_INPUT_BUG], [1], > + [Define if the mbrtowc function does not return (size_t) 2 Thanks. I've fixed that typo: s/2/-2/ 0001-mbrtowc.m4-fix-a-comment-typo.patch Description: Binary data

Re: [PATCH] mbrlen, mbrtowc: fix bug with empty input

2014-05-16 Thread Paul Eggert
Pádraig Brady wrote: To me, mbrtowc returning 0 for empty input is not surprising. Also POSIX says for mbr{len,towc} that they shall return 0 "If the next n or fewer bytes complete the character that corresponds to the null wide character At least 1 byte is needed to represent a null wide char