check for SA_SIGINFO

git-svn-id: https://yap.svn.sf.net/svnroot/yap/trunk@497 b08c6af1-5177-4d33-ba66-4b1c6b8b522a
This commit is contained in:
vsc 2002-05-28 16:23:53 +00:00
parent f1eddd7966
commit 85f1080071
4 changed files with 86 additions and 0 deletions

View File

@ -1028,7 +1028,11 @@ my_signal_info(int sig, void (*handler)(int))
sigact.sa_handler = handler;
sigemptyset(&sigact.sa_mask);
#if HAVE_SIGINFO
sigact.sa_flags = SA_SIGINFO;
#else
sigact.sa_flags = 0;
#endif
sigaction(sig,&sigact,NULL);
}

View File

@ -217,6 +217,7 @@
#undef HAVE_WAITPID
#undef HAVE_MPZ_XOR
#undef HAVE_SIGINFO
#undef HAVE_SIGSEGV
#undef HAVE_ENVIRON

63
configure vendored
View File

@ -9468,6 +9468,69 @@ _ACEOF
fi
echo "$as_me:$LINENO: checking for siginfo" >&5
echo $ECHO_N "checking for siginfo... $ECHO_C" >&6
if test "${yap_siginfo+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#include <signal.h>
#include <stdio.h>
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
printf("SIGINFO value is %d\n", SA_SIGINFO);
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
yap_siginfo=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
yap_siginfo=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
fi
echo "$as_me:$LINENO: result: $yap_siginfo" >&5
echo "${ECHO_T}$yap_siginfo" >&6
if test $yap_siginfo = yes
then
cat >>confdefs.h <<\_ACEOF
#define HAVE_SIGINFO 1
_ACEOF
else
cat >>confdefs.h <<\_ACEOF
#define HAVE_SIGINFO 0
_ACEOF
fi
echo "$as_me:$LINENO: checking union wait" >&5
echo $ECHO_N "checking union wait... $ECHO_C" >&6
cat >conftest.$ac_ext <<_ACEOF

View File

@ -722,6 +722,24 @@ else
AC_DEFINE(HAVE_SIGSEGV,0)
fi
dnl check for siginfo
AC_MSG_CHECKING(for siginfo)
AC_CACHE_VAL(yap_siginfo,[
AC_TRY_COMPILE(
#include <signal.h>
#include <stdio.h>
,
printf("SIGINFO value is %d\n", SA_SIGINFO);
,
yap_siginfo=yes,yap_siginfo=no)])
AC_MSG_RESULT($yap_siginfo)
if test $yap_siginfo = yes
then
AC_DEFINE(HAVE_SIGINFO,1)
else
AC_DEFINE(HAVE_SIGINFO,0)
fi
dnl this is copied from the Tcl code
dnl this code checks whether the system defines an union wait
AC_MSG_CHECKING([union wait])