]> git.ipfire.org Git - thirdparty/glibc.git/commit
Update printf %b/%B C2x support
authorJoseph Myers <joseph@codesourcery.com>
Tue, 14 Mar 2023 16:58:35 +0000 (16:58 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 14 Mar 2023 16:58:35 +0000 (16:58 +0000)
commit2d4728e60621c8844ec679291aa5458c622d8f4f
tree67fc945e60ec333a3c423ee634e5f5d242402824
parent447273e0bf22a3d42e05e6b16d309f3f89879bea
Update printf %b/%B C2x support

WG14 recently accepted two additions to the printf/scanf %b/%B
support: there are now PRIb* and SCNb* macros in <inttypes.h>, and
printf %B is now an optional feature defined in normative text,
instead of recommended practice, with corresponding PRIB* macros that
can also be used to test whether that optional feature is supported.
See N3072 items 14 and 15 for details (those changes were accepted,
some other changes in that paper weren't).

Add the corresponding PRI* macros to glibc and update one place in the
manual referring to %B as recommended.  (SCNb* should naturally be
added at the same time as the corresponding scanf %b support.)

Tested for x86_64 and x86.
NEWS
manual/stdio.texi
stdio-common/tst-printf-binary-main.c
stdlib/inttypes.h