[geos-commits] [SCM] GEOS branch 3.14 updated. 69b60f3ec4d94321862074c09d046107698eda97

git at osgeo.org git at osgeo.org
Tue Sep 16 02:21:05 PDT 2025


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, 3.14 has been updated
       via  69b60f3ec4d94321862074c09d046107698eda97 (commit)
       via  12920182334e4cf5d105d8ff4c4b3e13feae5a9b (commit)
      from  e620b25dad1f36545beabf37bc49ef1fdb022db6 (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 69b60f3ec4d94321862074c09d046107698eda97
Author: Mike Taves <mwtoews at gmail.com>
Date:   Tue Sep 16 21:20:38 2025 +1200

    Update NEWS.md for GH-1305 backport

diff --git a/NEWS.md b/NEWS.md
index 4b78c25c0..fa23cb5b0 100644
--- a/NEWS.md
+++ b/NEWS.md
@@ -3,7 +3,7 @@
 2025-xx-xx
 
 - Fixes/Improvements:
-  - 
+  - Make floating-point exceptions optional for geosop (GH-1305, Maxim Kochetkov)
 
 
 ## Changes in 3.14.0

commit 12920182334e4cf5d105d8ff4c4b3e13feae5a9b
Author: Maxim Kochetkov <adobegitler at gmail.com>
Date:   Tue Sep 16 12:13:38 2025 +0300

    geosop: make floating-point exceptions optional (#1305)
    
    commit 26292ce ("geosop: show most floating-point exceptions in verbose mode")
    add fenv.h dependency. Some libc implementations (uclibc-ng )may have no fenv
    support. So make floating-point exceptions optional and detetct fenv.h at
    configure stage.
    
    Signed-off-by: Maxim Kochetkov <fido_max at inbox.ru>

diff --git a/CMakeLists.txt b/CMakeLists.txt
index 12411e586..a1e2f0c6e 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -558,3 +558,10 @@ if(PROJECT_IS_TOP_LEVEL)
 
   unset(_is_multi_config_generator)
 endif()  # PROJECT_IS_TOP_LEVEL
+
+include(CheckIncludeFile)
+check_include_file(fenv.h HAVE_FENV_H)
+
+if(HAVE_FENV_H)
+    target_compile_definitions(geos_cxx_flags INTERFACE HAVE_FENV)
+endif()
diff --git a/util/geosop/GeosOp.cpp b/util/geosop/GeosOp.cpp
index 2cb17f000..05307cf30 100644
--- a/util/geosop/GeosOp.cpp
+++ b/util/geosop/GeosOp.cpp
@@ -26,7 +26,9 @@
 #include <geos/io/WKBStreamReader.h>
 #include <geos/io/WKBWriter.h>
 
+#if defined(HAVE_FENV)
 #include <cfenv>
+#endif
 #include <fstream>
 #include <iostream>
 #include <sstream>
@@ -394,10 +396,13 @@ void GeosOp::run(OpArguments& opArgs) {
     //------------------------
 
     try {
+#if defined(HAVE_FENV)
         std::feclearexcept(FE_ALL_EXCEPT); // clear floating-point status flags
+#endif
 
         execute(op, opArgs);
 
+#if defined(HAVE_FENV)
         // Catch everything except for FE_INEXACT, which is usually harmless
         const int fpexp = std::fetestexcept(FE_ALL_EXCEPT ^ FE_INEXACT);
         if (args.isVerbose && (fpexp != 0)) {
@@ -414,6 +419,7 @@ void GeosOp::run(OpArguments& opArgs) {
                 std::cerr << " FE_UNDERFLOW";
             std::cerr << std::endl;
         }
+#endif
     }
     catch (std::exception &e) {
         std::cerr << "Run-time exception: " << e.what() << std::endl;

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

Summary of changes:
 CMakeLists.txt         | 7 +++++++
 NEWS.md                | 2 +-
 util/geosop/GeosOp.cpp | 6 ++++++
 3 files changed, 14 insertions(+), 1 deletion(-)


hooks/post-receive
-- 
GEOS


More information about the geos-commits mailing list