mirror of
https://sourceware.org/git/glibc.git
synced 2024-12-12 02:53:34 +08:00
349718d4d7
There are two flags currently defined: SCANF_LDBL_IS_DBL is the mode used by __nldbl_ scanf variants, and SCANF_ISOC99_A is the mode used by __isoc99_ scanf variants. In this patch, the new functions honor these flag bits if they're set, but they still also look at the corresponding bits of environmental state, and callers all pass zero. The new functions do *not* have the "errp" argument possessed by _IO_vfscanf and _IO_vfwscanf. All internal callers passed NULL for that argument. External callers could theoretically exist, so I preserved wrappers, but they are flagged as compat symbols and they don't preserve the three-way distinction among types of errors that was formerly exposed. These functions probably should have been in the list of deprecated _IO_ symbols in 2.27 NEWS -- they're not just aliases for vfscanf and vfwscanf. (It was necessary to introduce ldbl_compat_symbol for _IO_vfscanf. Please check that part of the patch very carefully, I am still not confident I understand all of the details of ldbl-opt.) This patch also introduces helper inlines in libio/strfile.h that encapsulate the process of initializing an _IO_strfile object for reading. This allows us to call __vfscanf_internal directly from sscanf, and __vfwscanf_internal directly from swscanf, without duplicating the initialization code. (Previously, they called their v-counterparts, but that won't work if we want to control *both* C99 mode and ldbl-is-dbl mode using the flags argument to__vfscanf_internal.) It's still a little awkward, especially for wide strfiles, but it's much better than what we had. Tested for powerpc and powerpc64le.
73 lines
1.3 KiB
Plaintext
73 lines
1.3 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_PRIVATE {
|
|
# global variables
|
|
_itoa_lower_digits;
|
|
# Used in libcrypt.
|
|
__snprintf;
|
|
}
|
|
}
|