docs: document recently fixed glibc printf bug
[gnulib.git] / doc / posix-functions / vfprintf.texi
1 @node vfprintf
2 @section @code{vfprintf}
3 @findex vfprintf
4
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/vfprintf.html}
6
7 Gnulib module: vfprintf-posix or stdio, nonblocking, sigpipe
8
9 Portability problems fixed by Gnulib module @code{vfprintf-posix}:
10 @itemize
11 @item
12 This function does not support size specifiers as in C99 (@code{hh}, @code{ll},
13 @code{j}, @code{t}, @code{z}) on some platforms:
14 AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.24, mingw, BeOS.
15 @item
16 printf of @samp{long double} numbers is unsupported on some platforms:
17 mingw, BeOS.
18 @item
19 printf @code{"%f"}, @code{"%e"}, @code{"%g"} of Infinity and NaN yields an
20 incorrect result on some platforms:
21 AIX 5.2, OSF/1 5.1, Solaris 11 2010-11, mingw.
22 @item
23 This function does not support the @samp{a} and @samp{A} directives on some
24 platforms:
25 glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
26 IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin 1.5.x, mingw, BeOS.
27 @item
28 This function does not support the @samp{F} directive on some platforms:
29 NetBSD 3.0, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9,
30 Cygwin 1.5.x, mingw, BeOS.
31 @item
32 This function does not support the @samp{ls} directive on some platforms:
33 OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Cygwin 1.5.x, Haiku.
34 @item
35 This function does not support precisions in the @samp{ls} directive correctly
36 on some platforms:
37 Solaris 11 2010-11.
38 @item
39 This function does not support format directives that access arguments in an
40 arbitrary order, such as @code{"%2$s"}, on some platforms:
41 NetBSD 3.0, mingw, BeOS.
42 @item
43 This function doesn't support the @code{'} flag on some platforms:
44 NetBSD 3.0, Cygwin 1.5.24, mingw.
45 @item
46 This function behaves incorrectly when a @samp{-} flag and a negative width
47 are specified together, on some platforms:
48 HP-UX 10.20.
49 @item
50 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
51 with zeroes) on some platforms:
52 MacOS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin 1.5.x, mingw.
53 @item
54 This function does not support precisions larger than 512 or 1024 in integer,
55 floating-point and pointer output on some platforms:
56 Solaris 10/x86, mingw, BeOS.
57 @item
58 This function mishandles large floating point precisions
59 (for example, formatting 1.0 with @samp{"%.511f"})
60 on some platforms:
61 Solaris 10.
62 @item
63 This function can crash in out-of-memory conditions on some platforms:
64 MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
65 @end itemize
66
67 Portability problems fixed by Gnulib module @code{stdio} or @code{vfprintf-posix}, together with module @code{nonblocking}:
68 @itemize
69 @item
70 When writing to a non-blocking pipe whose buffer is full, this function fails
71 with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
72 platforms:
73 mingw.
74 @end itemize
75
76 Portability problems fixed by Gnulib module @code{stdio} or @code{vfprintf-posix}, together with module @code{sigpipe}:
77 @itemize
78 @item
79 When writing to a pipe with no readers, this function fails, instead of
80 obeying the current @code{SIGPIPE} handler, on some platforms:
81 mingw.
82 @end itemize
83
84 Portability problems not fixed by Gnulib:
85 @itemize
86 @item
87 Attempting to write to a read-only stream fails with @code{EOF} but
88 does not set the error flag for @code{ferror} on some platforms:
89 glibc 2.13.
90 @end itemize