Commit fc81ba536bc3d8cdbcf9e92369e9bc5ede69da10
1 parent
a68156d0
Check that HOST_SOLARIS is defined before relying on its value.
Spotted by Joachim Henke. git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@2712 c046a42c-6fe2-441c-8c8c-71466251a162
Showing
2 changed files
with
3 additions
and
3 deletions
fpu/softfloat-native.c
... | ... | @@ -30,7 +30,7 @@ void set_floatx80_rounding_precision(int val STATUS_PARAM) |
30 | 30 | #define sqrtf(f) ((float)sqrt(f)) |
31 | 31 | #define remainderf(fa, fb) ((float)remainder(fa, fb)) |
32 | 32 | #define rintf(f) ((float)rint(f)) |
33 | -#if !defined(__sparc__) && HOST_SOLARIS < 10 | |
33 | +#if !defined(__sparc__) && defined(HOST_SOLARIS) && HOST_SOLARIS < 10 | |
34 | 34 | extern long double rintl(long double); |
35 | 35 | extern long double scalbnl(long double, int); |
36 | 36 | |
... | ... | @@ -336,7 +336,7 @@ uint64_t float64_to_uint64_round_to_zero (float64 a STATUS_PARAM) |
336 | 336 | /*---------------------------------------------------------------------------- |
337 | 337 | | Software IEC/IEEE double-precision operations. |
338 | 338 | *----------------------------------------------------------------------------*/ |
339 | -#if ( defined(__sun__) && ( HOST_SOLARIS < 10 )) | |
339 | +#if defined(__sun__) && defined(HOST_SOLARIS) && HOST_SOLARIS < 10 | |
340 | 340 | static inline float64 trunc(float64 x) |
341 | 341 | { |
342 | 342 | return x < 0 ? -floor(-x) : floor(x); | ... | ... |
fpu/softfloat-native.h
... | ... | @@ -15,7 +15,7 @@ |
15 | 15 | * Solaris 10 with GCC4 does not need these macros as they |
16 | 16 | * are defined in <iso/math_c99.h> with a compiler directive |
17 | 17 | */ |
18 | -#if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ( ( HOST_SOLARIS >= 10 ) && ( __GNUC__ <= 4) )) | |
18 | +#if defined(HOST_SOLARIS) && (( HOST_SOLARIS <= 9 ) || ((HOST_SOLARIS >= 10) && (__GNUC__ <= 4))) | |
19 | 19 | /* |
20 | 20 | * C99 7.12.3 classification macros |
21 | 21 | * and | ... | ... |