bug-gnulib
[Top][All Lists]
Advanced

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

Re: FreeBSD 6 and printf "%a"


From: Bruno Haible
Subject: Re: FreeBSD 6 and printf "%a"
Date: Thu, 12 Apr 2007 01:32:28 +0200
User-agent: KMail/1.5.4

This patch from last week was broken.

> 2007-04-04  Bruno Haible  <address@hidden>
> 
>         * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Add a test for correct
>         rounding. Don't assume that FreeBSD 6 and NetBSD 4 pass this test.

2007-04-11  Bruno Haible  <address@hidden>

        * m4/printf.m4 (gl_PRINTF_DIRECTIVE_A): Fix test. It always failed.

*** m4/printf.m4        11 Apr 2007 00:24:01 -0000      1.15
--- m4/printf.m4        11 Apr 2007 23:28:19 -0000
***************
*** 113,127 ****
      return 1;
    /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
    if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
!       || (strcmp (result, "0x1.83p+0 33") != 0
!           && strcmp (result, "0x3.05p-1 33") != 0
!           && strcmp (result, "0x6.0ap-2 33") != 0
!           && strcmp (result, "0xc.14p-3 33") != 0))
      return 1;
    /* This catches a FreeBSD 6.1 bug.  See
       <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
    if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
!       || result[0] == '0')
      return 1;
    /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug.  */
    if (sprintf (buf, "%.1a", 1.999) < 0
--- 113,127 ----
      return 1;
    /* This catches a FreeBSD 6.1 bug: it doesn't round.  */
    if (sprintf (buf, "%.2a %d", 1.51, 33, 44, 55) < 0
!       || (strcmp (buf, "0x1.83p+0 33") != 0
!           && strcmp (buf, "0x3.05p-1 33") != 0
!           && strcmp (buf, "0x6.0ap-2 33") != 0
!           && strcmp (buf, "0xc.14p-3 33") != 0))
      return 1;
    /* This catches a FreeBSD 6.1 bug.  See
       <http://lists.gnu.org/archive/html/bug-gnulib/2007-04/msg00107.html> */
    if (sprintf (buf, "%010a %d", 1.0 / 0.0, 33, 44, 55) < 0
!       || buf[0] == '0')
      return 1;
    /* This catches a MacOS X 10.3.9 (Darwin 7.9) bug.  */
    if (sprintf (buf, "%.1a", 1.999) < 0





reply via email to

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