From 844a48da2d670be95a62a582aab73ad8145040e2 Mon Sep 17 00:00:00 2001 From: Mattias Andrée Date: Wed, 5 Mar 2025 16:38:44 +0100 Subject: Unify header files (so far most) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Mattias Andrée --- src/signals.c | 21 ++++++--------------- 1 file changed, 6 insertions(+), 15 deletions(-) (limited to 'src/signals.c') 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 */ -#ifdef HAVE_CONFIG_H -# include "config.h" -#endif - -#include -#if defined(HAVE_SIGNAL_H) && !defined(__WIN32__) -# include -#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; } -- cgit v1.2.3-70-g09d2