glibc/sysdeps/unix
Joseph Myers c4eae75271 Fix __get_nprocs fgets_unlocked namespace (bug 17582).
__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.
2014-11-12 22:39:36 +00:00
..
alpha Remove unnecessary uses of NOT_IN_libc 2014-08-21 10:26:46 +05:30
arm Move arm from ports to libc. 2014-02-08 01:49:39 +00:00
bsd Remove __libc_waitpid function name. 2014-11-07 01:27:16 +00:00
i386 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
inet Move nss directory into sysdeps Subdirs. 2013-02-05 14:32:48 -08:00
mips Move mips from ports to libc. 2014-02-10 23:30:21 +00:00
powerpc Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sh Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
sysv/linux Fix __get_nprocs fgets_unlocked namespace (bug 17582). 2014-11-12 22:39:36 +00:00
x86_64 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
clock_gettime.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
clock_nanosleep.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
clock_settime.c Use glibc_likely instead __builtin_expect. 2014-02-10 15:07:12 +01:00
confstr.h
get_child_max.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getlogin_r.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getlogin.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getpagesize.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
grantpt.c Fix macro warning on HAVE_PT_CHOWN 2014-05-14 09:46:54 +02:00
ifreq.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Implies
make-syscalls.sh Support and use mixed compat/non-compat aliases in syscalls.list. 2014-10-06 22:58:59 +00:00
Makefile Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
s-proto-cancel.S * sysdeps/unix/Makefile: Include $(common-objpfx)s-proto-cancel.d. 2002-12-30 00:12:56 +00:00
s-proto.S
setxid.h Update. 2004-11-12 01:27:04 +00:00
sockatmark.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
stime.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
Subdirs
syscall-template.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
syscall.S Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
syscalls.list Remove __libc_readv and __libc_writev function names. 2014-10-30 20:56:34 +00:00
sysdep.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00