19f8773d7e561ee55fefe9b8c67447d64e193271
[gnulib.git] / doc / posix-functions / vsnprintf.texi
1 @node vsnprintf
2 @section @code{vsnprintf}
3 @findex vsnprintf
4
5 POSIX specification: @url{http://www.opengroup.org/onlinepubs/9699919799/functions/vsnprintf.html}
6
7 Gnulib module: vsnprintf or vsnprintf-posix
8
9 Portability problems fixed by either Gnulib module @code{vsnprintf} or @code{vsnprintf-posix}:
10 @itemize
11 @item
12 This function is missing on some platforms:
13 IRIX 5.3, OSF/1 4.0, Solaris 2.5.1.
14 @item
15 This function overwrites memory even when a size argument of 1 is passed on some
16 platforms:
17 Linux libc5.
18 @end itemize
19
20 Portability problems fixed by Gnulib module @code{vsnprintf-posix}:
21 @itemize
22 @item
23 This function does not support size specifiers as in C99 (@code{hh}, @code{ll},
24 @code{j}, @code{t}, @code{z}) on some platforms:
25 AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.24, mingw, BeOS.
26 @item
27 printf of @samp{long double} numbers is unsupported on some platforms:
28 mingw, BeOS.
29 @item
30 printf @code{"%f"}, @code{"%e"}, @code{"%g"} of Infinity and NaN yields an
31 incorrect result on some platforms:
32 AIX 5.2, OSF/1 5.1, Solaris 10, mingw.
33 @item
34 This function does not support the @samp{a} and @samp{A} directives on some
35 platforms:
36 glibc-2.3.6, MacOS X 10.3, NetBSD 3.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
37 IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw, BeOS.
38 @item
39 This function does not support the @samp{F} directive on some platforms:
40 NetBSD 3.0, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9,
41 Cygwin 1.5.x, mingw, BeOS.
42 @item
43 This function does not support the @samp{ls} directive on some platforms:
44 OpenBSD 4.0, IRIX 6.5, Solaris 2.6, Cygwin 1.5.x, Haiku.
45 @item
46 This function does not support precisions in the @samp{ls} directive correctly
47 on some platforms:
48 Solaris 10.
49 @item
50 This function does not support format directives that access arguments in an
51 arbitrary order, such as @code{"%2$s"}, on some platforms:
52 NetBSD 3.0, mingw, BeOS.
53 @item
54 This function doesn't support the @code{'} flag on some platforms:
55 NetBSD 3.0, Cygwin 1.5.24, mingw.
56 @item
57 This function behaves incorrectly when a @samp{-} flag and a negative width
58 are specified together, on some platforms:
59 HP-UX 10.20.
60 @item
61 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
62 with zeroes) on some platforms:
63 MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 10, Cygwin 1.5.x, mingw.
64 @item
65 This function does not support precisions larger than 512 or 1024 in integer,
66 floating-point and pointer output on some platforms:
67 mingw, BeOS.
68 @item
69 This function can crash in out-of-memory conditions on some platforms:
70 MacOS X 10.3, FreeBSD 6.0, NetBSD 3.0.
71 @item
72 This function does not truncate the result as specified in C99 on some platforms:
73 mingw.
74 @item
75 This function does not return a byte count as specified in C99 on some platforms:
76 HP-UX 11, IRIX 6.5, OSF/1 5.1, mingw.
77 @item
78 This function does not fully support the @samp{n} directive on some platforms:
79 HP-UX 11, mingw.
80 @item
81 This function overwrites memory when a size = 1 argument is passed on some
82 platforms:
83 BeOS.
84 @item
85 This function overwrites memory even when a zero size argument is passed on some
86 platforms:
87 HP-UX 11, OSF/1 5.1.
88 @end itemize
89
90 Portability problems not fixed by Gnulib:
91 @itemize
92 @end itemize