sprintf-posix: Fix test failure on AIX 7.1.
authorBruno Haible <bruno@clisp.org>
Sun, 19 Jun 2011 14:06:42 +0000 (16:06 +0200)
committerBruno Haible <bruno@clisp.org>
Sun, 19 Jun 2011 14:06:42 +0000 (16:06 +0200)
* m4/printf.m4 (gl_PRINTF_PRECISION): Test against AIX bug.
* doc/posix-functions/dprintf.texi: Mention limited precision problem
on AIX.
* doc/posix-functions/fprintf.texi: Likewise.
* doc/posix-functions/printf.texi: Likewise.
* doc/posix-functions/snprintf.texi: Likewise.
* doc/posix-functions/sprintf.texi: Likewise.
* doc/posix-functions/vdprintf.texi: Likewise.
* doc/posix-functions/vfprintf.texi: Likewise.
* doc/posix-functions/vprintf.texi: Likewise.
* doc/posix-functions/vsnprintf.texi: Likewise.
* doc/posix-functions/vsprintf.texi: Likewise.

12 files changed:
ChangeLog
doc/posix-functions/dprintf.texi
doc/posix-functions/fprintf.texi
doc/posix-functions/printf.texi
doc/posix-functions/snprintf.texi
doc/posix-functions/sprintf.texi
doc/posix-functions/vdprintf.texi
doc/posix-functions/vfprintf.texi
doc/posix-functions/vprintf.texi
doc/posix-functions/vsnprintf.texi
doc/posix-functions/vsprintf.texi
m4/printf.m4

index 5db390f44999cdba1d9256392d008825dfbcf9b9..3720de04aa39a7f918f8c15ea8db035d8b2ce311 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,19 @@
+2011-06-19  Bruno Haible  <bruno@clisp.org>
+
+       sprintf-posix: Fix test failure on AIX 7.1.
+       * m4/printf.m4 (gl_PRINTF_PRECISION): Test against AIX bug.
+       * doc/posix-functions/dprintf.texi: Mention limited precision problem
+       on AIX.
+       * doc/posix-functions/fprintf.texi: Likewise.
+       * doc/posix-functions/printf.texi: Likewise.
+       * doc/posix-functions/snprintf.texi: Likewise.
+       * doc/posix-functions/sprintf.texi: Likewise.
+       * doc/posix-functions/vdprintf.texi: Likewise.
+       * doc/posix-functions/vfprintf.texi: Likewise.
+       * doc/posix-functions/vprintf.texi: Likewise.
+       * doc/posix-functions/vsnprintf.texi: Likewise.
+       * doc/posix-functions/vsprintf.texi: Likewise.
+
 2011-06-19  Bruno Haible  <bruno@clisp.org>
 
        roundl-ieee: Fix test failure on AIX 7.1.
index e267cda4614091c05ab2bce77f9aa4eb1bdf35f1..868e59578f1f3c1f1b65bc3df7f1a1d8a49b1e2d 100644 (file)
@@ -20,6 +20,10 @@ Portability problems fixed by Gnulib module @code{dprintf-posix}:
 This function does not support the @samp{a} and @samp{A} directives on some
 platforms:
 glibc-2.3.6.
+@item
+This function does not support precisions larger than 512 or 1024 in integer,
+floating-point and pointer output on some platforms:
+AIX 7.1.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 3948018b6cc0ee1513a687592c50b239607db10b..621f40780f0a7a3d5b36f99ccac2b17773dd6056 100644 (file)
@@ -53,7 +53,7 @@ MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
-Solaris 10/x86, mingw, BeOS.
+AIX 7.1, Solaris 10/x86, mingw, BeOS.
 @item
 This function mishandles large floating point precisions
 (for example, formatting 1.0 with @samp{"%.511f"})
index db7218b40115931b9ad91140fd908531a78da779..20766766c600a226886fbe51aa3ccf210d12b8d9 100644 (file)
@@ -53,7 +53,7 @@ MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
-Solaris 10/x86, mingw, BeOS.
+AIX 7.1, Solaris 10/x86, mingw, BeOS.
 @item
 This function mishandles large floating point precisions
 (for example, formatting 1.0 with @samp{"%.511f"})
index aa3280862e7985afe423ce58e67ae1a5de97ea5e..d295cea850e97459717db3735ec79b4a970145e5 100644 (file)
@@ -67,7 +67,7 @@ MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
-Solaris 10/x86, mingw, BeOS.
+AIX 7.1, Solaris 10/x86, mingw, BeOS.
 @item
 This function mishandles large floating point precisions
 (for example, formatting 1.0 with @samp{"%.511f"})
index ad6671f6ba4a5ceac8c388748503ef57fa1d7226..e20811942abc1c7c5222e78cc45ef8d85b79c758 100644 (file)
@@ -53,7 +53,7 @@ MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
-Solaris 10/x86, mingw, BeOS.
+AIX 7.1, Solaris 10/x86, mingw, BeOS.
 @item
 This function mishandles large floating point precisions
 (for example, formatting 1.0 with @samp{"%.511f"})
