diff options
author | Bruno Haible <bruno@clisp.org> | 2023-03-17 22:45:56 +0100 |
---|---|---|
committer | Bruno Haible <bruno@clisp.org> | 2023-03-17 22:45:56 +0100 |
commit | bb7cf2b64d2caf381249dda65ee0fe6766d9b3c6 (patch) | |
tree | 8f677d8de76d0bdbcd61ec347e926ad1bd325e3a /doc/posix-functions/dprintf.texi | |
parent | 21ed6e8365e371b9088df727d0449133df58e9bc (diff) | |
download | gnulib-bb7cf2b64d2caf381249dda65ee0fe6766d9b3c6.tar.gz |
*printf-posix: ISO C 23: Add %b directive for binary output of integers.
* lib/printf-parse.c (PRINTF_PARSE): Recognize the 'b' directive.
* lib/printf-parse.h: Update comment.
* lib/wprintf-parse.h: Likewise.
* lib/vasnprintf.c (MAX_ROOM_NEEDED, VASNPRINTF): Add support for the
'b' directive.
* m4/printf.m4 (gl_PRINTF_DIRECTIVE_B): New macro.
* m4/vasnprintf.m4 (gl_PREREQ_VASNPRINTF_DIRECTIVE_B): New macro.
(gl_PREREQ_VASNPRINTF_WITH_EXTRAS): Invoke it.
* m4/vasnwprintf-posix.m4 (gl_FUNC_VASNWPRINTF_POSIX): Invoke
gl_PREREQ_VASNPRINTF_DIRECTIVE_B.
* m4/dprintf-posix.m4 (gl_FUNC_DPRINTF_POSIX): Require
gl_PRINTF_DIRECTIVE_B and test its result. Invoke
gl_PREREQ_VASNPRINTF_DIRECTIVE_B.
* m4/fprintf-posix.m4 (gl_FUNC_FPRINTF_POSIX): Likewise.
* m4/obstack-printf-posix.m4 (gl_FUNC_OBSTACK_PRINTF_POSIX): Likewise.
* m4/snprintf-posix.m4 (gl_FUNC_SNPRINTF_POSIX): Likewise.
* m4/sprintf-posix.m4 (gl_FUNC_SPRINTF_POSIX): Likewise.
* m4/vasnprintf-posix.m4 (gl_FUNC_VASNPRINTF_POSIX): Likewise.
* m4/vasprintf-posix.m4 (gl_FUNC_VASPRINTF_POSIX): Likewise.
* m4/vdprintf-posix.m4 (gl_FUNC_VDPRINTF_POSIX): Likewise.
* m4/vfprintf-posix.m4 (gl_FUNC_VFPRINTF_POSIX): Likewise.
* m4/vsnprintf-posix.m4 (gl_FUNC_VSNPRINTF_POSIX): Likewise.
* m4/vsprintf-posix.m4 (gl_FUNC_VSPRINTF_POSIX): Likewise.
* tests/test-snprintf-posix.h (test_function): Add some tests of the %b
directive.
* tests/test-sprintf-posix.h (test_function): Likewise.
* tests/test-vasnprintf-posix.c (test_function): Likewise.
* tests/test-vasnwprintf-posix.c (test_function): Likewise.
* tests/test-vasprintf-posix.c (test_function): Likewise.
* doc/glibc-functions/asprintf.texi: Mention the 'b' directive.
* doc/glibc-functions/obstack_printf.texi: Likewise.
* doc/glibc-functions/obstack_vprintf.texi: Likewise.
* doc/glibc-functions/vasprintf.texi: Likewise.
* doc/posix-functions/dprintf.texi: Likewise.
* doc/posix-functions/fprintf.texi: Likewise.
* doc/posix-functions/fwprintf.texi: Likewise.
* doc/posix-functions/printf.texi: Likewise.
* doc/posix-functions/snprintf.texi: Likewise.
* doc/posix-functions/sprintf.texi: Likewise.
* doc/posix-functions/swprintf.texi: Likewise.
* doc/posix-functions/vdprintf.texi: Likewise.
* doc/posix-functions/vfprintf.texi: Likewise.
* doc/posix-functions/vfwprintf.texi: Likewise.
* doc/posix-functions/vprintf.texi: Likewise.
* doc/posix-functions/vsnprintf.texi: Likewise.
* doc/posix-functions/vsprintf.texi: Likewise.
* doc/posix-functions/vswprintf.texi: Likewise.
* doc/posix-functions/vwprintf.texi: Likewise.
* doc/posix-functions/wprintf.texi: Likewise.
Diffstat (limited to 'doc/posix-functions/dprintf.texi')
-rw-r--r-- | doc/posix-functions/dprintf.texi | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/doc/posix-functions/dprintf.texi b/doc/posix-functions/dprintf.texi index 51428d036f..7d5aeb9051 100644 --- a/doc/posix-functions/dprintf.texi +++ b/doc/posix-functions/dprintf.texi @@ -24,6 +24,11 @@ This function does not support the @samp{a} and @samp{A} directives on some platforms: glibc-2.3.6, Solaris 11.4. @item +This function does not support the @samp{b} directive, required by ISO C23, +on some platforms: +glibc 2.34, musl libc, macOS 12.5, FreeBSD 13.1, NetBSD 9.0, OpenBSD 7.2, +AIX 7.2, Solaris 11.4, Cygwin 2.9.0. +@item This function does not support the @samp{n} directive on some platforms: glibc when used with @code{_FORTIFY_SOURCE >= 2} (set by default on Ubuntu), macOS 11.1. |