]> OCCT Git - occt-copy.git/commit
0029171: Foundation Classes - C signal handler does not work on MinGW
authorabv <abv@opencascade.com>
Sat, 7 Oct 2017 16:26:38 +0000 (19:26 +0300)
committerkgv <kgv@opencascade.com>
Mon, 4 Dec 2017 18:20:14 +0000 (21:20 +0300)
commit186aedd02240155ea4e80f75a3f1731e7f776a61
tree37b168d5538e93a9ec66b0cbcfc4e8c24f576f18
parentff414218721e825cea2f00c861d979635b9e8a54
0029171: Foundation Classes - C signal handler does not work on MinGW

Setting signal handler is enabled in OSD::SetSignal() for MinGW (works only for SEH builds of MinGW, not for SJLJ builds).

Due to absence of function _set_se_translator(), handler is set using C signal() function and thus is called asynchronously.
Macro OCC_CONVERT_SIGNALS is enabled for MinGW build to support converting signals to C++ exceptions using long jumps (the same as on Linux).
Code raising exceptions in OSD::SetSignal() is corrected to use method Jump() instead of C++ throw.
adm/cmake/occt_defs_flags.cmake
src/OSD/OSD_signal.cxx