bug-gnulib
[Top][All Lists]
Advanced

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

Re: printf "%010a" Inf/NaN and FreeBSD


From: Eric Blake
Subject: Re: printf "%010a" Inf/NaN and FreeBSD
Date: Mon, 9 Apr 2007 14:32:33 +0000 (UTC)
User-agent: Loom/3.14 (http://gmane.org/)

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

> 
> On FreeBSD 6.1, printf of "%010a" of Infinity and NaN yields
> "0000000inf" and "0000000nan", respectively.
> 
> While on glibc systems, it yields
> "       inf" and "       nan", respectively.
> 
> I find glibc's output more sensible, since strtod will accept it, while
> strtod will not grok "0000000inf". But FreeBSD appears to be closer to
> the POSIX wording, I won't count it as a FreeBSD bug.

The Austin group answered by referring to C99 (the POSIX spec defers to C99 in 
this matter):

http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html

FreeBSD 6.1 is buggy.  Can we please revert this patch, and instead catch the 
FreeBSD bug during ./configure?

> 
> 2007-04-04  Bruno Haible  <bruno <at> clisp.org>
> 
>       * tests/test-vasnprintf-posix.c (test_function): Allow two possible
>       results for "%010a" of Infinity and NaN.
...
>       Needed for FreeBSD 6.1.

-- 
Eric Blake







reply via email to

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