glibc/sysdeps
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
..
aarch64 [AArch64] End frame record chain correctly. 2014-11-11 15:02:02 +00:00
alpha Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
arm Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
generic Run check-localpltk/textrel/execstack over ld.so. 2014-11-06 15:48:44 -05:00
gnu Add new Linux 3.16 constants to netinet/udp.h. 2014-09-12 12:13:08 +00:00
hppa Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
i386 Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
ia64 Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
ieee754 Fix missing <math_private.h> in ldbl-96 fma 2014-08-04 10:20:20 +02:00
init_array Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
m68k Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
mach Fix __getcwd rewinddir namespace (bug 17584). 2014-11-12 16:24:16 +00:00
microblaze Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
mips Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
nptl Make internal lock-init macros return void. 2014-10-20 14:13:14 -07:00
posix Fix qsort_r namespace (bug 17571). 2014-11-12 22:33:41 +00:00
powerpc Remove INTDEF / INTUSE / INTVARDEF (bug 14132). 2014-11-05 23:35:36 +00:00
pthread Restore subdir conditional for tst-timer dependency. 2014-07-03 18:52:51 -07:00
s390 Use GOT instead of GOT12 all over 2014-11-12 19:43:04 +05:30
sh Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
sparc Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
tile Don't use INTDEF/INTUSE with _dl_init (bug 14132). 2014-11-04 23:26:39 +00:00
unix Fix __get_nprocs fgets_unlocked namespace (bug 17582). 2014-11-12 22:39:36 +00:00
wordsize-32 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
wordsize-64 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
x86 Run tst-ld-sse-use.sh with bash. 2014-09-29 23:24:37 +00:00
x86_64 Fix x86_64 rawmemchr namespace (bug 17572). 2014-11-12 22:35:12 +00:00