00001
00002 #ifndef GEOS_PLATFORM_H
00003 #define GEOS_PLATFORM_H
00004
00005
00006
00007
00008
00009 #define HAVE_LONG_LONG_INT_64
00010
00011
00012 #define HAVE_IEEEFP_H 1
00013
00014 #ifdef HAVE_IEEEFP_H
00015 extern "C"
00016 {
00017 #include <ieeefp.h>
00018 }
00019 #endif
00020
00021
00022
00023
00024 #define DoubleNotANumber 1.7e-308
00025 #define DoubleInfinity 1.7e+308
00026 #define DoubleNegInfinity -1.7e+308
00027
00028 #define FINITE(x) ( (x) != DoubleNotANumber && (x) != DoubleInfinity && (x) != DoubleNegInfinity )
00029 #define ISNAN(x) ( (x) == DoubleNotANumber )
00030
00031 #ifdef HAVE_LONG_LONG_INT_64
00032 typedef long long int int64;
00033 #else
00034 typedef long int int64;
00035 #ifndef HAVE_LONG_INT_64
00036 #define INT64_IS_REALLY32 1
00037 #warning "Could not find 64bit integer definition!"
00038 #endif
00039 #endif
00040
00041 inline int getMachineByteOrder() {
00042 static int endian_check = 1;
00043 return *((char *)&endian_check);
00044
00045 }
00046
00047
00048 #endif