1
0
mirror of https://git.dev.opencascade.org/repos/occt.git synced 2025-04-01 17:36:21 +03:00

Foundation Classes - Update signal handling for GLIBC compatibility on Linux #458

Simply disabling the code which enables floating point exceptions
  is probably wrong, but I don't have a replacement for the
    non-posix functions fegetexcept(3) and feenableexcept(3).
This commit is contained in:
Pasukhin Dmitry 2025-03-23 18:57:11 +00:00 committed by GitHub
parent 233fd2a31f
commit 893747b46e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -769,7 +769,7 @@ typedef void (*SIG_PFV)(int);
#include <signal.h>
#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__)
#if !defined(__ANDROID__) && !defined(__QNX__) && !defined(__EMSCRIPTEN__) && defined(__GLIBC__)
#include <sys/signal.h>
#endif
@ -994,7 +994,7 @@ static void SegvHandler(const int theSignal,
void OSD::SetFloatingSignal(Standard_Boolean theFloatingSignal)
{
#if defined(__linux__)
#if defined(__linux__) && defined(__GLIBC__)
feclearexcept(FE_ALL_EXCEPT);
if (theFloatingSignal)
{
@ -1025,7 +1025,7 @@ void OSD::SetFloatingSignal(Standard_Boolean theFloatingSignal)
Standard_Boolean OSD::ToCatchFloatingSignals()
{
#if defined(__linux__)
#if defined(__linux__) && defined(__GLIBC__)
return (fegetexcept() & _OSD_FPX) != 0;
#else
return Standard_False;