glibc/sysdeps/unix/sysv/linux/csky
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
..
abiv2 Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
bits Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
sys Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
arch-syscall.h Update syscall lists for Linux 5.17 2022-03-23 17:11:56 +00:00
c++-types.data Add C-SKY port 2018-12-21 09:48:04 +08:00
configure Remove ldd libc4 support 2022-08-04 10:03:45 -03:00
configure.ac Remove ldd libc4 support 2022-08-04 10:03:45 -03:00
Implies Linux: Remove generic Implies 2023-02-20 10:21:19 -03:00
kernel_stat.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
kernel-features.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
ld.abilist Fix glibc 2.34 ABI omission (missing GLIBC_2.34 in dynamic loader) 2022-01-27 18:52:05 +01:00
libanl.abilist resolv: Move libanl into libc (if libpthread is in libc) 2021-07-02 11:45:00 +02:00
libBrokenLocale.abilist Add C-SKY port 2018-12-21 09:48:04 +08:00
libc_malloc_debug.abilist glibc.malloc.check: Wean away from malloc hooks 2021-07-22 18:38:08 +05:30
libc.abilist C2x scanf binary constant handling 2023-03-02 19:10:37 +00:00
libcrypt.abilist Add C-SKY port 2018-12-21 09:48:04 +08:00
libdl.abilist dlfcn: Move dlopen into libc 2021-06-03 08:26:04 +02:00
libm.abilist Add fmaximum, fminimum functions 2021-09-28 23:31:35 +00:00
libpthread.abilist nptl: Remove remaining code from libpthread 2021-05-21 22:35:01 +02:00
libresolv.abilist resolv: Move res_query functions into libc 2021-07-19 07:56:57 +02:00
librt.abilist Linux: Move timer_settime, __timer_settime64 from librt to libc 2021-06-28 09:51:01 +02:00
libthread_db.abilist Add C-SKY port 2018-12-21 09:48:04 +08:00
libutil.abilist login: Move libutil into libc 2021-06-30 08:43:37 +02:00
localplt.data elf: Rework exception handling in the dynamic loader [BZ #25486] 2022-11-03 09:39:31 +01:00
makecontext.c Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
Makefile Add C-SKY port 2018-12-21 09:48:04 +08:00
pointer_guard.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
shlib-versions C-SKY: Strip hard float abi from hard float feature. 2023-02-07 16:34:24 +08:00
sigcontextinfo.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
syscalls.list Add C-SKY port 2018-12-21 09:48:04 +08:00
sysdep.h Update copyright dates with scripts/update-copyrights 2023-01-06 21:14:39 +00:00
time64-compat.h y2038: Add support for 64-bit time on legacy ABIs 2021-06-15 10:42:11 -03:00
Versions Add C-SKY port 2018-12-21 09:48:04 +08:00