diff options
author | Cheng Shao <astrohavoc@gmail.com> | 2022-10-21 14:09:07 +0000 |
---|---|---|
committer | Marge Bot <ben+marge-bot@smart-cactus.org> | 2022-11-11 00:26:55 -0500 |
commit | 4d36a1d37d826006b9832f1aabea4c9cd5104a3d (patch) | |
tree | 3f579c851c1ae28c248187e16c2cfc5c990e8777 /rts/RtsStartup.c | |
parent | d72466a9fdb2e65196b5d243495cadd68bb07aa2 (diff) | |
download | haskell-4d36a1d37d826006b9832f1aabea4c9cd5104a3d.tar.gz |
rts: don't define RTS_USER_SIGNALS when signal.h is not present
In the rts, we have a RTS_USER_SIGNALS macro, and most signal-related
logic is guarded with RTS_USER_SIGNALS. This patch extends the range
of code guarded with RTS_USER_SIGNALS, and define RTS_USER_SIGNALS iff
signal.h is actually detected by autoconf. This is required for
wasm32-wasi to work, which lacks signals.
Diffstat (limited to 'rts/RtsStartup.c')
-rw-r--r-- | rts/RtsStartup.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/rts/RtsStartup.c b/rts/RtsStartup.c index 5b0cc9f712..46749163dc 100644 --- a/rts/RtsStartup.c +++ b/rts/RtsStartup.c @@ -659,7 +659,7 @@ shutdownHaskellAndExit(int n, int fastExit) stg_exit(n); } -#if !defined(mingw32_HOST_OS) +#if !defined(mingw32_HOST_OS) && defined(HAVE_SIGNAL_H) static void exitBySignal(int sig) STG_NORETURN; void |