summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2012-11-03 09:29:46 +0200
committerTor Lillqvist <tml@iki.fi>2012-11-03 09:30:38 +0200
commit157995fa389596ef03b2c5fa8158a8285cc57803 (patch)
treedd4ddf225209bd00db7f81fd0fc36d294f6b4308
parent2a9fd5d68304beebcffd2f6a66e65c95eb433c40 (diff)
isfinite() is hard to get right
Change-Id: Iae369a1b057d207f18c8c0ea8ac4fb5437ff1da5
-rw-r--r--sal/inc/sal/mathconf.h12
1 files changed, 11 insertions, 1 deletions
diff --git a/sal/inc/sal/mathconf.h b/sal/inc/sal/mathconf.h
index 5a49e0b999bb..1c12ec1a277a 100644
--- a/sal/inc/sal/mathconf.h
+++ b/sal/inc/sal/mathconf.h
@@ -41,6 +41,14 @@
#include <cmath>
#endif
+#if defined(IOS)
+#if defined(__cplusplus)
+#include <cmath>
+#else
+#include <math.h>
+#endif
+#endif
+
#if defined __cplusplus
extern "C" {
#endif /* __cplusplus */
@@ -65,7 +73,9 @@ extern "C" {
/* SAL_MATH_FINITE(d): test double d on INFINITY, NaN et al. */
#if !defined SOLARIS && !defined ANDROID \
&& defined(__cplusplus) \
- && ( defined(__GXX_EXPERIMENTAL_CXX0X__) || __cplusplus >= 201103L )
+ && ( defined(__GXX_EXPERIMENTAL_CXX0X__) \
+ || __cplusplus >= 201103L \
+ || defined(IOS) )
#define SAL_MATH_FINITE(d) std::isfinite(d)
#elif defined( IOS )
#define SAL_MATH_FINITE(d) isfinite(d)