From: Waldemar Kozaczuk <[email protected]>
Committer: Waldemar Kozaczuk <[email protected]>
Branch: master

headers: get rid of fenv.h copy

Signed-off-by: Waldemar Kozaczuk <[email protected]>

---
diff --git a/arch/aarch64/feexcept.cc b/arch/aarch64/feexcept.cc
--- a/arch/aarch64/feexcept.cc
+++ b/arch/aarch64/feexcept.cc
@@ -8,6 +8,7 @@
 #include <osv/types.h>
 #include <osv/stubbing.hh>
 #include <fenv.h>
+#include <__fenv.h>
 // Note that musl's fenv.h does not define feenableexcept and friends, so
 // we need to 'extern "C"' them here, as no header file does this.
 
diff --git a/arch/x64/feexcept.cc b/arch/x64/feexcept.cc
--- a/arch/x64/feexcept.cc
+++ b/arch/x64/feexcept.cc
@@ -7,6 +7,7 @@
 
 #include <osv/types.h>
 #include <fenv.h>
+#include <__fenv.h>
 
 int feenableexcept(int mask)
 {
diff --git a/include/api/__fenv.h b/include/api/__fenv.h
--- a/include/api/__fenv.h
+++ b/include/api/__fenv.h
@@ -0,0 +1,15 @@
+#ifndef ___FENV_H
+#define ___FENV_H
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+int feenableexcept(int);
+int fedisableexcept(int);
+int fegetexcept(void);
+
+#ifdef __cplusplus
+}
+#endif
+#endif
diff --git a/include/api/fenv.h b/include/api/fenv.h
--- a/include/api/fenv.h
+++ b/include/api/fenv.h
@@ -1,31 +0,0 @@
-#ifndef _FENV_H
-#define _FENV_H
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-#include <bits/fenv.h>
-
-int feclearexcept(int);
-int fegetexceptflag(fexcept_t *, int);
-int feraiseexcept(int);
-int fesetexceptflag(const fexcept_t *, int);
-int fetestexcept(int);
-
-int fegetround(void);
-int fesetround(int);
-
-int fegetenv(fenv_t *);
-int feholdexcept(fenv_t *);
-int fesetenv(const fenv_t *);
-int feupdateenv(const fenv_t *);
-
-int feenableexcept(int);
-int fedisableexcept(int);
-int fegetexcept(void);
-
-#ifdef __cplusplus
-}
-#endif
-#endif
diff --git a/include/api/fenv.h b/include/api/fenv.h
--- a/include/api/fenv.h
+++ b/include/api/fenv.h
@@ -0,0 +1 @@
+../../../musl/include/fenv.h
\ No newline at end of file
diff --git a/tests/tst-feexcept.cc b/tests/tst-feexcept.cc
--- a/tests/tst-feexcept.cc
+++ b/tests/tst-feexcept.cc
@@ -9,6 +9,7 @@
 // To compile on Linux, use: c++ -std=c++11 tests/tst-feexcept.cc
 
 #include <fenv.h>
+#include <__fenv.h>
 #include <signal.h>
 #include <assert.h>
 #include <setjmp.h>

-- 
You received this message because you are subscribed to the Google Groups "OSv 
Development" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/osv-dev/00000000000045561005aeb926de%40google.com.

Reply via email to