]> git.puffer.fish Git - matthieu/frr.git/commit
lib/printf: Implement N2680.
authorDag-Erling Smørgrav <des@FreeBSD.org>
Thu, 7 Sep 2023 06:14:44 +0000 (06:14 +0000)
committerDavid Lamparter <equinox@opensourcerouting.org>
Sun, 10 Mar 2024 14:29:17 +0000 (15:29 +0100)
commitc9170233809c149808389837be754c52b3bbdd74
tree0fc8bf9b73ec40dd87f066e1805f3f7680967562
parentaa6ceeeb5b1f92280ee79716e68d31c9a8686230
lib/printf: Implement N2680.

This adds specific width length modifiers in the form of wN and wfN
(where N is 8, 16, 32, or 64) which allow printing intN_t and
int_fastN_t without resorting to casts or PRI macros.

Reviewed by: imp, emaste
Differential Revision: https://reviews.freebsd.org/D41725

FRR changes only include printf(), scanf/strtol are not locally
implemented in FRR.  Also added "(void) 0" to empty "else ..." to
avoid a compiler warning.

Signed-off-by: David Lamparter <equinox@opensourcerouting.org>
(cherry picked from FreeBSD commit bce0bef3c6abab92c7ac8cc23b7cc632a382721e)
lib/printf/printflocal.h
lib/printf/vfprintf.c