|
|
@@ -771,9 +771,7 @@ static LONG NTAPI signal_handler(EXCEPTION_POINTERS *e) {
|
|
|
return EXCEPTION_CONTINUE_EXECUTION; /* never reached, but shuts up gcc */
|
|
|
}
|
|
|
#endif
|
|
|
-#else
|
|
|
-
|
|
|
-#ifndef _WASI_EMULATED_SIGNAL
|
|
|
+#elif !defined(_WASI_EMULATED_SIGNAL)
|
|
|
static void signal_handler(int s);
|
|
|
|
|
|
static const struct sigaction signal_handler_act = {
|
|
|
@@ -788,8 +786,6 @@ static void signal_handler(int s) {
|
|
|
checkasm_load_context(s);
|
|
|
}
|
|
|
}
|
|
|
-#endif // _WASI_EMULATED_SIGNAL
|
|
|
-
|
|
|
#endif
|
|
|
|
|
|
/* Compares a string with a wildcard pattern. */
|
|
|
@@ -938,13 +934,11 @@ int main(int argc, char *argv[])
|
|
|
#if WINAPI_FAMILY_PARTITION(WINAPI_PARTITION_DESKTOP)
|
|
|
AddVectoredExceptionHandler(0, signal_handler);
|
|
|
#endif
|
|
|
-#else
|
|
|
-#ifndef _WASI_EMULATED_SIGNAL
|
|
|
+#elif !defined(_WASI_EMULATED_SIGNAL)
|
|
|
sigaction(SIGBUS, &signal_handler_act, NULL);
|
|
|
sigaction(SIGFPE, &signal_handler_act, NULL);
|
|
|
sigaction(SIGILL, &signal_handler_act, NULL);
|
|
|
sigaction(SIGSEGV, &signal_handler_act, NULL);
|
|
|
-#endif // _WASI_EMULATED_SIGNAL
|
|
|
#endif
|
|
|
#if HAVE_PRCTL && defined(PR_SET_UNALIGN)
|
|
|
prctl(PR_SET_UNALIGN, PR_UNALIGN_SIGBUS);
|