diff options
author | Tor Lillqvist <tml@iki.fi> | 2012-11-03 09:29:46 +0200 |
---|---|---|
committer | Tor Lillqvist <tml@iki.fi> | 2012-11-03 09:30:38 +0200 |
commit | 157995fa389596ef03b2c5fa8158a8285cc57803 (patch) | |
tree | dd4ddf225209bd00db7f81fd0fc36d294f6b4308 /sal | |
parent | 2a9fd5d68304beebcffd2f6a66e65c95eb433c40 (diff) |
isfinite() is hard to get right
Change-Id: Iae369a1b057d207f18c8c0ea8ac4fb5437ff1da5
Diffstat (limited to 'sal')
-rw-r--r-- | sal/inc/sal/mathconf.h | 12 |
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) |