diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/include/skalibs/nsig.h | 6 | ||||
-rw-r--r-- | src/libstddjb/selfpipe_finish.c | 10 | ||||
-rw-r--r-- | src/libstddjb/selfpipe_trapset.c | 15 | ||||
-rw-r--r-- | src/libstddjb/sig_stack.c | 3 |
4 files changed, 23 insertions, 11 deletions
diff --git a/src/include/skalibs/nsig.h b/src/include/skalibs/nsig.h index 2cecda9..040be2c 100644 --- a/src/include/skalibs/nsig.h +++ b/src/include/skalibs/nsig.h @@ -1,8 +1,12 @@ /* ISC license. */ +/* + This header MUST be paired with skalibs/nonposix.h + which must be included before system headers. +*/ + #ifndef NSIG_H -#include <skalibs/nonposix.h> #include <signal.h> #define SKALIBS_NSIG 65 diff --git a/src/libstddjb/selfpipe_finish.c b/src/libstddjb/selfpipe_finish.c index 0635efb..fd9f6c2 100644 --- a/src/libstddjb/selfpipe_finish.c +++ b/src/libstddjb/selfpipe_finish.c @@ -3,13 +3,14 @@ /* MT-unsafe */ #include <skalibs/sysdeps.h> + +#ifdef SKALIBS_HASSIGNALFD + #include <signal.h> #include <skalibs/djbunix.h> #include "selfpipe-internal.h" #include <skalibs/selfpipe.h> -#ifdef SKALIBS_HASSIGNALFD - void selfpipe_finish (void) { sigprocmask(SIG_UNBLOCK, &selfpipe_caught, 0) ; @@ -20,8 +21,13 @@ void selfpipe_finish (void) #else +#include <skalibs/nonposix.h> +#include <signal.h> #include <skalibs/sig.h> #include <skalibs/nsig.h> +#include <skalibs/djbunix.h> +#include "selfpipe-internal.h" +#include <skalibs/selfpipe.h> void selfpipe_finish (void) { diff --git a/src/libstddjb/selfpipe_trapset.c b/src/libstddjb/selfpipe_trapset.c index 33ac861..519e37b 100644 --- a/src/libstddjb/selfpipe_trapset.c +++ b/src/libstddjb/selfpipe_trapset.c @@ -1,16 +1,14 @@ /* ISC license. */ -/* MT-unsafe */ - -#include <errno.h> -#include <signal.h> #include <skalibs/sysdeps.h> -#include "selfpipe-internal.h" -#include <skalibs/selfpipe.h> #ifdef SKALIBS_HASSIGNALFD +#include <errno.h> +#include <signal.h> #include <sys/signalfd.h> +#include <skalibs/selfpipe.h> +#include "selfpipe-internal.h" int selfpipe_trapset (sigset_t const *set) { @@ -30,8 +28,13 @@ int selfpipe_trapset (sigset_t const *set) #else +#include <skalibs/nonposix.h> +#include <errno.h> +#include <signal.h> #include <skalibs/sig.h> #include <skalibs/nsig.h> +#include <skalibs/selfpipe.h> +#include "selfpipe-internal.h" int selfpipe_trapset (sigset_t const *set) { diff --git a/src/libstddjb/sig_stack.c b/src/libstddjb/sig_stack.c index 5897f63..f682971 100644 --- a/src/libstddjb/sig_stack.c +++ b/src/libstddjb/sig_stack.c @@ -1,7 +1,6 @@ /* ISC license. */ -/* MT-unsafe */ - +#include <skalibs/nonposix.h> #include <errno.h> #include <signal.h> #include <skalibs/sig.h> |