Kaydet (Commit) 157995fa authored tarafından Tor Lillqvist's avatar Tor Lillqvist

isfinite() is hard to get right

Change-Id: Iae369a1b057d207f18c8c0ea8ac4fb5437ff1da5
üst 2a9fd5d6
......@@ -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)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment