summaryrefslogtreecommitdiffstats
path: root/lib/msun/sparc64/fenv.c
diff options
context:
space:
mode:
authordas <das@FreeBSD.org>2011-10-10 15:43:09 +0000
committerdas <das@FreeBSD.org>2011-10-10 15:43:09 +0000
commita38603b0b57960e07b576fdc7c8ed64d919770d0 (patch)
treea50d2b89f2f16772503039f06c8507b9292a1daa /lib/msun/sparc64/fenv.c
parent768c3db25c16c726fe7df21f139f54cd6342dfbf (diff)
downloadFreeBSD-src-a38603b0b57960e07b576fdc7c8ed64d919770d0.zip
FreeBSD-src-a38603b0b57960e07b576fdc7c8ed64d919770d0.tar.gz
Provide external definitions of all of the standardized functions in
fenv.h that are currently inlined. The definitions are provided in fenv.c via 'extern inline' declaractions. This assumes the compiler handles 'extern inline' as specified in C99, which has been true under FreeBSD since 8.0. The goal is to eventually remove the 'static' keyword from the inline definitions in fenv.h, so that non-inlined references all wind up pointing to the same external definition like they're supposed to. I am deferring the second step to provide a window where newly-compiled apps will still link against old math libraries. (This isn't supported, but there's no need to cause undue breakage.) Reviewed by: stefanf, bde
Diffstat (limited to 'lib/msun/sparc64/fenv.c')
-rw-r--r--lib/msun/sparc64/fenv.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/msun/sparc64/fenv.c b/lib/msun/sparc64/fenv.c
index 6e8220f..a1db64e 100644
--- a/lib/msun/sparc64/fenv.c
+++ b/lib/msun/sparc64/fenv.c
@@ -26,11 +26,28 @@
* $FreeBSD$
*/
+#define __fenv_static
#include <fenv.h>
+#ifdef __GNUC_GNU_INLINE__
+#error "This file must be compiled with C99 'inline' semantics"
+#endif
+
/*
* The FSR_version field may be different on different
* implementations, but it is immutable and opaque to the
* application. Thus, 0 is valid as the default environment.
*/
const fenv_t __fe_dfl_env = 0;
+
+extern inline int feclearexcept(int __excepts);
+extern inline int fegetexceptflag(fexcept_t *__flagp, int __excepts);
+extern inline int fesetexceptflag(const fexcept_t *__flagp, int __excepts);
+extern inline int feraiseexcept(int __excepts);
+extern inline int fetestexcept(int __excepts);
+extern inline int fegetround(void);
+extern inline int fesetround(int __round);
+extern inline int fegetenv(fenv_t *__envp);
+extern inline int feholdexcept(fenv_t *__envp);
+extern inline int fesetenv(const fenv_t *__envp);
+extern inline int feupdateenv(const fenv_t *__envp);
OpenPOWER on IntegriCloud