]> git.ipfire.org Git - thirdparty/libarchive.git/commitdiff
Explicitly test for sigaction() rather than
authorTim Kientzle <kientzle@gmail.com>
Sat, 12 Dec 2009 20:56:08 +0000 (15:56 -0500)
committerTim Kientzle <kientzle@gmail.com>
Sat, 12 Dec 2009 20:56:08 +0000 (15:56 -0500)
treating the existence of SIGINFO and SIGUSR1 as sufficient
evidence of sigaction() support.

SVN-Revision: 1726

CMakeLists.txt
configure.ac
tar/bsdtar.c

index 92d65f72b0b4d0eb20b054700dab977a39f6a03a..8cc6dbede832bb65864ec4493eec9852fbd64612 100644 (file)
@@ -394,6 +394,7 @@ CHECK_FUNCTION_EXISTS_GLIBC(readlink HAVE_READLINK)
 CHECK_FUNCTION_EXISTS_GLIBC(select HAVE_SELECT)
 CHECK_FUNCTION_EXISTS_GLIBC(setenv HAVE_SETENV)
 CHECK_FUNCTION_EXISTS_GLIBC(setlocale HAVE_SETLOCALE)
+CHECK_FUNCTION_EXISTS_GLIBC(sigaction HAVE_SIGACTION)
 CHECK_FUNCTION_EXISTS_GLIBC(strchr HAVE_STRCHR)
 CHECK_FUNCTION_EXISTS_GLIBC(strdup HAVE_STRDUP)
 CHECK_FUNCTION_EXISTS_GLIBC(strerror HAVE_STRERROR)
index f58473fd6d5301ef7b3f96ab3ac1520c34272587..fb624a86520acd75f1cb34b4d0bf1fb1d8279eb8 100644 (file)
@@ -303,9 +303,12 @@ if test "x$with_openssl" != "xno"; then
       # the C code tests these macros we preserve previous behavior
       # for the autotools build by hard-coding availability.
       if test "$ac_cv_header_openssl_sha_h" = "yes"; then
-        AC_DEFINE(HAVE_OPENSSL_SHA256_INIT, 1, [Define to 1 if your openssl has the `SHA256_Init' function.])
-        AC_DEFINE(HAVE_OPENSSL_SHA384_INIT, 1, [Define to 1 if your openssl has the `SHA384_Init' function.])
-        AC_DEFINE(HAVE_OPENSSL_SHA512_INIT, 1, [Define to 1 if your openssl has the `SHA512_Init' function.])
+        AC_DEFINE(HAVE_OPENSSL_SHA256_INIT, 1,
+         [Define to 1 if your openssl has the `SHA256_Init' function.])
+        AC_DEFINE(HAVE_OPENSSL_SHA384_INIT, 1,
+         [Define to 1 if your openssl has the `SHA384_Init' function.])
+        AC_DEFINE(HAVE_OPENSSL_SHA512_INIT, 1,
+         [Define to 1 if your openssl has the `SHA512_Init' function.])
       fi
     fi
   fi
@@ -395,7 +398,8 @@ AC_CHECK_FUNCS([fchdir fchflags fchmod fchown fcntl fork])
 AC_CHECK_FUNCS([fstat ftruncate futimens futimes geteuid getpid])
 AC_CHECK_FUNCS([lchflags lchmod lchown link lstat])
 AC_CHECK_FUNCS([lutimes memmove memset mkdir mkfifo mknod])
-AC_CHECK_FUNCS([nl_langinfo pipe poll readlink select setenv setlocale])
+AC_CHECK_FUNCS([nl_langinfo pipe poll readlink])
+AC_CHECK_FUNCS([select setenv setlocale sigaction])
 AC_CHECK_FUNCS([strchr strdup strerror strncpy_s strrchr symlink timegm])
 AC_CHECK_FUNCS([tzset unsetenv utime utimensat utimes vfork])
 AC_CHECK_FUNCS([wcrtomb wcscpy wcslen wctomb wmemcmp wmemcpy])
index 69804b81d51c53f1e62fc50a81e48b98ae4ec41d..9c5cf5b3ce25488f7d2338e3da0ed2139487813d 100644 (file)
@@ -87,7 +87,7 @@ __FBSDID("$FreeBSD: src/usr.bin/tar/bsdtar.c,v 1.93 2008/11/08 04:43:24 kientzle
 
 static struct bsdtar *_bsdtar;
 
-#if defined(SIGINFO) || defined(SIGUSR1)
+#if defined(HAVE_SIGACTION) && (defined(SIGINFO) || defined(SIGUSR1))
 static volatile int siginfo_occurred;
 
 static void
@@ -145,7 +145,7 @@ main(int argc, char **argv)
        bsdtar->fd = -1; /* Mark as "unused" */
        option_o = 0;
 
-#if defined(SIGINFO) || defined(SIGUSR1)
+#if defined(HAVE_SIGACTION) && (defined(SIGINFO) || defined(SIGUSR1))
        { /* Catch SIGINFO and SIGUSR1, if they exist. */
                struct sigaction sa;
                sa.sa_handler = siginfo_handler;