| 1 |
# sigaction.m4 |
| 2 |
# serial 7 |
| 3 |
dnl Copyright (C) 2008-2024 Free Software Foundation, Inc. |
| 4 |
dnl This file is free software; the Free Software Foundation |
| 5 |
dnl gives unlimited permission to copy and/or distribute it, |
| 6 |
dnl with or without modifications, as long as this notice is preserved. |
| 7 |
dnl This file is offered as-is, without any warranty. |
| 8 |
|
| 9 |
# Determine if sigaction interface is present. |
| 10 |
AC_DEFUN([gl_SIGACTION], |
| 11 |
[ |
| 12 |
AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) |
| 13 |
AC_CHECK_FUNCS_ONCE([sigaction]) |
| 14 |
if test $ac_cv_func_sigaction = yes; then |
| 15 |
AC_CHECK_MEMBERS([struct sigaction.sa_sigaction], , , |
| 16 |
[[#include <signal.h>]]) |
| 17 |
if test $ac_cv_member_struct_sigaction_sa_sigaction = no; then |
| 18 |
HAVE_STRUCT_SIGACTION_SA_SIGACTION=0 |
| 19 |
fi |
| 20 |
else |
| 21 |
HAVE_SIGACTION=0 |
| 22 |
fi |
| 23 |
]) |
| 24 |
|
| 25 |
# Prerequisites of the part of lib/signal.in.h and of lib/sigaction.c. |
| 26 |
AC_DEFUN([gl_PREREQ_SIGACTION], |
| 27 |
[ |
| 28 |
AC_REQUIRE([gl_SIGNAL_H_DEFAULTS]) |
| 29 |
AC_REQUIRE([AC_C_RESTRICT]) |
| 30 |
AC_REQUIRE([AC_TYPE_UID_T]) |
| 31 |
AC_REQUIRE([gl_PREREQ_SIG_HANDLER_H]) |
| 32 |
AC_CHECK_FUNCS_ONCE([sigaltstack siginterrupt]) |
| 33 |
AC_CHECK_TYPES([siginfo_t], [], [], [[ |
| 34 |
#include <signal.h> |
| 35 |
]]) |
| 36 |
if test $ac_cv_type_siginfo_t = no; then |
| 37 |
HAVE_SIGINFO_T=0 |
| 38 |
fi |
| 39 |
]) |
| 40 |
|
| 41 |
# Prerequisites of lib/sig-handler.h. |
| 42 |
AC_DEFUN([gl_PREREQ_SIG_HANDLER_H], [:]) |