summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDmitry V. Levin <ldv@altlinux.org>2014-02-08 00:15:52 +0000
committerDmitry V. Levin <ldv@altlinux.org>2014-02-08 00:49:50 +0000
commitab3953b0476a9502c9cd1c59317fa2e98ae301fc (patch)
tree2a5de17230f86a4410cd69544e6ec5c3eeaa5f8d
parentad138ccb80377bca8fc0a097baaeb3507e817ad9 (diff)
downloadstrace-ab3953b0476a9502c9cd1c59317fa2e98ae301fc.tar.gz
strace-ab3953b0476a9502c9cd1c59317fa2e98ae301fc.tar.bz2
strace-ab3953b0476a9502c9cd1c59317fa2e98ae301fc.tar.xz
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>.
-rw-r--r--configure.ac10
1 files changed, 10 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index be28ebe..9b65d4b 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])