]> granicus.if.org Git - strace/commitdiff
Check for SA_RESTORER definition in <asm/signal.h>
authorDmitry V. Levin <ldv@altlinux.org>
Sat, 8 Feb 2014 00:15:52 +0000 (00:15 +0000)
committerDmitry V. Levin <ldv@altlinux.org>
Sat, 8 Feb 2014 00:49:50 +0000 (00:49 +0000)
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>.

configure.ac

index be28ebee88aa0decb7694255d9f3774bdf714003..9b65d4b43d1d7f6a5b674d99229bd4cdec25713e 100644 (file)
@@ -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])