diff options
author | David 'Digit' Turner <digit@android.com> | 2010-05-10 16:48:20 -0700 |
---|---|---|
committer | David 'Digit' Turner <digit@android.com> | 2010-05-10 16:49:50 -0700 |
commit | 2c538c86c15d597cc875dc926e4e39285c5625df (patch) | |
tree | fd02b6da79b5e1375ab2ec5264ab339044e4a7da /fpu/softfloat-native.c | |
parent | 5e097bf40ed22b422dce1fb2c58098d6c97cf0c6 (diff) | |
download | external_qemu-2c538c86c15d597cc875dc926e4e39285c5625df.zip external_qemu-2c538c86c15d597cc875dc926e4e39285c5625df.tar.gz external_qemu-2c538c86c15d597cc875dc926e4e39285c5625df.tar.bz2 |
Upstream: Use CONFIG_BSD instead of _BSD and HOST_BSD
Also fix OS X build, which failed with a link error.
Change-Id: Idd63f25dc1f46ea66da5727c7577def34f048c3c
Diffstat (limited to 'fpu/softfloat-native.c')
-rw-r--r-- | fpu/softfloat-native.c | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/fpu/softfloat-native.c b/fpu/softfloat-native.c index 2af07a3..8d64f4e 100644 --- a/fpu/softfloat-native.c +++ b/fpu/softfloat-native.c @@ -2,15 +2,15 @@ context is supported */ #include "softfloat.h" #include <math.h> -#if defined(HOST_SOLARIS) +#if defined(CONFIG_SOLARIS) #include <fenv.h> #endif void set_float_rounding_mode(int val STATUS_PARAM) { STATUS(float_rounding_mode) = val; -#if defined(HOST_BSD) && !defined(__APPLE__) || \ - (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) +#if (defined(CONFIG_BSD) && !defined(__APPLE__) && !defined(__GLIBC__)) || \ + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) fpsetround(val); #elif defined(__arm__) /* nothing to do */ @@ -26,7 +26,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) } #endif -#if defined(HOST_BSD) || (defined(HOST_SOLARIS) && HOST_SOLARIS < 10) +#if defined(CONFIG_BSD) || \ + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) #define lrint(d) ((int32_t)rint(d)) #define llrint(d) ((int64_t)rint(d)) #define lrintf(f) ((int32_t)rint(f)) @@ -34,7 +35,8 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) #define sqrtf(f) ((float)sqrt(f)) #define remainderf(fa, fb) ((float)remainder(fa, fb)) #define rintf(f) ((float)rint(f)) -#if !defined(__sparc__) && defined(HOST_SOLARIS) && HOST_SOLARIS < 10 +#if !defined(__sparc__) && \ + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) extern long double rintl(long double); extern long double scalbnl(long double, int); @@ -349,7 +351,8 @@ uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM) /*---------------------------------------------------------------------------- | Software IEC/IEEE double-precision operations. *----------------------------------------------------------------------------*/ -#if defined(__sun__) && defined(HOST_SOLARIS) && HOST_SOLARIS < 10 +#if defined(__sun__) && \ + (defined(CONFIG_SOLARIS) && CONFIG_SOLARIS_VERSION < 10) static inline float64 trunc(float64 x) { return x < 0 ? -floor(-x) : floor(x); |