From: Dmitry V. Levin <ldv@altlinux.org> Date: Sat, 8 Feb 2014 00:15:52 +0000 (+0000) Subject: Check for SA_RESTORER definition in <asm/signal.h> X-Git-Tag: v4.9~121 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=ab3953b0476a9502c9cd1c59317fa2e98ae301fc;p=strace Check for SA_RESTORER definition in <asm/signal.h> Kernel header <asm/signal.h> cannot be included from regular code because it conflicts with libc headers, but SA_RESTORER is needed in signal.c, so SA_RESTORER value is forwarded from <asm/signal.h> to config.h using a configure check. * configure.ac (ASM_SA_RESTORER): Define if SA_RESTORER is defined in <asm/signal.h>. --- diff --git a/configure.ac b/configure.ac index be28ebee..9b65d4b4 100644 --- a/configure.ac +++ b/configure.ac @@ -296,6 +296,16 @@ AC_CHECK_SIZEOF([long]) AC_CHECK_SIZEOF([long long]) AC_CHECK_SIZEOF([rlim_t],,[#include <sys/resource.h>]) +AC_CACHE_CHECK([for SA_RESTORER], [st_cv_sa_restorer], + [st_cv_sa_restorer="$(echo SA_RESTORER | + $CPP $CPPFLAGS -P -imacros asm/signal.h - | + grep ^0x)" + test -n "$st_cv_sa_restorer" || st_cv_sa_restorer=no]) +if test "x$st_cv_sa_restorer" != xno; then + AC_DEFINE_UNQUOTED([ASM_SA_RESTORER], [$st_cv_sa_restorer], + [SA_RESTORER defined in <asm/signal.h>]) +fi + AC_PATH_PROG([PERL], [perl]) AC_CONFIG_FILES([Makefile tests/Makefile])