summaryrefslogtreecommitdiff
path: root/src/fenv/fesetexceptflag.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/fenv/fesetexceptflag.c')
-rw-r--r--src/fenv/fesetexceptflag.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/fenv/fesetexceptflag.c b/src/fenv/fesetexceptflag.c
new file mode 100644
index 00000000..af5f102d
--- /dev/null
+++ b/src/fenv/fesetexceptflag.c
@@ -0,0 +1,8 @@
+#include <fenv.h>
+
+int fesetexceptflag(const fexcept_t *fp, int mask)
+{
+ feclearexcept(~*fp & mask);
+ feraiseexcept(*fp & mask);
+ return 0;
+}