2 #ifndef GEOS_PLATFORM_H 3 #define GEOS_PLATFORM_H 12 #define HAVE_LONG_LONG_INT_64 1 21 #define HAVE_ISFINITE 1 33 #ifdef HAVE_INT64_T_64 40 #if defined(__GNUC__) && defined(_WIN32) 54 #define DoubleNotANumber std::numeric_limits<double>::quiet_NaN() 57 #define DoubleInfinity std::numeric_limits<double>::infinity() 58 #define DoubleNegInfinity -std::numeric_limits<double>::infinity() 60 #define DoubleMax std::numeric_limits<double>::max() 62 #ifdef HAVE_INT64_T_64 63 typedef int64_t int64;
65 # ifdef HAVE_LONG_LONG_INT_64 66 typedef long long int int64;
68 typedef long int int64;
69 # ifndef HAVE_LONG_INT_64 70 # define INT64_IS_REALLY32 1 71 # warning "Could not find 64bit integer definition!" 77 #if defined(HAVE_FINITE) && !defined(HAVE_ISFINITE) 78 # define FINITE(x) (finite(x)) 80 # if defined(_MSC_VER) 81 # define FINITE(x) _finite(static_cast<double>(x)) 82 # elif defined(__hpux__) && defined(__ia64__) 83 # define FINITE(x) (_Isfinite(x)) 85 # define FINITE(x) (isfinite(x)) 89 #if defined(HAVE_ISNAN) 90 # define ISNAN(x) (std::isnan(x)) 92 # if defined(_MSC_VER) 93 # define ISNAN(x) _isnan(x) 94 # elif defined(__MINGW32__) || defined(__CYGWIN__) 96 # define ISNAN(x) (std::isnan(x)) 97 # elif defined(__OSX__) || defined(__APPLE__) || \ 98 defined(__NetBSD__) || defined(__DragonFly__) || defined (__OpenBSD__) || \ 99 (defined(__sun) && defined(__GNUC__)) 102 # define ISNAN(x) (std::isnan(x)) 103 # elif (defined(__sun) || defined(__sun__)) && defined(__SUNPRO_CC) 105 # define ISNAN(x) (::isnan(x)) 110 #error "Can not compile without finite or isfinite function or macro" 114 #error "Can not compile without isnan function or macro"