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
..
2014-11-07 01:27:16 +00:00
2012-01-07 23:57:22 -05:00
2012-05-24 23:08:18 +02:00
2013-09-04 20:47:21 +00:00
2014-10-30 14:00:26 -07:00
2012-11-21 06:33:19 -08:00
2014-03-14 11:32:51 -07:00
2012-01-07 23:57:22 -05:00
2014-10-30 19:44:31 +00:00
2009-04-23 18:29:30 +00:00
2011-10-31 01:51:16 -04:00
2012-05-24 23:08:18 +02:00
2012-05-24 23:06:20 +02:00
2012-05-31 13:10:02 +02:00
2012-01-07 23:57:22 -05:00
2014-02-07 15:26:28 -08:00
2014-03-14 11:32:51 -07:00
2014-11-12 22:33:41 +00:00
2012-01-07 23:57:22 -05:00