Add bits to openlibm headers to switch between using the host headers.

This commit is contained in:
Ed Schouten 2015-01-09 14:11:11 +01:00
parent 8429b82a93
commit f6b045b4cd
3 changed files with 18 additions and 0 deletions

View file

@ -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 <math.h>
#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 */

View file

@ -15,6 +15,10 @@
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#ifdef OPENLIBM_USE_HOST_COMPLEX_H
#include <complex.h>
#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 */

View file

@ -1,3 +1,7 @@
#ifdef OPENLIBM_USE_HOST_FENV_H
#include <fenv.h>
#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 */