commit 839f7d6207d1654b664a46f2905d559773779bc3 Author: Sascha Wildner <s...@online.de> Date: Mon Mar 21 09:29:17 2022 +0100
printf(3)/scanf(3): Make ll and L length modifiers equivalent. POSIX defines L only for floating point numbers (long double) and ll only for integer numbers (long long), leaving for example %Ld or %llg undefined. GCC allows these non-portable combinations as an extension, i.e. -Wformat will not warn about them unless -pedantic is passed. To avoid surprises with Linux code, go with glibc and make ll and L equivalent. For base code, we still prefer going with the standard, of course. Interestingly, the alternate printf(3) implementation in libc (enabled by defining USE_XPRINTF in the environment) already treats them equally. In-discussion-with: zrj Summary of changes: lib/libc/stdio/printf.3 | 24 +++++++++++++++++++++--- lib/libc/stdio/printflocal.h | 4 ++++ lib/libc/stdio/scanf.3 | 43 ++++++++++++++++++++++++++++++++++++++----- lib/libc/stdio/vfscanf.c | 5 +++++ lib/libc/stdio/vfwscanf.c | 5 +++++ lib/libc/stdio/wprintf.3 | 24 +++++++++++++++++++++--- lib/libc/stdio/wscanf.3 | 43 ++++++++++++++++++++++++++++++++++++++----- 7 files changed, 132 insertions(+), 16 deletions(-) http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/839f7d6207d1654b664a46f2905d559773779bc3 -- DragonFly BSD source repository