glibc/sysdeps/unix/sysv/linux/sparc
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
..
bits Move SPARC public headers out of nptl/ 2014-06-12 15:04:34 -07:00
sparc32 Run check-localpltk/textrel/execstack over ld.so. 2014-11-06 15:48:44 -05:00
sparc64 Run check-localpltk/textrel/execstack over ld.so. 2014-11-06 15:48:44 -05:00
sys Fix sparc struct fpu definition. 2014-11-01 13:45:02 -07:00
a.out.h Remove trailing whitespace. 2013-06-05 20:44:03 +00:00
aio_cancel.c Move remaining SPARC code out of nptl/. 2014-06-20 17:13:47 -07:00
arch-fork.h SPARC: Convert fork.c to arch-fork.h 2014-06-12 14:19:50 -07:00
configure Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
configure.ac Move architecture cases out of sysdeps/unix/sysv/linux/configure.ac. 2014-06-24 20:53:03 +00:00
dl-cache.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getshmlba.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
getsysstats.c Fix __get_nprocs fgets_unlocked namespace (bug 17582). 2014-11-12 22:39:36 +00:00
Implies NPTL is no longer an add-on! 2014-07-07 09:29:06 -07:00
kernel_termios.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
kernel-features.h [PATCH 3/6] Split sparc out of main Linux kernel-features.h. 2014-07-17 17:52:58 +00:00
ldd-rewrite.sed
lowlevellock.h Get rid of lll_robust_dead. 2014-07-10 11:21:54 -07:00
Makefile Move remaining SPARC code out of nptl/. 2014-06-20 17:13:47 -07:00
pt-vfork.S Consolidate sparc clone, fork, and vfork implementations. 2014-06-13 14:47:53 -07:00
readelflib.c Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
rt-sysdep.c * shlib-versions: Use sparc64.*- for CPU patterns. 2006-03-06 01:34:09 +00:00
syscalls.list Remove __libc_waitpid function name. 2014-11-07 01:27:16 +00:00
sysdep.c * shlib-versions: Use sparc64.*- for CPU patterns. 2006-03-06 01:34:09 +00:00
sysdep.h Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
system.c Remove stray includes of kernel-features.h. 2014-06-25 18:09:01 +00:00
Versions Move remaining SPARC code out of nptl/. 2014-06-20 17:13:47 -07:00