Rename include/fenv.h to <openlibm_fenv.h>.

OpenLibm has an implementation of fenv.h internally. This may be
problematic in case you want it to build against the host system's
implementation, as it would require you to somehow take the fenv.h file
out of the compiler search path.

Simply use a different naming scheme, similar to openlibm.h and
openlibm_complex.h. If we want to build against the host's fenv.h, we
can simply add an '#include <fenv.h>' from within this header.
This commit is contained in:
Ed Schouten
2015-01-09 13:00:48 +01:00
parent f5377fda83
commit 17688c4487
14 changed files with 24 additions and 23 deletions
+1 -1
View File
@@ -32,7 +32,7 @@
#ifdef _WIN32
#define __fenv_static
#endif
#include "fenv.h"
#include "openlibm_fenv.h"
#ifdef __GNUC_GNU_INLINE__
#error "This file must be compiled with C99 'inline' semantics"
+4 -2
View File
@@ -29,8 +29,10 @@
#ifndef _FENV_H_
#define _FENV_H_
#include "include/cdefs-compat.h"
#include "include/types-compat.h"
#include "cdefs-compat.h"
#include "types-compat.h"
#include "math_private.h"
#ifndef __fenv_static
#define __fenv_static static
+1 -1
View File
@@ -27,7 +27,7 @@
*/
#define __fenv_static
#include "fenv.h"
#include <openlibm_fenv.h>
#ifdef __GNUC_GNU_INLINE__
#error "This file must be compiled with C99 'inline' semantics"
+1 -1
View File
@@ -32,7 +32,7 @@
#include <i387/bsd_npx.h>
#define __fenv_static
#include "fenv.h"
#include <openlibm_fenv.h>
#ifdef __GNUC_GNU_INLINE__
#error "This file must be compiled with C99 'inline' semantics"
-9
View File
@@ -1,9 +0,0 @@
#ifdef __arm__
#include "../arm/fenv.h"
#else
#ifdef __LP64
#include "../amd64/fenv.h"
#else
#include "../i387/fenv.h"
#endif
#endif
+1 -1
View File
@@ -27,11 +27,11 @@
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/e_sqrtl.c,v 1.1 2008/03/02 01:47:58 das Exp $");
#include <fenv.h>
#include <float.h>
#include "fpmath.h"
#include "openlibm.h"
#include "openlibm_fenv.h"
#include "math_private.h"
/* Return (x + ulp) for normal positive x. Assumes no overflow. */
+9
View File
@@ -0,0 +1,9 @@
#if defined(__arm__)
#include "../arm/fenv.h"
#elif defined(__x86_64__)
#include "../amd64/fenv.h"
#elif defined(__i386__)
#include "../i387/fenv.h"
#else
#error "Unsupported platform"
#endif
+1 -1
View File
@@ -27,9 +27,9 @@
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_fma.c,v 1.8 2011/10/21 06:30:43 das Exp $");
#include <fenv.h>
#include <float.h>
#include <openlibm.h>
#include <openlibm_fenv.h>
#include "math_private.h"
+1 -2
View File
@@ -27,9 +27,8 @@
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_fmaf.c,v 1.3 2011/10/15 04:16:58 das Exp $");
#include <fenv.h>
#include "openlibm.h"
#include "openlibm_fenv.h"
#include "math_private.h"
/*
+1 -1
View File
@@ -27,9 +27,9 @@
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_fmal.c,v 1.7 2011/10/21 06:30:43 das Exp $");
#include <fenv.h>
#include <float.h>
#include <openlibm.h>
#include <openlibm_fenv.h>
#include "math_private.h"
#include "fpmath.h"
+1 -1
View File
@@ -25,8 +25,8 @@
*/
#include "cdefs-compat.h"
#include <fenv.h>
#include <openlibm.h>
#include <openlibm_fenv.h>
#include "math_private.h"
#ifndef type
+1 -1
View File
@@ -29,8 +29,8 @@
//#include <sys/limits.h>
#include <limits.h>
//VBS end
#include <fenv.h>
#include <openlibm.h>
#include <openlibm_fenv.h>
#include "math_private.h"
#ifndef type
+1 -1
View File
@@ -27,8 +27,8 @@
#include "cdefs-compat.h"
//__FBSDID("$FreeBSD: src/lib/msun/src/s_nearbyint.c,v 1.2 2008/01/14 02:12:06 das Exp $");
#include <fenv.h>
#include <openlibm.h>
#include <openlibm_fenv.h>
#include "math_private.h"
/*
+1 -1
View File
@@ -123,8 +123,8 @@
#include <fenv.h>
#else
#include "openlibm.h"
#include "openlibm_fenv.h"
#include "float.h"
#include "fenv.h"
#endif
#if 0 /* XXX scp XXX */