Kaydet (Commit) 73365ce2 authored tarafından Herbert Dürr's avatar Herbert Dürr

prefer standard isfinite()

which 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
üst 8244f9cb
...@@ -27,6 +27,7 @@ ...@@ -27,6 +27,7 @@
#include "osl/endian.h" #include "osl/endian.h"
#include <float.h> #include <float.h>
#include <math.h>
#if defined SOLARIS #if defined SOLARIS
#include <ieeefp.h> #include <ieeefp.h>
...@@ -54,7 +55,13 @@ extern "C" { ...@@ -54,7 +55,13 @@ extern "C" {
/* SAL_MATH_FINITE(d): test double d on INFINITY, NaN et al. */ /* SAL_MATH_FINITE(d): test double d on INFINITY, NaN et al. */
#if defined( WNT) #if defined(__GNUC__)
#define SAL_MATH_FINITE(d) __builtin_isfinite(d) // gcc bug 14608
#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
#define SAL_MATH_FINITE(d) isfinite(d)
#elif defined( WNT)
#define SAL_MATH_FINITE(d) _finite(d) #define SAL_MATH_FINITE(d) _finite(d)
#elif defined OS2 #elif defined OS2
#define SAL_MATH_FINITE(d) finite(d) #define SAL_MATH_FINITE(d) finite(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