glibc/sysdeps
Joseph Myers 73a268c759 Fix libm fegetenv namespace (bug 17748).
Some C90 libm functions call fegetenv via libc_feholdsetround*
functions in math_private.h.  This patch makes them call __fegetenv
instead, making fegetenv into a weak alias for __fegetenv as needed.

Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).  Also tested for ARM
(soft-float) that fegetenv failures disappear from the linknamespace
test failures (however, similar fixes will also be needed for
fegetround, feholdexcept, fesetenv, fesetround and feupdateenv before
this set of namespace issues covered by bug 17748 is fully fixed and
those linknamespace tests start passing).

	[BZ #17748]
	* include/fenv.h (__fegetenv): Use libm_hidden_proto.
	* math/fegetenv.c (__fegetenv): Use libm_hidden_def.
	* sysdeps/aarch64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv
	and define as weak alias of __fegetenv.  Use libm_hidden_weak.
	* sysdeps/alpha/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def.
	* sysdeps/arm/fegetenv.c (fegetenv): Rename to __fegetenv and
	define as weak alias of __fegetenv.  Use libm_hidden_weak.
	* sysdeps/hppa/fpu/fegetenv.c (fegetenv): Likewise.
	* sysdeps/i386/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def.
	* sysdeps/ia64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and
	define as weak alias of __fegetenv.  Use libm_hidden_weak.
	* sysdeps/m68k/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def.
	* sysdeps/mips/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and
	define as weak alias of __fegetenv.  Use libm_hidden_weak.
	* sysdeps/powerpc/fpu/fegetenv.c (__fegetenv): Use
	libm_hidden_def.
	* sysdeps/powerpc/nofpu/fegetenv.c (__fegetenv): Likewise.
	* sysdeps/powerpc/powerpc32/e500/nofpu/fegetenv.c (__fegetenv):
	Likewise.
	* sysdeps/s390/fpu/fegetenv.c (fegetenv): Rename to __fegetenv and
	define as weak alias of __fegetenv.  Use libm_hidden_weak.
	* sysdeps/sh/sh4/fpu/fegetenv.c (fegetenv): Likewise.
	* sysdeps/sparc/fpu/fegetenv.c (__fegetenv): Use libm_hidden_def.
	* sysdeps/tile/math_private.h (__fegetenv): New inline function.
	* sysdeps/x86_64/fpu/fegetenv.c (fegetenv): Rename to __fegetenv
	and define as weak alias of __fegetenv.  Use libm_hidden_weak.
	* sysdeps/generic/math_private.h (libc_feholdsetround_ctx): Use
	__fegetenv instead of fegetenv.
	(libc_feholdsetround_noex_ctx): Likewise.
2014-12-31 22:07:52 +00:00
..
aarch64 Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
alpha Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
arm Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
generic Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
gnu Use PTR_MANGLE on libgcc unwinder function pointers. 2014-12-16 15:47:53 -08:00
hppa Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
i386 Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
ia64 Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
ieee754 Clean up powerpc fegetround / __fegetround inlines. 2014-12-31 19:16:34 +00:00
init_array Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
m68k Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
mach Fix resolver if_* namespace (bug 17717). 2014-12-16 18:18:49 +00:00
microblaze Fix libm feraiseexcept namespace (bug 17723). 2014-12-30 17:08:09 +00:00
mips Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
nptl NPTL: Move fork state variables to initializer files. 2014-12-17 14:33:28 -08:00
posix Use posix-conf-vars.list to generate spec array 2014-12-29 19:56:27 +05:30
powerpc Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
pthread Replace %ld with %jd and cast to intmax_t 2014-12-30 08:09:06 -08:00
s390 Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
sh Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
sparc Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
tile Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00
unix Add support for MIPS O32 FPXX and .MIPS.abiflags 2014-12-31 21:09:21 +00:00
wordsize-32 Remove NOT_IN_libc 2014-11-24 15:03:45 +05:30
wordsize-64 Update copyright notices with scripts/update-copyrights 2014-01-01 22:00:23 +10:00
x86 Fix libm feraiseexcept namespace (bug 17723). 2014-12-30 17:08:09 +00:00
x86_64 Fix libm fegetenv namespace (bug 17748). 2014-12-31 22:07:52 +00:00