Kaydet (Commit) 9cf0a231 authored tarafından Herbert Dürr's avatar Herbert Dürr

extend workaround for gcc bug 14608 to work on gcc<4.3

üst 797e3999
...@@ -55,15 +55,15 @@ extern "C" { ...@@ -55,15 +55,15 @@ extern "C" {
/* SAL_MATH_FINITE(d): test double d on INFINITY, NaN et al. */ /* SAL_MATH_FINITE(d): test double d on INFINITY, NaN et al. */
#if defined(__GNUC__) #if defined(__GNUC__) // workaround gcc bug 14608
#if defined(MACOSX) #if (__GNUC_MINOR >= 3) // gcc>=4.3 has a builtin
#define SAL_MATH_FINITE(d) finite(d) #define SAL_MATH_FINITE(d) __builtin_isfinite(d)
#else #else
#define SAL_MATH_FINITE(d) __builtin_isfinite(d) // gcc bug 14608 #define SAL_MATH_FINITE(d) finite(d) // fall back to pre-C99 name
#endif #endif
#elif defined(__STDC__) #elif defined(__STDC__)
// isfinite() should be available in math.h according to C99,C++99,SUSv3,etc. // isfinite() should be available in math.h according to C99,C++99,SUSv3,etc.
// unless GCC bug 14608 hits us where cmath undefines isfinite as macro // unless GCC bug 14608 hits us where cmath undefines isfinite() as macro
#define SAL_MATH_FINITE(d) isfinite(d) #define SAL_MATH_FINITE(d) isfinite(d)
#elif defined( WNT) #elif defined( WNT)
#define SAL_MATH_FINITE(d) _finite(d) #define SAL_MATH_FINITE(d) _finite(d)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment