summaryrefslogtreecommitdiff
path: root/rts/RtsStartup.c
diff options
context:
space:
mode:
authorCheng Shao <astrohavoc@gmail.com>2022-10-21 14:09:07 +0000
committerMarge Bot <ben+marge-bot@smart-cactus.org>2022-11-11 00:26:55 -0500
commit4d36a1d37d826006b9832f1aabea4c9cd5104a3d (patch)
tree3f579c851c1ae28c248187e16c2cfc5c990e8777 /rts/RtsStartup.c
parentd72466a9fdb2e65196b5d243495cadd68bb07aa2 (diff)
downloadhaskell-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.c2
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