aboutsummaryrefslogtreecommitdiffstats
path: root/testing/opencascade/no_feenableexcept.patch
diff options
context:
space:
mode:
authorMarian Buschsieweke <marian.buschsieweke@ovgu.de>2019-10-15 10:22:15 +0200
committerMilan P. Stanić <mps@arvanta.net>2019-10-22 22:41:30 +0200
commitcc09448dc3b0ed20643dbc894c515c88407ebc37 (patch)
tree4334c4d252419f989ca9294f5d3ce6090d409a1d /testing/opencascade/no_feenableexcept.patch
parentbd5f040a849d08e2ef29f742e34d6a601adac682 (diff)
downloadaports-cc09448dc3b0ed20643dbc894c515c88407ebc37.tar.bz2
aports-cc09448dc3b0ed20643dbc894c515c88407ebc37.tar.xz
testing/opencascade: new aport
Diffstat (limited to 'testing/opencascade/no_feenableexcept.patch')
-rw-r--r--testing/opencascade/no_feenableexcept.patch40
1 files changed, 40 insertions, 0 deletions
diff --git a/testing/opencascade/no_feenableexcept.patch b/testing/opencascade/no_feenableexcept.patch
new file mode 100644
index 0000000000..f524008151
--- /dev/null
+++ b/testing/opencascade/no_feenableexcept.patch
@@ -0,0 +1,40 @@
+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;
+
+-#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;
+ #endif
+ }
+-#elif defined (__linux__)
++#elif defined(__linux__) && defined(__GLIBC__)
+ feenableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
+ fFltExceptions = Standard_True;
+ #endif
+ }
+ else
+ {
+-#if defined (__linux__)
++#if defined(__linux__) && defined(__GLIBC__)
+ fedisableexcept (FE_INVALID | FE_DIVBYZERO | FE_OVERFLOW);
+ fFltExceptions = Standard_False;
+ #endif