/usr/include/geos/platform.h is in libgeos-dev 3.2.2-3ubuntu1.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | /* source/headers/geos/platform.h. Generated from platform.h.in by configure. */
#ifndef GEOS_PLATFORM_H
#define GEOS_PLATFORM_H
/* Set to 1 if you have `int64_t' type */
#define HAVE_INT64_T_64 /**/
/* Set to 1 if `long int' is 64 bits */
/* #undef HAVE_LONG_INT_64 */
/* Set to 1 if `long long int' is 64 bits */
/* #undef HAVE_LONG_LONG_INT_64 */
/* Set to 1 if you have ieeefp.h */
/* #undef HAVE_IEEEFP_H */
/* Has finite */
#define HAVE_FINITE 1
/* Has isfinite */
/* #undef HAVE_ISFINITE */
/* Has isnan */
#define HAVE_ISNAN 1
#ifdef HAVE_IEEEFP_H
extern "C"
{
#include <ieeefp.h>
}
#endif
#ifdef HAVE_INT64_T_64
extern "C"
{
#include <inttypes.h>
}
#endif
#if defined(__GNUC__) && defined(_WIN32)
/* For MingW the appropriate definitions are included in
math.h and float.h but the definitions in
math.h are only included if __STRICT_ANSI__
is not defined. Since GEOS is compiled with -ansi that
means those definitions are not available. */
#include <float.h>
#endif
#include <cmath> // for finite()/isfinite() and isnan()
#include <limits> // for std::numeric_limits
//Defines NaN for intel platforms
#define DoubleNotANumber std::numeric_limits<double>::quiet_NaN()
//Don't forget to define infinities
#define DoubleInfinity std::numeric_limits<double>::infinity()
#define DoubleNegInfinity -std::numeric_limits<double>::infinity()
#define DoubleMax std::numeric_limits<double>::max()
inline bool
isFinite(double d)
{
#if defined(HAVE_FINITE) && !defined(HAVE_ISFINITE) && !defined(__MINGW32__)
return (finite(d));
#else
// Put using namespace std; here if you have to
// put it anywhere.
using namespace std;
return (isfinite(d));
#endif
}
#define FINITE(x) ( isFinite(x) )
#ifdef HAVE_ISNAN
#define ISNAN(x) ( isnan(x) )
#else
// Hack for OS/X <cmath> incorrectly re-defining isnan() into
// oblivion. It does leave a version in std.
#define ISNAN(x) ( std::isnan(x) )
#endif
#ifdef HAVE_INT64_T_64
typedef int64_t int64;
#else
# ifdef HAVE_LONG_LONG_INT_64
typedef long long int int64;
# else
typedef long int int64;
# ifndef HAVE_LONG_INT_64
# define INT64_IS_REALLY32 1
# warning "Could not find 64bit integer definition!"
# endif
# endif
#endif
inline int getMachineByteOrder() {
static int endian_check = 1; // don't modify !!
return *((char *)&endian_check); // 0 == big_endian | xdr,
// 1 == little_endian | ndr
}
#endif
|