[Libreoffice-commits] core.git: Branch 'aoo/trunk' - sal/inc
Herbert Dürr
hdu at apache.org
Tue Jun 4 03:07:36 PDT 2013
sal/inc/sal/mathconf.h | 14 +++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)
New commits:
commit 9cf0a23174cc8e028e38fd0044f6f5157d9424ca
Author: Herbert Dürr <hdu at apache.org>
Date: Tue Jun 4 08:57:15 2013 +0000
extend workaround for gcc bug 14608 to work on gcc<4.3
diff --git a/sal/inc/sal/mathconf.h b/sal/inc/sal/mathconf.h
index ae1ecb9..e7fd4fd 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)
More information about the Libreoffice-commits
mailing list