summaryrefslogtreecommitdiff
path: root/iperlsys.h
diff options
context:
space:
mode:
authorDavid Mitchell <davem@iabyn.com>2019-11-11 10:46:56 +0000
committerDavid Mitchell <davem@iabyn.com>2019-11-18 09:34:40 +0000
commit5e7940ceb0d598dfa2aefdcdbda1f1dd8caa6bfd (patch)
treebba6083512c9b38309f000f789e1721c66e0a7e5 /iperlsys.h
parente7124897b9f4ae403795f9db247a331b6da9751e (diff)
downloadperl-5e7940ceb0d598dfa2aefdcdbda1f1dd8caa6bfd.tar.gz
add PERL_USE_3ARG_SIGHANDLER macro
There are a bunch of places in core that do #if defined(HAS_SIGACTION) && defined(SA_SIGINFO) to decide whether the C signal handler function should be declared with, and called with, 1 arg or 3 args. This commit just adds #if defined(HAS_SIGACTION) && defined(SA_SIGINFO) # define PERL_USE_3ARG_SIGHANDLER #endif Then uses the new macro in all other places rather than checking HAS_SIGACTION and SA_SIGINFO. Thus there is no functional change; it just makes the code more readable. However, it turns out that all is not well with core's use of 1-arg versus 3-arg, and the few commits will fix this.
Diffstat (limited to 'iperlsys.h')
-rw-r--r--iperlsys.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/iperlsys.h b/iperlsys.h
index b4a92ea574..de2dad65bb 100644
--- a/iperlsys.h
+++ b/iperlsys.h
@@ -51,7 +51,7 @@
#include "perlio.h"
#ifndef Sighandler_t
-# if defined(HAS_SIGACTION) && defined(SA_SIGINFO)
+# ifdef PERL_USE_3ARG_SIGHANDLER
typedef Signal_t (*Sighandler_t) (int, Siginfo_t*, void*);
# else
typedef Signal_t (*Sighandler_t) (int);