summaryrefslogtreecommitdiff
path: root/sal/inc
diff options
context:
space:
mode:
authorHerbert Dürr <hdu@apache.org>2013-06-04 08:57:15 +0000
committerHerbert Dürr <hdu@apache.org>2013-06-04 08:57:15 +0000
commit9cf0a23174cc8e028e38fd0044f6f5157d9424ca (patch)
treef7b9deb14f6f59a6e910f34447de975129c61293 /sal/inc
parent797e399967ffb1c28b8c32d328f5f57d79a8caf3 (diff)
extend workaround for gcc bug 14608 to work on gcc<4.3
Notes
Notes: ignore: obsolete
Diffstat (limited to 'sal/inc')
-rw-r--r--sal/inc/sal/mathconf.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/sal/inc/sal/mathconf.h b/sal/inc/sal/mathconf.h
index ae1ecb9fb0fd..e7fd4fd8264a 100644
--- a/sal/inc/sal/mathconf.h
+++ b/sal/inc/sal/mathconf.h
@@ -55,15 +55,15 @@ extern "C" {
/* SAL_MATH_FINITE(d): test double d on INFINITY, NaN et al. */
-#if defined(__GNUC__)
-#if defined(MACOSX)
- #define SAL_MATH_FINITE(d) finite(d)
-#else
- #define SAL_MATH_FINITE(d) __builtin_isfinite(d) // gcc bug 14608
-#endif
+#if defined(__GNUC__) // workaround gcc bug 14608
+ #if (__GNUC_MINOR >= 3) // gcc>=4.3 has a builtin
+ #define SAL_MATH_FINITE(d) __builtin_isfinite(d)
+ #else
+ #define SAL_MATH_FINITE(d) finite(d) // fall back to pre-C99 name
+ #endif
#elif defined(__STDC__)
// 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)
#elif defined( WNT)
#define SAL_MATH_FINITE(d) _finite(d)