about summary refs log tree commit diff
path: root/include/fenv.h
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2015-01-05 23:06:14 +0000
committerJoseph Myers <joseph@codesourcery.com>2015-01-05 23:06:14 +0000
commitef9faf138578dc7e559a9fd58080825962ce0339 (patch)
treecf099713c5a455370a53829c314b1fef6699c425 /include/fenv.h
parent882c4b9f1de8b0175eae6edbd48c9a7b80b63fb9 (diff)
downloadglibc-ef9faf138578dc7e559a9fd58080825962ce0339.tar.gz
glibc-ef9faf138578dc7e559a9fd58080825962ce0339.tar.xz
glibc-ef9faf138578dc7e559a9fd58080825962ce0339.zip
Fix libm feholdexcept namespace (bug 17748).
Continuing the fixes for C90 libm functions calling C99 fe* functions,
this patch fixes the case of feholdexcept by making it a weak alias of
__feholdexcept and making the affected code call __feholdexcept.

Tested for x86_64 (testsuite, and that disassembly of installed shared
libraries is unchanged by the patch).  Also tested for ARM
(soft-float) that feholdexcept failures disappear from the
linknamespace test failures (fesetenv, fsetround and feupdateenv
remain to be addressed to complete fixing bug 17748).

	[BZ #17748]
	* include/fenv.h (__feholdexcept): Declare.  Use
	libm_hidden_proto.
	* math/feholdexcpt.c (feholdexcept): Rename to __feholdexcept and
	define as weak alias of __feholdexcept.  Use libm_hidden_weak.
	* sysdeps/aarch64/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/alpha/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/arm/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/hppa/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/i386/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/ia64/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/m68k/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/mips/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/powerpc/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/powerpc/nofpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/powerpc/powerpc32/e500/nofpu/feholdexcpt.c
	(feholdexcept): Likewise.
	* sysdeps/s390/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/sh/sh4/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/sparc/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/x86_64/fpu/feholdexcpt.c (feholdexcept): Likewise.
	* sysdeps/generic/math_private.h (default_libc_feholdexcept): Use
	__feholdexcept instead of feholdexcept.
	(default_libc_feholdexcept_setround): Likewise.
Diffstat (limited to 'include/fenv.h')
-rw-r--r--include/fenv.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/fenv.h b/include/fenv.h
index b29b246089..0a74fa02fe 100644
--- a/include/fenv.h
+++ b/include/fenv.h
@@ -14,6 +14,7 @@ extern int __fegetenv (fenv_t *__envp);
 extern int __fesetenv (const fenv_t *__envp);
 extern int __feupdateenv (const fenv_t *__envp);
 extern __typeof (fegetround) __fegetround;
+extern __typeof (feholdexcept) __feholdexcept;
 
 libm_hidden_proto (feraiseexcept)
 libm_hidden_proto (__feraiseexcept)
@@ -24,6 +25,7 @@ libm_hidden_proto (__fegetround)
 libm_hidden_proto (fesetenv)
 libm_hidden_proto (fesetround)
 libm_hidden_proto (feholdexcept)
+libm_hidden_proto (__feholdexcept)
 libm_hidden_proto (feupdateenv)
 libm_hidden_proto (fetestexcept)
 libm_hidden_proto (feclearexcept)