From: Bruno Haible Date: Sun, 19 Jun 2011 14:06:42 +0000 (+0200) Subject: sprintf-posix: Fix test failure on AIX 7.1. X-Git-Tag: v0.1~2230 X-Git-Url: http://erislabs.net/gitweb/?a=commitdiff_plain;h=0a60d07d13071dcaa8da14d3c1740668670b78e4;hp=42477674eaabe9da1eb5d5d8fc2cca5e2de319a0;p=gnulib.git 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. --- diff --git a/ChangeLog b/ChangeLog index 5db390f44..3720de04a 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,21 @@ 2011-06-19 Bruno Haible + 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 + roundl-ieee: Fix test failure on AIX 7.1. * m4/roundl.m4 (gl_FUNC_ROUNDL): Test also the sign of roundl (-0.3L). * doc/posix-functions/roundl.texi: Mention problem with negative diff --git a/doc/posix-functions/dprintf.texi b/doc/posix-functions/dprintf.texi index e267cda46..868e59578 100644 --- a/doc/posix-functions/dprintf.texi +++ b/doc/posix-functions/dprintf.texi @@ -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: diff --git a/doc/posix-functions/fprintf.texi b/doc/posix-functions/fprintf.texi index 3948018b6..621f40780 100644 --- a/doc/posix-functions/fprintf.texi +++ b/doc/posix-functions/fprintf.texi @@ -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"}) diff --git a/doc/posix-functions/printf.texi b/doc/posix-functions/printf.texi index db7218b40..20766766c 100644 --- a/doc/posix-functions/printf.texi +++ b/doc/posix-functions/printf.texi @@ -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"}) diff --git a/doc/posix-functions/snprintf.texi b/doc/posix-functions/snprintf.texi index aa3280862..d295cea85 100644 --- a/doc/posix-functions/snprintf.texi +++ b/doc/posix-functions/snprintf.texi @@ -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"}) diff --git a/doc/posix-functions/sprintf.texi b/doc/posix-functions/sprintf.texi index ad6671f6b..e20811942 100644 --- a/doc/posix-functions/sprintf.texi +++ b/doc/posix-functions/sprintf.texi @@ -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"}) diff --git a/doc/posix-functions/vdprintf.texi b/doc/posix-functions/vdprintf.texi index 8b06c3e3a..bf071be77 100644 --- a/doc/posix-functions/vdprintf.texi +++ b/doc/posix-functions/vdprintf.texi @@ -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: diff --git a/doc/posix-functions/vfprintf.texi b/doc/posix-functions/vfprintf.texi index 4999fb5b2..31f075330 100644 --- a/doc/posix-functions/vfprintf.texi +++ b/doc/posix-functions/vfprintf.texi @@ -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"}) diff --git a/doc/posix-functions/vprintf.texi b/doc/posix-functions/vprintf.texi index 7534e01c0..7d35ae0ea 100644 --- a/doc/posix-functions/vprintf.texi +++ b/doc/posix-functions/vprintf.texi @@ -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"}) diff --git a/doc/posix-functions/vsnprintf.texi b/doc/posix-functions/vsnprintf.texi index 2ea98cbb9..e391f35e9 100644 --- a/doc/posix-functions/vsnprintf.texi +++ b/doc/posix-functions/vsnprintf.texi @@ -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"}) diff --git a/doc/posix-functions/vsprintf.texi b/doc/posix-functions/vsprintf.texi index 39203d0d3..0c37dd597 100644 --- a/doc/posix-functions/vsprintf.texi +++ b/doc/posix-functions/vsprintf.texi @@ -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"}) diff --git a/m4/printf.m4 b/m4/printf.m4 index 9c2ed1ef2..ead5eceae 100644 --- a/m4/printf.m4 +++ b/m4/printf.m4 @@ -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} # . . . # # . . . . . # . . . . # # . #