[geos-commits] [SCM] geos branch master updated. 0f722dc002ff8f907078193548b9ce8e028b5da2

git at osgeo.org git at osgeo.org
Sat Jan 20 22:26:41 PST 2018


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "geos".

The branch, master has been updated
       via  0f722dc002ff8f907078193548b9ce8e028b5da2 (commit)
       via  4b23f09c8e0ff3d178cc6538c3bf4e52b80e33cf (commit)
      from  759255faaeb946e59266460d41a08e1eb70233e8 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 0f722dc002ff8f907078193548b9ce8e028b5da2
Merge: 759255f 4b23f09
Author: robe <lr at pcorp.us>
Date:   Sat Jan 20 22:26:40 2018 -0800

    Merge branch 'ticket853-from-master' of cvvergara/geos into master


commit 4b23f09c8e0ff3d178cc6538c3bf4e52b80e33cf
Author: cvvergara <vicky at georepublic.de>
Date:   Sat Jan 20 11:33:12 2018 -0600

    Updating platform.h.cmake Close #853

diff --git a/include/geos/platform.h.cmake b/include/geos/platform.h.cmake
index 035a48a..9640966 100644
--- a/include/geos/platform.h.cmake
+++ b/include/geos/platform.h.cmake
@@ -5,13 +5,14 @@
  * GEOS - Geometry Engine Open Source
  * http://geos.osgeo.org
  *
+ * Copyright (C) 2018 Vicky Vergara
  * Copyright (C) 2009 Mateusz Loskot
  * Copyright (C) 2005-2009 Refractions Research Inc.
  * Copyright (C) 2001-2009 Vivid Solutions Inc.
  *
  * This is free software; you can redistribute and/or modify it under
  * the terms of the GNU Lesser General Public Licence as published
- * by the Free Software Foundation. 
+ * by the Free Software Foundation.
  * See the COPYING file for more information.
  *
  *********************************************************************/
@@ -28,138 +29,58 @@
 /* Disable inclusion of platform.h not generated by CMake */
 #define GEOS_PLATFORM_H 1
 
-/* Set to 1 if you have stdint.h */
-#cmakedefine HAVE_STDINT_H 1
-
-/* Set to 1 if you have inttypes.h */
-#cmakedefine HAVE_INTTYPES_H 1
-
 /* Set to 1 if you have ieeefp.h */
 #cmakedefine HAVE_IEEEFP_H 1
 
-/* Set to 1 if you have `int64_t' type */
-#cmakedefine HAVE_INT64_T_64 1
-
-/* Set to 1 if `long int' is 64 bits */
-#cmakedefine HAVE_LONG_INT_64 1
-
-/* Set to 1 if `long long int' is 64 bits */
-#cmakedefine HAVE_LONG_LONG_INT_64 1
-
-/* Set to 1 if C++/C99 std::isnan is defined */
-#cmakedefine HAVE_STD_ISNAN 1
-
-/* Set to 1 if C99 isnan is defined */
-#cmakedefine HAVE_ISNAN 1
-
-/* Set to 1 if XCode __isnand is defined */
-#cmakedefine HAVE_ISNAND_XCODE 1
-
-/* Set to 1 if XCode __inline_isnand is defined */
-#cmakedefine HAVE_INLINE_ISNAND_XCODE 1
-
-/* Set to 1 if C++/C99 std::isfinite is defined */
-#cmakedefine HAVE_STD_ISFINITE 1
-
-/* Set to 1 if C99 isfinite is defined */
-#cmakedefine HAVE_ISFINITE 1
-
-/* Set to 1 if Visual C++ finite is defined */
-#cmakedefine HAVE_FINITE 1
-
-
-#ifdef HAVE_IEEEFP_H
-extern "C"
-{
-#include <ieeefp.h>
-}
-#endif
-
-#ifdef HAVE_INTTYPES_H
-extern "C"
-{
-#include <inttypes.h>
-}
-# ifndef HAVE_INT64_T_64
-#  error Warning: inttypes.h included but HAVE_INT64_T_64 not defined
-# endif
-#endif
-
-/* We need M_PI, but on MSVC you need to define _USE_MATH_DEFINES before
- * including math.h to get it.  If we are too late (math.h already included)
- * we will define it manually.
- */
 #ifdef _MSC_VER
-#define _USE_MATH_DEFINES
-#include <cmath>
-#include <float.h>
-#else
-#include <cmath>
+#  define _USE_MATH_DEFINES
 #endif
+#include <cmath>
 #include <limits>
+#include <cinttypes>
+
+
 
 #ifndef M_PI
 #define M_PI 3.14159265358979323846
 #endif
 
-/* 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.
- */
-#if defined(__GNUC__) && defined(_WIN32)
-#include <float.h>
-#endif
+typedef int64_t int64;
+
 
-#ifdef HAVE_INT64_T_64
-# ifdef _MSC_VER
-   typedef __int64 int64;
-# else
-   typedef int64_t int64;
-# endif
+#if defined(_MSC_VER) && _MSC_VER >= 1200 // VC++ 6.0 and above
+#  include <float.h>
+#  ifndef FINITE
+#    define FINITE(x) _finite(x)
+#  endif
+#  ifndef ISNAN
+#    define ISNAN(x) _isnan(x)
+#  endif
+#elif !defined(HAVE_IEEEFP_H)
+#  include <cmath>
+#  ifndef FINITE
+#    define FINITE(x) std::isfinite(x)
+#  endif
+#  ifndef ISNAN
+#    define ISNAN(x) std::isnan(x)
+#  endif
 #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!"
+#  include <ieeefp.h>
+#  ifndef FINITE
+#    define FINITE(x) finite(x)
+#  endif
+#  ifndef ISNAN
+#    define ISNAN(x) isnan(x)
 #  endif
-# endif
 #endif
 
-#if defined(HAVE_STD_ISNAN)
-# define ISNAN(x) (std::isnan)(x)
-#elif defined(HAVE_INLINE_ISNAND_XCODE)
-# define ISNAN(x) __inline_isnand(static_cast<double>(x))
-#elif defined(HAVE_ISNAND_XCODE)
-# define ISNAN(x) __isnand(static_cast<double>(x))
-#elif defined(HAVE_ISNAN)
-# if defined(_MSC_VER)
-#  define ISNAN(x) _isnan(static_cast<double>(x))
-# else
-#  define ISNAN(x) isnan(x)
-# endif
-#else
-# error "Could not find isnan function or macro!"
-#endif
 
-#if defined(HAVE_STD_ISFINITE)
-# define FINITE(x) (std::isfinite)(x)
-#elif defined(HAVE_ISFINITE)
-# define FINITE(x) isfinite(x)
-#elif defined(HAVE_FINITE)
-# define FINITE(x) _finite(static_cast<double>(x))
-#else
-# error "Could not find finite or isfinite function or macro!"
-#endif
+// Some handy constants
+constexpr double DoubleNotANumber = std::numeric_limits<double>::quiet_NaN();
+constexpr double DoubleMax = (std::numeric_limits<double>::max)();
+constexpr double DoubleInfinity = (std::numeric_limits<double>::infinity)();
+constexpr double DoubleNegInfinity = (-(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

-----------------------------------------------------------------------

Summary of changes:
 include/geos/platform.h.cmake |  153 ++++++++++-------------------------------
 1 file changed, 37 insertions(+), 116 deletions(-)


hooks/post-receive
-- 
geos


More information about the geos-commits mailing list