summaryrefslogtreecommitdiff
path: root/Configure
diff options
context:
space:
mode:
authorDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2016-01-12 14:47:07 +0000
committerDagfinn Ilmari Mannsåker <ilmari@ilmari.org>2016-01-26 10:51:42 +0000
commitcdfe2e65ec1960d301d083bee421388e064cd234 (patch)
tree37b5c45025c58e9b119007c55b1c261603ef92e6 /Configure
parent34e79b757ab6100d44bdbfa6f9603793a4215bbf (diff)
downloadperl-cdfe2e65ec1960d301d083bee421388e064cd234.tar.gz
Probe for and expose more fields for SA_SIGINFO
These are all specified by POSIX/SUSv3, but not all platforms have them, as mentioned in POSIX.pm. We can only test the pid, uid and code fields, since they are the only ones that are defined for a user-sent signal.
Diffstat (limited to 'Configure')
-rwxr-xr-xConfigure67
1 files changed, 67 insertions, 0 deletions
diff --git a/Configure b/Configure
index d5a7de31cf..3d65fd2428 100755
--- a/Configure
+++ b/Configure
@@ -785,6 +785,13 @@ d_shmctl=''
d_shmdt=''
d_shmget=''
d_sigaction=''
+d_siginfo_si_errno=''
+d_siginfo_si_pid=''
+d_siginfo_si_uid=''
+d_siginfo_si_addr=''
+d_siginfo_si_status=''
+d_siginfo_si_band=''
+d_siginfo_si_value=''
d_signbit=''
d_sigprocmask=''
d_sigsetjmp=''
@@ -10758,6 +10765,25 @@ set $varname;
eval $setvar;
$rm_try'
+: Define hasfield_t macro for Configure internal use
+hasfield_t='varname=$1; struct=$2; type=$3; field=$4; shift; shift; shift; shift;
+while $test $# -ge 2; do
+ case "$1" in
+ $define) echo "#include <$2>";;
+ esac ;
+ shift 2;
+done > try.c;
+echo "int main () { $struct foo; $type bar = foo.$field; }" >> try.c;
+set try;
+if eval $compile; then
+ val="$define";
+else
+ val="$undef";
+fi;
+set $varname;
+eval $setvar;
+$rm_try'
+
: see if we should include time.h, sys/time.h, or both
echo " "
if test "X$timeincl" = X; then
@@ -22697,6 +22723,40 @@ case "$uidsign" in
;;
esac
+: see what siginfo fields we have
+case "$d_sigaction" in
+"$define")
+ echo "Checking if your siginfo_t has si_errno field...">&4
+ set d_siginfo_si_errno siginfo_t int si_errno $d_sigaction signal.h
+ eval $hasfield_t;
+
+ echo "Checking if your siginfo_t has si_pid field...">&4
+ set d_siginfo_si_pid siginfo_t $pidtype si_pid $d_sigaction signal.h
+ eval $hasfield_t;
+
+ echo "Checking if your siginfo_t has si_uid field...">&4
+ set d_siginfo_si_uid siginfo_t $uidtype si_uid $d_sigaction signal.h
+ eval $hasfield_t;
+
+ echo "Checking if your siginfo_t has si_addr field...">&4
+ set d_siginfo_si_addr siginfo_t "void *" si_addr $d_sigaction signal.h
+ eval $hasfield_t;
+
+ echo "Checking if your siginfo_t has si_status field...">&4
+ set d_siginfo_si_status siginfo_t int si_status $d_sigaction signal.h
+ eval $hasfield_t;
+
+ echo "Checking if your siginfo_t has si_band field...">&4
+ set d_siginfo_si_band siginfo_t long si_band $d_sigaction signal.h
+ eval $hasfield_t;
+
+ echo "Checking if your siginfo_t has si_value field...">&4
+ set d_siginfo_si_value siginfo_t "union sigval" si_value $d_sigaction signal.h
+ eval $hasfield_t;
+
+ ;;
+esac
+
: Determine if we can use sysctl with KERN_PROC_PATHNAME to find executing program
echo " "
echo "Determining whether we can use sysctl with KERN_PROC_PATHNAME to find executing program..." >&4
@@ -24523,6 +24583,13 @@ d_shmctl='$d_shmctl'
d_shmdt='$d_shmdt'
d_shmget='$d_shmget'
d_sigaction='$d_sigaction'
+d_siginfo_si_errno='$d_siginfo_si_errno'
+d_siginfo_si_pid='$d_siginfo_si_pid'
+d_siginfo_si_uid='$d_siginfo_si_uid'
+d_siginfo_si_addr='$d_siginfo_si_addr'
+d_siginfo_si_status='$d_siginfo_si_status'
+d_siginfo_si_band='$d_siginfo_si_band'
+d_siginfo_si_value='$d_siginfo_si_value'
d_signbit='$d_signbit'
d_sigprocmask='$d_sigprocmask'
d_sigsetjmp='$d_sigsetjmp'