summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authortgoodwin <tgoodwin>1998-02-17 13:59:07 +0000
committerToby Goodwin <toby@paccrat.org>2015-05-16 21:23:04 +0100
commita14f36cd14770c0cc789737a0b0fa39ca411c9e1 (patch)
tree18d5d5b282033dc9befb5474254af2b4fd41463b
parent7cdc7259c1b514197fee5a0d973f95fdf3347677 (diff)
only define slowbuf etc. if needed
-rw-r--r--signal.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/signal.c b/signal.c
index 5929377..1f380f2 100644
--- a/signal.c
+++ b/signal.c
@@ -2,12 +2,16 @@
#include <signal.h>
#include <setjmp.h>
+
#include "rc.h"
#include "sigmsgs.h"
#include "jbwrap.h"
+#if HAVE_RESTARTABLE_SYSCALLS
Jbwrap slowbuf;
volatile SIG_ATOMIC_T slow, interrupt_happened;
+#endif
+
void (*sighandlers[NUMOFSIGNALS])(int);
static volatile SIG_ATOMIC_T sigcount, caught[NUMOFSIGNALS];
@@ -18,11 +22,13 @@ extern void catcher(int s) {
caught[s] = 1;
}
signal(s, catcher);
- interrupt_happened = TRUE;
+
#if HAVE_RESTARTABLE_SYSCALLS
+ interrupt_happened = TRUE;
if (slow)
siglongjmp(slowbuf.j, 1);
#endif
+
}
extern void sigchk() {