00001
00002 #ifndef GEOS_PLATFORM_H
00003 #define GEOS_PLATFORM_H
00004
00005
00006 #define HAVE_INT64_T_64
00007
00008
00009
00010
00011
00012
00013
00014
00015 #define HAVE_IEEEFP_H 1
00016
00017 #ifdef HAVE_IEEEFP_H
00018 extern "C"
00019 {
00020 #include <ieeefp.h>
00021 }
00022 #endif
00023
00024 #ifdef HAVE_INT64_T_64
00025 extern "C"
00026 {
00027 #include <inttypes.h>
00028 }
00029 #endif
00030
00031 #if defined(__GNUC__) && defined(_WIN32)
00032
00033
00034
00035
00036
00037 #include <float.h>
00038 #endif
00039
00040
00041
00042
00043 #define DoubleNotANumber 1.7e-308
00044 #define DoubleInfinity 1.7e+308
00045 #define DoubleNegInfinity -1.7e+308
00046
00047 #define FINITE(x) ( (x) != DoubleNotANumber && (x) != DoubleInfinity && (x) != DoubleNegInfinity )
00048 #define ISNAN(x) ( (x) == DoubleNotANumber )
00049
00050 #ifdef HAVE_INT64_T_64
00051 typedef int64_t int64;
00052 #else
00053 # ifdef HAVE_LONG_LONG_INT_64
00054 typedef long long int int64;
00055 # else
00056 typedef long int int64;
00057 # ifndef HAVE_LONG_INT_64
00058 # define INT64_IS_REALLY32 1
00059 # warning "Could not find 64bit integer definition!"
00060 # endif
00061 # endif
00062 #endif
00063
00064 inline int getMachineByteOrder() {
00065 static int endian_check = 1;
00066 return *((char *)&endian_check);
00067
00068 }
00069
00070 #endif