annotate doc/posix-functions/vfprintf.texi @ 14888:805e07cd88c7

test-perror: relax test to ignore cygwin bug glibc was not the only platform where fprintf(fopen(,"r")) fails to detect errors; cygwin 1.7.9 is another culprit (although it will be fixed for 1.7.10), and I suspect that several other platforms were failing perror2 for the same reason. At this point, there are so many functions affected, and the way to avoid the bug is easy enough (don't pass bogus streams to output-producing functions), that I'm not worried about fixing things other than to document them. * tests/test-perror2.c (main): Relax test on requiring detection of stream errors, and use unbuffered stream. * doc/posix-functions/dprintf.texi (dprintf): Document bug. * doc/posix-functions/fprintf.texi (fprintf): Likewise. * doc/posix-functions/fputc.texi (fputc): Likewise. * doc/posix-functions/fputs.texi (fputs): Likewise. * doc/posix-functions/fputws.texi (fputws): Likewise. * doc/posix-functions/fwprintf.texi (fwprintf): Likewise. * doc/posix-functions/fwrite.texi (fwrite): Likewise. * doc/posix-functions/getopt.texi (getopt): Likewise. * doc/posix-functions/perror.texi (perror): Likewise. * doc/posix-functions/printf.texi (printf): Likewise. * doc/posix-functions/psiginfo.texi (psiginfo): Likewise. * doc/posix-functions/psignal.texi (psignal): Likewise. * doc/posix-functions/putc.texi (putc): Likewise. * doc/posix-functions/putc_unlocked.texi (putc_unlocked): Likewise. * doc/posix-functions/putchar.texi (putchar): Likewise. * doc/posix-functions/putchar_unlocked.texi (putchar_unlocked): Likewise. * doc/posix-functions/puts.texi (puts): Likewise. * doc/posix-functions/putwc.texi (putwc): Likewise. * doc/posix-functions/putwchar.texi (putwchar): Likewise. * doc/posix-functions/vdprintf.texi (vdprintf): Likewise. * doc/posix-functions/vfprintf.texi (vfprintf): Likewise. * doc/posix-functions/vfwprintf.texi (vfwprintf): Likewise. * doc/posix-functions/vprintf.texi (vprintf): Likewise. * doc/posix-functions/vwprintf.texi (vwprintf): Likewise. * doc/posix-functions/wordexp.texi (wordexp): Likewise. * doc/posix-functions/wprintf.texi (wprintf): Likewise. Signed-off-by: Eric Blake <eblake@redhat.com>
author Eric Blake <eblake@redhat.com>
date Tue, 07 Jun 2011 15:41:20 -0600
parents 3fe3b9fc9c12
children fa0d7f167907
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
1 @node vfprintf
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
2 @section @code{vfprintf}
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
3 @findex vfprintf
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
4
13549
bb0ceefd22dc avoid some overlong lines from posix urls, etc.
Karl Berry <karl@freefriends.org>
parents: 11234
diff changeset
5 POSIX specification:@* @url{http://www.opengroup.org/onlinepubs/9699919799/functions/vfprintf.html}
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
6
14578
4e83bc0de9e4 Support non-blocking pipe I/O in write() on native Windows.
Bruno Haible <bruno@clisp.org>
parents: 14005
diff changeset
7 Gnulib module: vfprintf-posix or stdio, nonblocking, sigpipe
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
8
10487
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 9674
diff changeset
9 Portability problems fixed by Gnulib module @code{vfprintf-posix}:
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
10 @itemize
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
11 @item
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
12 This function does not support size specifiers as in C99 (@code{hh}, @code{ll},
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
13 @code{j}, @code{t}, @code{z}) on some platforms:
11048
b885f8c983db doc: mention more functions added in cygwin 1.7.0
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
14 AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.24, mingw, BeOS.
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
15 @item
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
16 printf of @samp{long double} numbers is unsupported on some platforms:
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
17 mingw, BeOS.
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
18 @item
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
19 printf @code{"%f"}, @code{"%e"}, @code{"%g"} of Infinity and NaN yields an
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
20 incorrect result on some platforms:
13917
3bbfc7e37ec2 Update for Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13908
diff changeset
21 AIX 5.2, OSF/1 5.1, Solaris 11 2010-11, mingw.
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
22 @item
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
23 This function does not support the @samp{a} and @samp{A} directives on some
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
24 platforms:
13892
ac911e0db006 Update for NetBSD 5.0.
Bruno Haible <bruno@clisp.org>
parents: 13890
diff changeset
25 glibc-2.3.6, MacOS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
13917
3bbfc7e37ec2 Update for Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13908
diff changeset
26 IRIX 6.5, OSF/1 5.1, Solaris 11 2010-11, Cygwin 1.5.x, mingw, BeOS.
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
27 @item
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
28 This function does not support the @samp{F} directive on some platforms:
11048
b885f8c983db doc: mention more functions added in cygwin 1.7.0
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
29 NetBSD 3.0, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9,
b885f8c983db doc: mention more functions added in cygwin 1.7.0
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
30 Cygwin 1.5.x, mingw, BeOS.
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
31 @item
11219
aaeb2f86d096 Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents: 11048
diff changeset
32 This function does not support the @samp{ls} directive on some platforms:
11234
cf3001cea096 Separate two tests. Mention the platforms in canonical order.
Bruno Haible <bruno@clisp.org>
parents: 11225
diff changeset
33 OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Cygwin 1.5.x, Haiku.
11219
aaeb2f86d096 Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents: 11048
diff changeset
34 @item
11223
41012a39667b Work around a *printf bug with %ls on Solaris.
Bruno Haible <bruno@clisp.org>
parents: 11219
diff changeset
35 This function does not support precisions in the @samp{ls} directive correctly
41012a39667b Work around a *printf bug with %ls on Solaris.
Bruno Haible <bruno@clisp.org>
parents: 11219
diff changeset
36 on some platforms:
13917
3bbfc7e37ec2 Update for Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13908
diff changeset
37 Solaris 11 2010-11.
11223
41012a39667b Work around a *printf bug with %ls on Solaris.
Bruno Haible <bruno@clisp.org>
parents: 11219
diff changeset
38 @item
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
39 This function does not support format directives that access arguments in an
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
40 arbitrary order, such as @code{"%2$s"}, on some platforms:
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
41 NetBSD 3.0, mingw, BeOS.
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
42 @item
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
43 This function doesn't support the @code{'} flag on some platforms:
11048
b885f8c983db doc: mention more functions added in cygwin 1.7.0
Eric Blake <ebb9@byu.net>
parents: 10876
diff changeset
44 NetBSD 3.0, Cygwin 1.5.24, mingw.
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
45 @item
9674
b69f1141e94f Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 9638
diff changeset
46 This function behaves incorrectly when a @samp{-} flag and a negative width
b69f1141e94f Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 9638
diff changeset
47 are specified together, on some platforms:
b69f1141e94f Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 9638
diff changeset
48 HP-UX 10.20.
b69f1141e94f Fix *printf behaviour regarding the left-adjust flag on HP-UX 10.20.
Bruno Haible <bruno@clisp.org>
parents: 9638
diff changeset
49 @item
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
50 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
51 with zeroes) on some platforms:
13917
3bbfc7e37ec2 Update for Solaris 11 2010-11.
Bruno Haible <bruno@clisp.org>
parents: 13908
diff changeset
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.
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
53 @item
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
54 This function does not support precisions larger than 512 or 1024 in integer,
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
55 floating-point and pointer output on some platforms:
13908
4b4e2b0d175e *printf-posix: Detect a bug on Solaris 10/x86.
Bruno Haible <bruno@clisp.org>
parents: 13892
diff changeset
56 Solaris 10/x86, mingw, BeOS.
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
57 @item
14005
f585ecc144aa *printf: Detect large precisions bug on Solaris 10/SPARC.
Bruno Haible <bruno@clisp.org>
parents: 14001
diff changeset
58 This function mishandles large floating point precisions
f585ecc144aa *printf: Detect large precisions bug on Solaris 10/SPARC.
Bruno Haible <bruno@clisp.org>
parents: 14001
diff changeset
59 (for example, formatting 1.0 with @samp{"%.511f"})
f585ecc144aa *printf: Detect large precisions bug on Solaris 10/SPARC.
Bruno Haible <bruno@clisp.org>
parents: 14001
diff changeset
60 on some platforms:
f585ecc144aa *printf: Detect large precisions bug on Solaris 10/SPARC.
Bruno Haible <bruno@clisp.org>
parents: 14001
diff changeset
61 Solaris 10.
f585ecc144aa *printf: Detect large precisions bug on Solaris 10/SPARC.
Bruno Haible <bruno@clisp.org>
parents: 14001
diff changeset
62 @item
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
63 This function can crash in out-of-memory conditions on some platforms:
13892
ac911e0db006 Update for NetBSD 5.0.
Bruno Haible <bruno@clisp.org>
parents: 13890
diff changeset
64 MacOS X 10.3, FreeBSD 6.0, NetBSD 5.0.
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
65 @end itemize
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
66
14578
4e83bc0de9e4 Support non-blocking pipe I/O in write() on native Windows.
Bruno Haible <bruno@clisp.org>
parents: 14005
diff changeset
67 Portability problems fixed by Gnulib module @code{stdio} or @code{vfprintf-posix}, together with module @code{nonblocking}:
4e83bc0de9e4 Support non-blocking pipe I/O in write() on native Windows.
Bruno Haible <bruno@clisp.org>
parents: 14005
diff changeset
68 @itemize
4e83bc0de9e4 Support non-blocking pipe I/O in write() on native Windows.
Bruno Haible <bruno@clisp.org>
parents: 14005
diff changeset
69 @item
4e83bc0de9e4 Support non-blocking pipe I/O in write() on native Windows.
Bruno Haible <bruno@clisp.org>
parents: 14005
diff changeset
70 When writing to a non-blocking pipe whose buffer is full, this function fails
4e83bc0de9e4 Support non-blocking pipe I/O in write() on native Windows.
Bruno Haible <bruno@clisp.org>
parents: 14005
diff changeset
71 with @code{errno} being set to @code{ENOSPC} instead of @code{EAGAIN} on some
4e83bc0de9e4 Support non-blocking pipe I/O in write() on native Windows.
Bruno Haible <bruno@clisp.org>
parents: 14005
diff changeset
72 platforms:
4e83bc0de9e4 Support non-blocking pipe I/O in write() on native Windows.
Bruno Haible <bruno@clisp.org>
parents: 14005
diff changeset
73 mingw.
4e83bc0de9e4 Support non-blocking pipe I/O in write() on native Windows.
Bruno Haible <bruno@clisp.org>
parents: 14005
diff changeset
74 @end itemize
4e83bc0de9e4 Support non-blocking pipe I/O in write() on native Windows.
Bruno Haible <bruno@clisp.org>
parents: 14005
diff changeset
75
10487
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 9674
diff changeset
76 Portability problems fixed by Gnulib module @code{stdio} or @code{vfprintf-posix}, together with module @code{sigpipe}:
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 9674
diff changeset
77 @itemize
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 9674
diff changeset
78 @item
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 9674
diff changeset
79 When writing to a pipe with no readers, this function fails, instead of
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 9674
diff changeset
80 obeying the current @code{SIGPIPE} handler, on some platforms:
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 9674
diff changeset
81 mingw.
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 9674
diff changeset
82 @end itemize
953f72c1ffcc Support SIGPIPE in stdio functions for writing.
Bruno Haible <bruno@clisp.org>
parents: 9674
diff changeset
83
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
84 Portability problems not fixed by Gnulib:
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
85 @itemize
14823
3fe3b9fc9c12 docs: document recently fixed glibc printf bug
Eric Blake <eblake@redhat.com>
parents: 14578
diff changeset
86 @item
3fe3b9fc9c12 docs: document recently fixed glibc printf bug
Eric Blake <eblake@redhat.com>
parents: 14578
diff changeset
87 Attempting to write to a read-only stream fails with @code{EOF} but
3fe3b9fc9c12 docs: document recently fixed glibc printf bug
Eric Blake <eblake@redhat.com>
parents: 14578
diff changeset
88 does not set the error flag for @code{ferror} on some platforms:
14888
805e07cd88c7 test-perror: relax test to ignore cygwin bug
Eric Blake <eblake@redhat.com>
parents: 14823
diff changeset
89 glibc 2.13, cygwin 1.7.9.
9638
070329237839 Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff changeset
90 @end itemize