summaryrefslogtreecommitdiffstats
path: root/lib/msun/ia64/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/ia64/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/ia64/fenv.c')
-rw-r--r--lib/msun/ia64/fenv.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/lib/msun/ia64/fenv.c b/lib/msun/ia64/fenv.c
index 95a5809..9e760da 100644
--- a/lib/msun/ia64/fenv.c
+++ b/lib/msun/ia64/fenv.c
@@ -27,10 +27,27 @@
*/
#include <sys/types.h>
+
+#define __fenv_static
#include <fenv.h>
+#ifdef __GNUC_GNU_INLINE__
+#error "This file must be compiled with C99 'inline' semantics"
+#endif
+
const fenv_t __fe_dfl_env = 0x0009804c8a70033fULL;
+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);
+
/*
* It doesn't pay to inline feupdateenv() because it includes one of
* the rare uses of feraiseexcept() where the argument is not a
OpenPOWER on IntegriCloud