mirror of
https://sourceware.org/git/glibc.git
synced 2024-11-10 23:30:07 +00:00
c4eae75271
__get_nprocs is called from malloc code, but calls fgets_unlocked, which is not an ISO C or POSIX function. This patch fixes it to call a new __fgets_unlocked name instead. Note: there are various other uses of fgets_unlocked in glibc's libraries, and I haven't yet investigated which others might also be problematic (called directly or indirectly from standard functions) and so need to change to use __fgets_unlocked. Tested for x86_64 (testsuite, and that disassembly of installed shared libraries is unchanged by the patch). [BZ #17582] * libio/iofgets.c [weak_alias && !_IO_MTSAFE_IO] (__fgets_unlocked): Add alias of _IO_fgets. Use libc_hidden_def. * libio/iofgets_u.c (fgets_unlocked): Rename to __fgets_unlocked and define as weak alias of __fgets_unlocked. Use libc_hidden_weak. (__fgets_unlocked): Use libc_hidden_def. * include/stdio.h (__fgets_unlocked): Declare. Use libc_hidden_proto. * sysdeps/unix/sysv/linux/getsysstats.c (phys_pages_info): Use __fgets_unlocked instead of fgets_unlocked. * sysdeps/unix/sysv/linux/alpha/getsysstats.c (GET_NPROCS_CONF_PARSER): Likewise. * sysdeps/unix/sysv/linux/sparc/getsysstats.c (GET_NPROCS_CONF_PARSER): Likewise. |
||
---|---|---|
.. | ||
alpha | ||
arm | ||
bsd | ||
i386 | ||
inet | ||
mips | ||
powerpc | ||
sh | ||
sysv/linux | ||
x86_64 | ||
clock_gettime.c | ||
clock_nanosleep.c | ||
clock_settime.c | ||
confstr.h | ||
get_child_max.c | ||
getlogin_r.c | ||
getlogin.c | ||
getpagesize.c | ||
grantpt.c | ||
ifreq.c | ||
Implies | ||
make-syscalls.sh | ||
Makefile | ||
s-proto-cancel.S | ||
s-proto.S | ||
setxid.h | ||
sockatmark.c | ||
stime.c | ||
Subdirs | ||
syscall-template.S | ||
syscall.S | ||
syscalls.list | ||
sysdep.h |