diff options
author | Thomas Weißschuh <thomas.weissschuh@linutronix.de> | 2025-04-11 12:00:38 +0300 |
---|---|---|
committer | Thomas Weißschuh <linux@weissschuh.net> | 2025-04-22 11:56:23 +0300 |
commit | 4c99fbc6a06f56e266f60f5f24d0cfd8311b2c09 (patch) | |
tree | 1fcf8a163adf10e3ebdd9b7adb7ebf802bcd29fb /tools/include/nolibc/stdio.h | |
parent | 6d1724ec864b577b50fa9cf668e80390767f4136 (diff) | |
download | linux-4c99fbc6a06f56e266f60f5f24d0cfd8311b2c09.tar.xz |
tools/nolibc: handle intmax_t/uintmax_t in printf
In nolibc intmax_t and uintmax_t are always the same as
(unsigned) long long/uint64_t as 128bit numbers are not supported.
Even libcs that do support 128bit numbers often fix intmax_t to 64bit
as it is used in ABIs and any change would break those.
Signed-off-by: Thomas Weißschuh <thomas.weissschuh@linutronix.de>
Acked-by: Willy Tarreau <w@1wt.eu>
Diffstat (limited to 'tools/include/nolibc/stdio.h')
-rw-r--r-- | tools/include/nolibc/stdio.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/tools/include/nolibc/stdio.h b/tools/include/nolibc/stdio.h index a403351dbf60..b32b8b794015 100644 --- a/tools/include/nolibc/stdio.h +++ b/tools/include/nolibc/stdio.h @@ -286,6 +286,8 @@ int vfprintf(FILE *stream, const char *fmt, va_list args) if (c == 'l') { /* long format prefix, maintain the escape */ lpref++; + } else if (c == 'j') { + lpref = 2; } escape = 1; goto do_escape; |