poll tests: Avoid test failure on BSD and Solaris systems.
[gnulib.git] / doc / posix-functions / vsprintf.texi
blob684ecf3631eda1a4a17881c0eb3b4996cd3d3e40
1 @node vsprintf
2 @section @code{vsprintf}
3 @findex vsprintf
5 POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9699919799/functions/vsprintf.html}
7 Gnulib module: vsprintf-posix
9 Portability problems fixed by Gnulib:
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, Solaris 9, Cygwin 1.5.24, mingw, MSVC 14.
15 @item
16 printf of @samp{long double} numbers is unsupported on some platforms:
17 mingw, MSVC 14.
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, Solaris 11.4, mingw, MSVC 14.
22 @item
23 This function does not support the @samp{a} and @samp{A} directives on some
24 platforms:
25 glibc-2.3.6, Mac OS X 10.5, NetBSD 9.0, OpenBSD 4.0, AIX 5.2, HP-UX 11,
26 IRIX 6.5, Solaris 11.4, Cygwin 1.5.x, mingw, MSVC 14.
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, Solaris 9,
30 Cygwin 1.5.x, mingw, MSVC 14.
31 @item
32 This function does not support the @samp{n} directive on some platforms:
33 glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu),
34 Mac OS X 10.13, MSVC 14.
35 @item
36 This function does not support the @samp{ls} directive on some platforms:
37 OpenBSD 4.0, IRIX 6.5, Cygwin 1.5.x, Haiku.
38 @item
39 This function does not support precisions in the @samp{ls} directive correctly
40 on some platforms:
41 Solaris 11.4.
42 @item
43 This function does not support format directives that access arguments in an
44 arbitrary order, such as @code{"%2$s"}, on some platforms:
45 NetBSD 3.0, mingw, MSVC 14.
46 @item
47 This function doesn't support the @code{'} flag on some platforms:
48 NetBSD 3.0, Cygwin 1.5.24, mingw, MSVC 14.
49 @item
50 This function does not round the argument of the @samp{a} directive correctly
51 on some platforms:
52 Mac OS X 10.12, FreeBSD 6.1.
53 @item
54 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded
55 with zeroes, or wrong capitalization) on some platforms:
56 Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, Solaris 11.4, Cygwin 1.5.x, mingw, MSVC/clang.
57 @item
58 This function does not support precisions larger than 512 or 1024 in integer,
59 floating-point and pointer output on some platforms:
60 AIX 7.1, Solaris 10/x86, mingw, MSVC/clang.
61 @item
62 This function mishandles large floating point precisions
63 (for example, formatting 1.0 with @samp{"%.511f"})
64 on some platforms:
65 Solaris 10.
66 @item
67 This function can crash in out-of-memory conditions on some platforms:
68 FreeBSD 6.0, NetBSD 5.0.
69 @end itemize
71 Portability problems not fixed by Gnulib:
72 @itemize
73 @item
74 The @code{%m} directive is not portable, use @code{%s} mapped to an
75 argument of @code{strerror(errno)} (or a version of @code{strerror_r})
76 instead.
77 @item
78 Formatting noncanonical @samp{long double} numbers produces
79 nonmeaningful results on some platforms:
80 glibc and others, on x86, x86_64, IA-64 CPUs.
81 @item
82 When formatting an integer with grouping flag, this function inserts thousands
83 separators even in the "C" locale on some platforms:
84 NetBSD 5.1.
85 @end itemize