From f6b045b4cd0bf1d8f3d56ceab3baadfec29857b4 Mon Sep 17 00:00:00 2001 From: Ed Schouten Date: Fri, 9 Jan 2015 14:11:11 +0100 Subject: [PATCH] Add bits to openlibm headers to switch between using the host headers. --- src/openlibm.h | 6 ++++++ src/openlibm_complex.h | 6 ++++++ src/openlibm_fenv.h | 6 ++++++ 3 files changed, 18 insertions(+) diff --git a/src/openlibm.h b/src/openlibm.h index 337da4c..74fc3a7 100644 --- a/src/openlibm.h +++ b/src/openlibm.h @@ -14,6 +14,10 @@ * $FreeBSD: src/lib/msun/src/openlibm.h,v 1.82 2011/11/12 19:55:48 theraven Exp $ */ +#ifdef OPENLIBM_USE_HOST_MATH_H +#include +#else /* !OPENLIBM_USE_HOST_MATH_H */ + #ifndef OPENLIBM_H #define OPENLIBM_H @@ -487,3 +491,5 @@ long double lgammal_r(long double, int *); } #endif #endif /* !OPENLIBM_H */ + +#endif /* OPENLIBM_USE_HOST_MATH_H */ diff --git a/src/openlibm_complex.h b/src/openlibm_complex.h index 7774eab..7afc992 100644 --- a/src/openlibm_complex.h +++ b/src/openlibm_complex.h @@ -15,6 +15,10 @@ * OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. */ +#ifdef OPENLIBM_USE_HOST_COMPLEX_H +#include +#else /* !OPENLIBM_USE_HOST_COMPLEX_H */ + #ifndef OPENLIBM_COMPLEX_H #define OPENLIBM_COMPLEX_H @@ -171,3 +175,5 @@ long double complex cprojl(long double complex); long double creall(long double complex); #endif /* !OPENLIBM_COMPLEX_H */ + +#endif /* OPENLIBM_USE_HOST_COMPLEX_H */ diff --git a/src/openlibm_fenv.h b/src/openlibm_fenv.h index 69ccf9f..478e458 100644 --- a/src/openlibm_fenv.h +++ b/src/openlibm_fenv.h @@ -1,3 +1,7 @@ +#ifdef OPENLIBM_USE_HOST_FENV_H +#include +#else /* !OPENLIBM_USE_HOST_FENV_H */ + #if defined(__arm__) #include "../arm/fenv.h" #elif defined(__x86_64__) @@ -7,3 +11,5 @@ #else #error "Unsupported platform" #endif + +#endif /* OPENLIBM_USE_HOST_FENV_H */