Mercurial > gnulib
annotate doc/posix-functions/snprintf.texi @ 39913:73d60b1f9c96
doc: Update for Solaris 11.4.
* doc/**/*.texi: For bugs that exist in both Solaris 11.3 and 11.4,
mention Solaris 11.4.
* m4/printf.m4: Update comments about Solaris.
* m4/log.m4: Likewise.
* m4/log10.m4: Likewise.
* m4/logb.m4: Likewise.
* m4/logbf.m4: Likewise.
* m4/logbl.m4: Likewise.
* m4/rename.m4: Likewise.
* m4/wcrtomb.m4: Likewise.
* m4/hostent.m4: Likewise.
* m4/servent.m4: Likewise.
author | Bruno Haible <bruno@clisp.org> |
---|---|
date | Sun, 14 Oct 2018 09:33:46 +0200 |
parents | 11af6bbd6df5 |
children | db717b5315cf |
rev | line source |
---|---|
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
1 @node snprintf |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
2 @section @code{snprintf} |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
3 @findex snprintf |
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/snprintf.html} |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
6 |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
7 Gnulib module: snprintf or snprintf-posix |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
8 |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
9 Portability problems fixed by either Gnulib module @code{snprintf} or @code{snprintf-posix}: |
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 is missing on some platforms: |
18977 | 13 IRIX 5.3, OSF/1 4.0, Solaris 2.5.1, MSVC 14. |
9941
b1a61ff4ff40
Document snprintf bug on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents:
9674
diff
changeset
|
14 @item |
15340
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
15296
diff
changeset
|
15 This function does not support format directives that access arguments in an |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
15296
diff
changeset
|
16 arbitrary order, such as @code{"%2$s"}, on some platforms: |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
15296
diff
changeset
|
17 NetBSD 3.0, mingw, BeOS. |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
15296
diff
changeset
|
18 @item |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
15296
diff
changeset
|
19 This function does not return a byte count as specified in C99 on some |
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
15296
diff
changeset
|
20 platforms: |
14003
f82a977dcf0b
vsnprintf: make more consistent with snprintf; doc fixes
Paul Eggert <eggert@cs.ucla.edu>
parents:
14001
diff
changeset
|
21 HP-UX 11, IRIX 6.5, OSF/1 5.1, Solaris 9, mingw. |
f82a977dcf0b
vsnprintf: make more consistent with snprintf; doc fixes
Paul Eggert <eggert@cs.ucla.edu>
parents:
14001
diff
changeset
|
22 @item |
9941
b1a61ff4ff40
Document snprintf bug on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents:
9674
diff
changeset
|
23 This function overwrites memory even when a size argument of 1 is passed on some |
b1a61ff4ff40
Document snprintf bug on Linux libc5.
Bruno Haible <bruno@clisp.org>
parents:
9674
diff
changeset
|
24 platforms: |
15340
03a50862ef09
snprintf: guarantee %1$d, for libintl
Eric Blake <eblake@redhat.com>
parents:
15296
diff
changeset
|
25 Linux libc5, BeOS. |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
26 @end itemize |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
27 |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
28 Portability problems fixed by Gnulib module @code{snprintf-posix}: |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
29 @itemize |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
30 @item |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
31 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
|
32 @code{j}, @code{t}, @code{z}) on some platforms: |
18977 | 33 AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9, Cygwin 1.5.24, mingw, MSVC 14, BeOS. |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
34 @item |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
35 printf of @samp{long double} numbers is unsupported on some platforms: |
18977 | 36 mingw, MSVC 14, BeOS. |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
37 @item |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
38 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
|
39 incorrect result on some platforms: |
39913
73d60b1f9c96
doc: Update for Solaris 11.4.
Bruno Haible <bruno@clisp.org>
parents:
19242
diff
changeset
|
40 AIX 5.2, OSF/1 5.1, Solaris 11.4, mingw, MSVC 14. |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
41 @item |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
42 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
|
43 platforms: |
16935
498a2211d839
Write "Mac OS X" instead of "MacOS X".
Bruno Haible <bruno@clisp.org>
parents:
16799
diff
changeset
|
44 glibc-2.3.6, Mac OS X 10.5, NetBSD 5.0, OpenBSD 4.0, AIX 5.2, HP-UX 11, |
39913
73d60b1f9c96
doc: Update for Solaris 11.4.
Bruno Haible <bruno@clisp.org>
parents:
19242
diff
changeset
|
45 IRIX 6.5, OSF/1 5.1, Solaris 11.4, Cygwin 1.5.x, mingw, MSVC 14, BeOS. |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
46 @item |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
47 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
|
48 NetBSD 3.0, AIX 5.1, HP-UX 11.23, IRIX 6.5, OSF/1 5.1, Solaris 9, |
18977 | 49 Cygwin 1.5.x, mingw, MSVC 14, BeOS. |
15591
2171e9d2231b
*printf: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15340
diff
changeset
|
50 @item |
2171e9d2231b
*printf: Add support for MSVC compiler.
Bruno Haible <bruno@clisp.org>
parents:
15340
diff
changeset
|
51 This function does not support the @samp{n} directive on some platforms: |
18977 | 52 MSVC 14. |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
53 @item |
11219
aaeb2f86d096
Fix *printf behaviour regarding the %ls directive.
Bruno Haible <bruno@clisp.org>
parents:
11048
diff
changeset
|
54 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
|
55 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
|
56 @item |
11223
41012a39667b
Work around a *printf bug with %ls on Solaris.
Bruno Haible <bruno@clisp.org>
parents:
11219
diff
changeset
|
57 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
|
58 on some platforms: |
39913
73d60b1f9c96
doc: Update for Solaris 11.4.
Bruno Haible <bruno@clisp.org>
parents:
19242
diff
changeset
|
59 Solaris 11.4. |
11223
41012a39667b
Work around a *printf bug with %ls on Solaris.
Bruno Haible <bruno@clisp.org>
parents:
11219
diff
changeset
|
60 @item |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
61 This function doesn't support the @code{'} flag on some platforms: |
18977 | 62 NetBSD 3.0, Cygwin 1.5.24, mingw, MSVC 14. |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
63 @item |
18803
f581ad1383c6
*printf: Work around rounding bug on Mac OS X.
Bruno Haible <bruno@clisp.org>
parents:
17927
diff
changeset
|
64 This function does not round the argument of the @samp{a} directive correctly |
f581ad1383c6
*printf: Work around rounding bug on Mac OS X.
Bruno Haible <bruno@clisp.org>
parents:
17927
diff
changeset
|
65 on some platforms: |
f581ad1383c6
*printf: Work around rounding bug on Mac OS X.
Bruno Haible <bruno@clisp.org>
parents:
17927
diff
changeset
|
66 Mac OS X 10.12, FreeBSD 6.1. |
f581ad1383c6
*printf: Work around rounding bug on Mac OS X.
Bruno Haible <bruno@clisp.org>
parents:
17927
diff
changeset
|
67 @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
|
68 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
|
69 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
|
70 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
|
71 @item |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
72 printf @code{"%010f"} of NaN and Infinity yields an incorrect result (padded |
39913
73d60b1f9c96
doc: Update for Solaris 11.4.
Bruno Haible <bruno@clisp.org>
parents:
19242
diff
changeset
|
73 with zeroes, or wrong capitalization) on some platforms: |
73d60b1f9c96
doc: Update for Solaris 11.4.
Bruno Haible <bruno@clisp.org>
parents:
19242
diff
changeset
|
74 Mac OS X 10.5, FreeBSD 6.0, NetBSD 5.0, AIX 5.2, IRIX 6.5, OSF/1 5.1, Solaris 11.4, Cygwin 1.5.x, mingw, MSVC 14. |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
75 @item |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
76 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
|
77 floating-point and pointer output on some platforms: |
18977 | 78 AIX 7.1, Solaris 10/x86, mingw, MSVC 14, BeOS. |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
79 @item |
14005
f585ecc144aa
*printf: Detect large precisions bug on Solaris 10/SPARC.
Bruno Haible <bruno@clisp.org>
parents:
14003
diff
changeset
|
80 This function mishandles large floating point precisions |
f585ecc144aa
*printf: Detect large precisions bug on Solaris 10/SPARC.
Bruno Haible <bruno@clisp.org>
parents:
14003
diff
changeset
|
81 (for example, formatting 1.0 with @samp{"%.511f"}) |
f585ecc144aa
*printf: Detect large precisions bug on Solaris 10/SPARC.
Bruno Haible <bruno@clisp.org>
parents:
14003
diff
changeset
|
82 on some platforms: |
f585ecc144aa
*printf: Detect large precisions bug on Solaris 10/SPARC.
Bruno Haible <bruno@clisp.org>
parents:
14003
diff
changeset
|
83 Solaris 10. |
f585ecc144aa
*printf: Detect large precisions bug on Solaris 10/SPARC.
Bruno Haible <bruno@clisp.org>
parents:
14003
diff
changeset
|
84 @item |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
85 This function can crash in out-of-memory conditions on some platforms: |
16935
498a2211d839
Write "Mac OS X" instead of "MacOS X".
Bruno Haible <bruno@clisp.org>
parents:
16799
diff
changeset
|
86 Mac OS 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
|
87 @item |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
88 This function does not truncate the result as specified in C99 on some platforms: |
18977 | 89 mingw, MSVC 14. |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
90 @item |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
91 This function does not fully support the @samp{n} directive on some platforms: |
18977 | 92 HP-UX 11, mingw, MSVC 14. |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
93 @item |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
94 This function overwrites memory even when a zero size argument is passed on some |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
95 platforms: |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
96 OSF/1 5.1. |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
97 @end itemize |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
98 |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
99 Portability problems not fixed by Gnulib: |
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
100 @itemize |
16232 | 101 @item |
17927
b941bb9e9efb
printf, isinf, etc.: noncanonical != NaN
Paul Eggert <eggert@cs.ucla.edu>
parents:
16935
diff
changeset
|
102 Formatting noncanonical @samp{long double} numbers produces |
b941bb9e9efb
printf, isinf, etc.: noncanonical != NaN
Paul Eggert <eggert@cs.ucla.edu>
parents:
16935
diff
changeset
|
103 nonmeaningful results on some platforms: |
b941bb9e9efb
printf, isinf, etc.: noncanonical != NaN
Paul Eggert <eggert@cs.ucla.edu>
parents:
16935
diff
changeset
|
104 glibc and others, on x86, x86_64, IA-64 CPUs. |
b941bb9e9efb
printf, isinf, etc.: noncanonical != NaN
Paul Eggert <eggert@cs.ucla.edu>
parents:
16935
diff
changeset
|
105 @item |
16232 | 106 When formatting an integer with grouping flag, this function inserts thousands |
107 separators even in the "C" locale on some platforms: | |
108 NetBSD 5.1. | |
9638
070329237839
Rename two directories: headers -> posix-headers, functions -> posix-functions.
Bruno Haible <bruno@clisp.org>
parents:
diff
changeset
|
109 @end itemize |