diff options
| author | Marian Buschsieweke <marian.buschsieweke@ovgu.de> | 2019-12-20 11:17:17 +0100 |
|---|---|---|
| committer | Rasmus Thomsen <oss@cogitri.dev> | 2019-12-21 15:25:04 +0100 |
| commit | 4956d3846f7c80e31a2c62de056d8d056ae8343e (patch) | |
| tree | 2c56687229b46e1aaa19e256e76041a785687122 /testing/opencascade/no_feenableexcept.patch | |
| parent | a77633de5fed2a06a514d51b605facee88a103c2 (diff) | |
| download | aports-4956d3846f7c80e31a2c62de056d8d056ae8343e.tar.bz2 aports-4956d3846f7c80e31a2c62de056d8d056ae8343e.tar.xz | |
testing/opencascade: upgrade to 7.4.0
Diffstat (limited to 'testing/opencascade/no_feenableexcept.patch')
| -rw-r--r-- | testing/opencascade/no_feenableexcept.patch | 63 |
1 files changed, 32 insertions, 31 deletions
diff --git a/testing/opencascade/no_feenableexcept.patch b/testing/opencascade/no_feenableexcept.patch index f524008151..21d9e699e6 100644 --- a/testing/opencascade/no_feenableexcept.patch +++ b/testing/opencascade/no_feenableexcept.patch @@ -1,40 +1,41 @@ musl does not provice feenableexcept and fedisableexcept. Those calls have only been used on linux so far. This patch extends the #ifdef logic to only use them on Linux if additionally glibc is used. ---- occt-V7_3_0p3.old/src/OSD/OSD_signal.cxx -+++ occt-V7_3_0p3/src/OSD/OSD_signal.cxx -@@ -687,7 +687,7 @@ - // cout << "OSD::Handler: signal " << (int) theSignal << " occured inside a try block " << endl ; - if ( ADR_ACT_SIGIO_HANDLER != NULL ) - (*ADR_ACT_SIGIO_HANDLER)() ; --#ifdef __linux__ -+#if defined(__linux__) && defined(__GLIBC__) - if (fFltExceptions) - feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW); - //feenableexcept (FE_INVALID | FE_DIVBYZERO); -@@ -805,7 +805,7 @@ - (void)theSignal; // silence GCC warnings - (void)theContext; +--- occt-V7_4_0-org/src/OSD/OSD_signal.cxx ++++ occt-V7_4_0/src/OSD/OSD_signal.cxx +@@ -678,7 +678,7 @@ + // POSIX threads + #include <pthread.h> -#ifdef __linux__ -+#if defined(__linux__) && defined(__GLIBC__) - if (fFltExceptions) - feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW); - //feenableexcept (FE_INVALID | FE_DIVBYZERO); -@@ -891,14 +891,14 @@ - cerr << "ieee_handler does not work !!! KO " << endl; ++#ifdef __linux__ && defined(__GLIBC__) + #include <cfenv> + //#include <fenv.h> #endif - } --#elif defined (__linux__) -+#elif defined(__linux__) && defined(__GLIBC__) - feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW); - fFltExceptions = Standard_True; +@@ -793,7 +793,7 @@ + case SIGFPE: + sigaddset(&set, SIGFPE); + sigprocmask(SIG_UNBLOCK, &set, NULL) ; +-#ifdef __linux__ ++#ifdef __linux__ && defined(__GLIBC__) + OSD::SetFloatingSignal (Standard_True); #endif - } - else + #if (!defined (__sun)) && (!defined(SOLARIS)) +@@ -914,7 +914,7 @@ + //======================================================================= + void OSD::SetFloatingSignal (Standard_Boolean theFloatingSignal) + { +-#if defined (__linux__) ++#if defined (__linux__) && defined(__GLIBC__) + feclearexcept (FE_ALL_EXCEPT); + if (theFloatingSignal) { +@@ -947,7 +947,7 @@ + //======================================================================= + Standard_Boolean OSD::ToCatchFloatingSignals() + { -#if defined (__linux__) -+#if defined(__linux__) && defined(__GLIBC__) - fedisableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW); - fFltExceptions = Standard_False; - #endif ++#if defined (__linux__) && defined(__GLIBC__) + return (fegetexcept() & _OSD_FPX) != 0; + #else + return Standard_False; |
