aboutsummaryrefslogtreecommitdiffstats
path: root/src/signals.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/signals.c')
-rw-r--r--src/signals.c21
1 files changed, 6 insertions, 15 deletions
diff --git a/src/signals.c b/src/signals.c
index e2aa219..262e8f5 100644
--- a/src/signals.c
+++ b/src/signals.c
@@ -18,19 +18,10 @@
Copyright (c) 2015 Mattias Andrée <m@maandree.se>
*/
-#ifdef HAVE_CONFIG_H
-# include "config.h"
-#endif
-
-#include <stdio.h>
-#if defined(HAVE_SIGNAL_H) && !defined(__WIN32__)
-# include <signal.h>
-#endif
+#include "common.h"
-#include "signals.h"
-
-#if defined(HAVE_SIGNAL_H) && !defined(__WIN32__)
+#if !defined(__WIN32__)
volatile sig_atomic_t exiting = 0;
volatile sig_atomic_t disable = 0;
@@ -50,18 +41,18 @@ sigdisable(int signo)
disable = 1;
}
-#else /* ! HAVE_SIGNAL_H || __WIN32__ */
+#else
int disable = 0;
int exiting = 0;
-#endif /* ! HAVE_SIGNAL_H || __WIN32__ */
+#endif
int
signals_install_handlers(void)
{
-#if defined(HAVE_SIGNAL_H) && !defined(__WIN32__)
+#if !defined(__WIN32__)
struct sigaction sigact;
sigset_t sigset;
int r;
@@ -112,7 +103,7 @@ signals_install_handlers(void)
perror("sigaction");
return -1;
}
-#endif /* HAVE_SIGNAL_H && ! __WIN32__ */
+#endif
return 0;
}