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