mirror of
git://sourceware.org/git/glibc.git
synced 2024-12-15 04:20:28 +08:00
dee2bea048
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.
81 lines
1.4 KiB
Plaintext
81 lines
1.4 KiB
Plaintext
libc {
|
|
GLIBC_2.0 {
|
|
# global variables
|
|
_sys_errlist; _sys_nerr; _sys_siglist;
|
|
|
|
# functions used in other libraries
|
|
__printf_fp; __vfscanf;
|
|
|
|
# variables in normal name space
|
|
sys_errlist; sys_nerr; sys_sigabbrev; sys_siglist;
|
|
|
|
# a*
|
|
asprintf;
|
|
|
|
# c*
|
|
ctermid; cuserid;
|
|
|
|
# d*
|
|
dprintf;
|
|
|
|
# f*
|
|
flockfile; fprintf; fscanf; ftrylockfile; funlockfile;
|
|
|
|
# g*
|
|
getline; getw;
|
|
|
|
# p*
|
|
parse_printf_format; perror; printf; putw;
|
|
|
|
# r*
|
|
register_printf_function; remove; rename;
|
|
|
|
# s*
|
|
scanf; snprintf; sprintf; sscanf;
|
|
|
|
# t*
|
|
tempnam; tmpfile; tmpnam; tmpnam_r;
|
|
|
|
# v*
|
|
vfprintf; vfscanf; vprintf;
|
|
}
|
|
GLIBC_2.1 {
|
|
# p*
|
|
printf_size; printf_size_info;
|
|
|
|
# t*
|
|
tmpfile; tmpfile64;
|
|
}
|
|
GLIBC_2.4 {
|
|
renameat;
|
|
}
|
|
GLIBC_2.7 {
|
|
__isoc99_scanf; __isoc99_vscanf; __isoc99_fscanf; __isoc99_vfscanf;
|
|
__isoc99_sscanf; __isoc99_vsscanf;
|
|
}
|
|
GLIBC_2.10 {
|
|
psiginfo;
|
|
register_printf_modifier; register_printf_type; register_printf_specifier;
|
|
}
|
|
GLIBC_2.28 {
|
|
renameat2;
|
|
}
|
|
GLIBC_2.29 {
|
|
# SHLIB_COMPAT(GLIBC_2_0, GLIBC_2_29) used in iovfscanf.c etc.
|
|
}
|
|
GLIBC_2.38 {
|
|
__isoc23_scanf;
|
|
__isoc23_vscanf;
|
|
__isoc23_fscanf;
|
|
__isoc23_vfscanf;
|
|
__isoc23_sscanf;
|
|
__isoc23_vsscanf;
|
|
}
|
|
GLIBC_PRIVATE {
|
|
# global variables
|
|
_itoa_lower_digits;
|
|
# Used in libcrypt.
|
|
__snprintf;
|
|
}
|
|
}
|