glibc/sysdeps/unix/sysv/linux/x86_64
Joseph Myers dee2bea048 C2x scanf binary constant handling
C2x adds binary integer constants starting with 0b or 0B, and supports
those constants for the %i scanf format (in addition to the %b format,
which isn't yet implemented for scanf in glibc).  Implement that scanf
support for glibc.

As with the strtol support, this is incompatible with previous C
standard versions, in that such an input string starting with 0b or 0B
was previously required to be parsed as 0 (with the rest of the input
potentially matching subsequent parts of the scanf format string).
Thus this patch adds 12 new __isoc23_* functions per long double
format (12, 24 or 36 depending on how many long double formats the
glibc configuration supports), with appropriate header redirection
support (generally very closely following that for the __isoc99_*
scanf functions - note that __GLIBC_USE (DEPRECATED_SCANF) takes
precedence over __GLIBC_USE (C2X_STRTOL), so the case of GNU
extensions to C89 continues to get old-style GNU %a and does not get
this new feature).  The function names would remain as __isoc23_* even
if C2x ends up published in 2024 rather than 2023.

When scanf %b support is added, I think it will be appropriate for all
versions of scanf to follow C2x rules for inputs to the %b format
(given that there are no compatibility concerns for a new format).

Tested for x86_64 (full glibc testsuite).  The first version was also
tested for powerpc (32-bit) and powerpc64le (stdio-common/ and wcsmbs/
tests), and with build-many-glibcs.py.
2023-03-02 19:10:37 +00:00
..
64 C2x scanf binary constant handling 2023-03-02 19:10:37 +00:00
x32 C2x scanf binary constant handling 2023-03-02 19:10:37 +00:00
____longjmp_chk.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
__start_context.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
clone3.S Linux: Do not align the stack for __clone3 2023-02-01 08:42:11 -03:00
clone.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
configure Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
configure.ac Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
dl-cache.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
dl-procinfo.c Add _dl_x86_cpu_features to rtld_global 2015-08-13 03:41:22 -07:00
dl-procinfo.h x86: Set dl_platform and dl_hwcap from CPU features [BZ #21391] 2017-05-03 13:44:35 -07:00
getcontext.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
kernel-features.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ldd-rewrite.sed Remove left over LD_LIBRARY_VERSION usages 2022-08-04 09:09:48 -03:00
libc_sigaction.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
libmvec.abilist x86-64: Add vector tan/tanf implementation to libmvec 2021-12-30 10:19:13 -08:00
makecontext.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Makefile ldconfig/x86: Store ISA level in cache and aux cache 2021-01-13 05:51:17 -08:00
pointer_guard.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
setcontext.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sigaltstack-offsets.sym Use R*_LP, sizeSS, oSS_FLAGS, oSS_SP and oSS_SIZE 2012-05-15 16:43:11 -07:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
single-thread.h Replace __libc_multiple_threads with __libc_single_threaded 2022-07-05 10:14:47 -03:00
swapcontext.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
syscall.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
syscalls.list linux: Consolidate Linux setsockopt implementation 2021-07-06 11:45:35 -03:00
sysdep.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sysdep.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
tst-glibc-hwcaps-2.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ucontext_i.sym x86-64/CET: Extend ucontext_t to save shadow stack 2018-07-25 06:37:31 -07:00
Versions Linux: Move timer_settime, __timer_settime64 from librt to libc 2021-06-28 09:51:01 +02:00
vfork.S Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
x86-64-isa-level-VALUE.c ldconfig/x86: Store ISA level in cache and aux cache 2021-01-13 05:51:17 -08:00