Re: Bug in GNULIB wchar.h?

2008-03-30 Thread Paul Eggert
Erik Benada <[EMAIL PROTECTED]> writes: > yes, this patch fixes my problem. Thanks, I installed it into gnulib with this ChangeLog entry: 2008-03-30 Paul Eggert <[EMAIL PROTECTED]> * lib/wchar.in.h [defined __need_mbstate_t]: Just include . Problem reported by Erik Benada in

Re: strtod bugs

2008-03-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 3/30/2008 6:18 PM: | Oops, the shown patch in the last mail was incomplete. See | http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=b442459322dbef0bcb547770565b05724e98b47d | for the full patch. | | (Sorry, a 'git'

Re: strtod bugs

2008-03-30 Thread Bruno Haible
Oops, the shown patch in the last mail was incomplete. See http://git.sv.gnu.org/gitweb/?p=gnulib.git;a=commitdiff;h=b442459322dbef0bcb547770565b05724e98b47d for the full patch. (Sorry, a 'git' pitfall. I had used 'git add' on one file and not on the other. What is the command to get the union of

Re: strtod bugs

2008-03-30 Thread Bruno Haible
Eric Blake wrote: > test-strtod.c is all I had; but I intentionally made it catch all errors > rather than aborting on the first Ah, I see. Sorry, I had not seen this detail. Find attached the results on a dozen of platforms. I integrated these test results into test-strtod.c as comments (since

Re: strtod bugs

2008-03-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 3/30/2008 4:03 PM: | I'm wondering if it is a gcc -O2 bug? I'm not quite sure what | to do here, without access to a machine with those failures. Can you step | through the replacement function with a debugger? Or maybe i

Re: strtod bugs

2008-03-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 3/30/2008 8:49 AM: | | In my copy of test-strtod.c, they're all comparing sign bits: | | ASSERT (signbit (result1) != signbit (result2)); The default value of NaN (both sign bit and other bits) are enough of a portabi

Re: strtod bugs

2008-03-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 3/30/2008 2:44 PM: | Hi Eric, | |> Of all the |> systems I tried, I did not find a single one that was fully C99 compliant. | | I'd like to document the flaws across more platforms. Do you have a set of | test programs, on

Re: strtod bugs

2008-03-30 Thread Bruno Haible
Hi Eric, > Of all the > systems I tried, I did not find a single one that was fully C99 compliant. I'd like to document the flaws across more platforms. Do you have a set of test programs, one snippet for each bug you found so far, that I could run on a variety of systems? I could try to extract

striconveh: optimize conversion from UTF-8 to UTF-8

2008-03-30 Thread Bruno Haible
A minor optimization. 2008-03-30 Bruno Haible <[EMAIL PROTECTED]> * lib/striconveh.h (mem_iconveh, str_iconveh): Optimize the conversion from UTF-8 to UTF-8//TRANSLIT in the same way as from UTF-8 to UTF-8. *** lib/striconveh.c.orig 2008-03-30 18:56:21.0 +0200 ---

striconveh: fix bug with empty return values

2008-03-30 Thread Bruno Haible
On OSF/1 (and possibly other platforms whose malloc(0) can be NULL), the mem_cd_iconveh function could return a NULL string rather than a "freshly allocated memory block". It showed up as a unit test failure on OSF/1. 2008-03-30 Bruno Haible <[EMAIL PROTECTED]> Avoid failure when attem

vasnprintf: fix buffer overrun

2008-03-30 Thread Bruno Haible
This fixes a buffer overrun on OSF/1 4.0 and Solaris 2.5. Nothing to worry about for the majority of the platforms. 2008-03-30 Bruno Haible <[EMAIL PROTECTED]> Fix buffer overrun. * lib/vasnprintf.c (VASNPRINTF): If !USE_SNPRINTF && pad_ourselves: Don't consider the wid

Re: strtod bugs

2008-03-30 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: > According to Jim Meyering on 3/30/2008 7:28 AM: > | Eric Blake <[EMAIL PROTECTED]> wrote: > | ... > |> Therefore, I'm asking for opinions - should I apply this patch as is, to > | > | Seems fine that you've applied it, except for a new failure > | in coreuti

Re: strtod bugs

2008-03-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 3/30/2008 7:28 AM: | Eric Blake <[EMAIL PROTECTED]> wrote: | ... |> Therefore, I'm asking for opinions - should I apply this patch as is, to | | Seems fine that you've applied it, except for a new failure | in coreutils' r

Re: strtod bugs

2008-03-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Jim Meyering on 3/30/2008 7:31 AM: | | The buildbot is also showing a new compile failure: | | http://buildbot.proulx.com:9000/ | | cc1: warnings being treated as errors Thanks for the report; I'm applying this: - -- Don't work too ha

Re: EOVERFLOW

2008-03-30 Thread Bruno Haible
Jim Meyering wrote: > > Jim, is it ok to do the same for the 'getugroups' module? > > Sure. Applied: * lib/getugroups.c (EOVERFLOW): Remove fallback. * modules/getugroups (Depends-on): Add EOVERFLOW. *** lib/getugroups.c.orig 2008-03-30 15:55:05.0 +0200 --- lib/get

Re: strtod bugs

2008-03-30 Thread Jim Meyering
Jim Meyering <[EMAIL PROTECTED]> wrote: > Eric Blake <[EMAIL PROTECTED]> wrote: > ... >> Therefore, I'm asking for opinions - should I apply this patch as is, to > > Seems fine that you've applied it, except for a new failure > in coreutils' running of the gnulib strtod test. E.g., The buildbot i

Re: strtod bugs

2008-03-30 Thread Jim Meyering
Eric Blake <[EMAIL PROTECTED]> wrote: ... > Therefore, I'm asking for opinions - should I apply this patch as is, to Seems fine that you've applied it, except for a new failure in coreutils' running of the gnulib strtod test. E.g., test-strtod.c:544: assertion failed test-strtod.c:592: a

Re: EOVERFLOW

2008-03-30 Thread Bruno Haible
Eric Blake wrote: > I saw your new EOVERFLOW module - but you missed adding m4/eoverflow.m4. Huh? I don't understand what you mean. I tested the module on OSF/1 and mingw. What did I miss? Bruno

Re: EOVERFLOW

2008-03-30 Thread Jim Meyering
Bruno Haible <[EMAIL PROTECTED]> wrote: > Eric Blake wrote: >> Hmm - should we provide a gnulib that guarantees all of the >> standard errors, rather than doing an ad-hoc definition of EOVERFLOW and >> others in every place where they are used? > > We already have an EOVERFLOW replacement macro i

Re: errno.h

2008-03-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Eric Blake on 3/30/2008 7:20 AM: | According to Bruno Haible on 3/30/2008 4:34 AM: | | Eric Blake wrote: | |> Hmm - should we provide a gnulib that guarantees all of the | |> standard errors, rather than doing an ad-hoc definition of EOV

Re: EOVERFLOW

2008-03-30 Thread Bruno Haible
Eric Blake wrote: > Hmm - should we provide a gnulib that guarantees all of the > standard errors, rather than doing an ad-hoc definition of EOVERFLOW and > others in every place where they are used? We already have an EOVERFLOW replacement macro in m4/eoverflow.m4. It would be better to use it r

Re: errno.h

2008-03-30 Thread Eric Blake
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 According to Bruno Haible on 3/30/2008 4:34 AM: | Eric Blake wrote: |> Hmm - should we provide a gnulib that guarantees all of the |> standard errors, rather than doing an ad-hoc definition of EOVERFLOW and |> others in every place where they are use

fix a bug in unistdio

2008-03-30 Thread Bruno Haible
This fixes a bug in the Unicode-enabled printf routines; uncovered through the unistdio/test-ulc-vasnprintf2.sh and unistdio/test-ulc-vasnprintf3.sh tests. 2008-03-30 Bruno Haible <[EMAIL PROTECTED]> Fix bug introduced on 2007-06-10. * lib/vasnprintf.c (VASNPRINTF): When perfor

Re: errno.h

2008-03-30 Thread Bruno Haible
Eric Blake wrote: > Hmm - should we provide a gnulib that guarantees all of the > standard errors, rather than doing an ad-hoc definition of EOVERFLOW and > others in every place where they are used? So far we have been treating the errno values one by one, because 1. it is possible to do so in

Re: fflush after ungetc

2008-03-30 Thread Bruno Haible
Eric Blake wrote: > the real bug was that freadseek was incrementing the in-memory pointer > beyond the bounds of the ungetc buffer). True. But the use of freadahead was not entirely wrong. Because when the stream is in ungetc state, what you don't want is: - read the ungetc buffer (1 byte) with

Re: freadseek

2008-03-30 Thread Bruno Haible
Eric Blake wrote: > makes the > test-freadseek test pass on cygwin (at first I thought it was another > instance of ungetc undefined behavior, but on closer inspection, your > definition of freadseek is well-defined without any reliance on fflush - > the real bug was that freadseek was incrementing