[geos-commits] r2871 - trunk/include/geos

svn_geos at osgeo.org svn_geos at osgeo.org
Mon Jan 18 13:13:33 EST 2010


Author: mloskot
Date: 2010-01-18 13:13:33 -0500 (Mon, 18 Jan 2010)
New Revision: 2871

Modified:
   trunk/include/geos/platform.h.cmake
Log:
Cleaned redundant include for cmath and math.h from platform.h.cmake (#317)

Modified: trunk/include/geos/platform.h.cmake
===================================================================
--- trunk/include/geos/platform.h.cmake	2010-01-18 18:12:49 UTC (rev 2870)
+++ trunk/include/geos/platform.h.cmake	2010-01-18 18:13:33 UTC (rev 2871)
@@ -83,8 +83,12 @@
  */
 #ifdef _MSC_VER
 #define _USE_MATH_DEFINES
-#include <math.h>
+#include <cmath>
+#include <float.h>
+#else
+#include <cmath>
 #endif
+#include <limits>
 
 #ifndef M_PI
 #define M_PI 3.14159265358979323846
@@ -118,20 +122,15 @@
 #endif
 
 #if defined(HAVE_STD_ISNAN)
-# include <cmath>
 # define ISNAN(x) (std::isnan)(x)
 #elif defined(HAVE_INLINE_ISNAND_XCODE)
-# include <math.h>
 # define ISNAN(x) __inline_isnand(static_cast<double>(x))
 #elif defined(HAVE_ISNAND_XCODE)
-# include <math.h>
 # define ISNAN(x) __isnand(static_cast<double>(x))
 #elif defined(HAVE_ISNAN)
 # if defined(_MSC_VER)
-#  include <float.h>
 #  define ISNAN(x) _isnan(static_cast<double>(x))
 # else
-#  include <math.h>
 #  define ISNAN(x) isnan(x)
 # endif
 #else
@@ -139,24 +138,20 @@
 #endif
 
 #if defined(HAVE_STD_ISFINITE)
-# include <cmath>
 # define FINITE(x) (std::isfinite)(x)
 #elif defined(HAVE_ISFINITE)
-# include <math.h>
 # define FINITE(x) isfinite(x)
 #elif defined(HAVE_FINITE)
-# include <float.h>
 # define FINITE(x) _finite(static_cast<double>(x))
 #else
 # error "Could not find finite or isfinite function or macro!"
 #endif
 
-#include <limits>
-#define DoubleNegInfinity (-(std::numeric_limits<double>::infinity)())
-#define DoubleMax (std::numeric_limits<double>::max)()
-// 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)()
+// 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)()
 
 #endif // GEOS_PLATFORM_H_INCLUDED



More information about the geos-commits mailing list