summaryrefslogtreecommitdiff
path: root/sal/inc/sal/mathconf.h
diff options
context:
space:
mode:
Diffstat (limited to 'sal/inc/sal/mathconf.h')
-rw-r--r--sal/inc/sal/mathconf.h8
1 files changed, 7 insertions, 1 deletions
diff --git a/sal/inc/sal/mathconf.h b/sal/inc/sal/mathconf.h
index d673f34ed473..1e4b11b112b4 100644
--- a/sal/inc/sal/mathconf.h
+++ b/sal/inc/sal/mathconf.h
@@ -37,6 +37,10 @@
#include <ieeefp.h>
#endif /* SOLARIS */
+#if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L )
+#include <cmath>
+#endif
+
#if defined __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -59,7 +63,9 @@ extern "C" {
/* SAL_MATH_FINITE(d): test double d on INFINITY, NaN et al. */
-#if defined( WNT)
+#if defined(__cplusplus) && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L )
+#define SAL_MATH_FINITE(d) std::isfinite(d)
+#elif defined( WNT)
#define SAL_MATH_FINITE(d) _finite(d)
#elif defined IOS
/* C++ is so nice. This is the only way I could come up with making