aboutsummaryrefslogtreecommitdiffstats
path: root/src/signals.c
diff options
context:
space:
mode:
authorMattias Andrée <m@maandree.se>2025-03-05 16:38:44 +0100
committerMattias Andrée <m@maandree.se>2025-03-05 16:38:44 +0100
commit844a48da2d670be95a62a582aab73ad8145040e2 (patch)
tree1c20cd1646706d6af03bce48822568c5602a8616 /src/signals.c
parentUse colour temperature table from libred (diff)
downloadredshift-ng-844a48da2d670be95a62a582aab73ad8145040e2.tar.gz
redshift-ng-844a48da2d670be95a62a582aab73ad8145040e2.tar.bz2
redshift-ng-844a48da2d670be95a62a582aab73ad8145040e2.tar.xz
Unify header files (so far most)
Signed-off-by: Mattias Andrée <m@maandree.se>
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;
}