index 8b06c3e3ab2729ae48ba47f998b513001f38e744..bf071be77099eefa5f95ad974fbbbfe933820a50 100644 (file)
@@ -37,7 +37,7 @@ BeOS.
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
-BeOS.
+AIX 7.1, BeOS.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index 4999fb5b233219529be54834b45854849ffeeb18..31f0753305b54dd594404b030b8f5be38bf9b580 100644 (file)
@@ -53,7 +53,7 @@ MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
-Solaris 10/x86, mingw, BeOS.
+AIX 7.1, Solaris 10/x86, mingw, BeOS.
 @item
 This function mishandles large floating point precisions
 (for example, formatting 1.0 with @samp{"%.511f"})
index 7534e01c0ee208675ee229a5f5080784d9dbbe50..7d35ae0ea6e0d3f6d892d450a557188fdfdbbab5 100644 (file)
@@ -53,7 +53,7 @@ MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
-Solaris 10/x86, mingw, BeOS.
+AIX 7.1, Solaris 10/x86, mingw, BeOS.
 @item
 This function mishandles large floating point precisions
 (for example, formatting 1.0 with @samp{"%.511f"})
index 2ea98cbb978c9a773c74241a287ea021c3ad9daf..e391f35e91087779ac869435040e463e946310d8 100644 (file)
@@ -67,7 +67,7 @@ MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
-Solaris 10/x86, mingw, BeOS.
+AIX 7.1, Solaris 10/x86, mingw, BeOS.
 @item
 This function mishandles large floating point precisions
 (for example, formatting 1.0 with @samp{"%.511f"})
index 39203d0d33f002f56584dd706dd82580c5203c39..0c37dd5975a7cc7d48833de1c9df7ee5843e969e 100644 (file)
@@ -53,7 +53,7 @@ MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11
 @item
 This function does not support precisions larger than 512 or 1024 in integer,
 floating-point and pointer output on some platforms:
-Solaris 10/x86, mingw, BeOS.
+AIX 7.1, Solaris 10/x86, mingw, BeOS.
 @item
 This function mishandles large floating point precisions
 (for example, formatting 1.0 with @samp{"%.511f"})
index 9c2ed1ef2fba46d352938c48acdeebb5ce4a0b33..ead5eceaed1750540db7413deb2ff7da7d802ae4 100644 (file)
@@ -1,4 +1,4 @@
-# printf.m4 serial 42
+# printf.m4 serial 43
 dnl Copyright (C) 2003, 2007-2011 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -892,7 +892,8 @@ dnl On mingw, precisions larger than 512 are treated like 512, in integer,
 dnl floating-point or pointer output. On Solaris 10/x86, precisions larger
 dnl than 510 in floating-point output crash the program. On Solaris 10/SPARC,
 dnl precisions larger than 510 in floating-point output yield wrong results.
-dnl On BeOS, precisions larger than 1044 crash the program.
+dnl On AIX 7.1, precisions larger than 998 in floating-point output yield
+dnl wrong results. On BeOS, precisions larger than 1044 crash the program.
 dnl Result is gl_cv_func_printf_precision.
 
 AC_DEFUN([gl_PRINTF_PRECISION],
@@ -921,6 +922,9 @@ int main ()
   if (sprintf (buf, "%.511f %d", 1.0, 33, 44) < 511 + 5
       || buf[0] != '1')
     result |= 4;
+  if (sprintf (buf, "%.999f %d", 1.0, 33, 44) < 999 + 5
+      || buf[0] != '1')
+    result |= 4;
   return result;
 }]])],
         [gl_cv_func_printf_precision=yes],
@@ -1465,7 +1469,8 @@ dnl   Solaris 11 2010-11             .  .  #  #  #  .  .  #  .  .  .  #  .  .  .
 dnl   Solaris 10                     .  .  #  #  #  .  .  #  .  .  .  #  #  .  .  .  .  .  .  .
 dnl   Solaris 2.6 ... 9              #  .  #  #  #  #  .  #  .  .  .  #  #  .  .  .  #  .  .  .
 dnl   Solaris 2.5.1                  #  .  #  #  #  #  .  #  .  .  .  #  .  .  #  #  #  #  #  #
-dnl   AIX 5.2, 7.1                   .  .  #  #  #  .  .  .  .  .  .  #  .  .  .  .  .  .  .  .
+dnl   AIX 7.1                        .  .  #  #  #  .  .  .  .  .  .  #  #  .  .  .  .  .  .  .
+dnl   AIX 5.2                        .  .  #  #  #  .  .  .  .  .  .  #  .  .  .  .  .  .  .  .
 dnl   AIX 4.3.2, 5.1                 #  .  #  #  #  #  .  .  .  .  .  #  .  .  .  .  #  .  .  .
 dnl   HP-UX 11.31                    .  .  .  .  #  .  .  .  .  .  .  #  .  .  .  .  #  #  .  .
 dnl   HP-UX 11.{00,11,23}            #  .  .  .  #  #  .  .  .  .  .  #  .  .  .  .  #  #  .  #