]> granicus.if.org Git - sudo/commitdiff
Add configure check for SIG2STR_MAX, which may be missing on UnixWare.
authorTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 7 May 2015 13:34:50 +0000 (07:34 -0600)
committerTodd C. Miller <Todd.Miller@courtesan.com>
Thu, 7 May 2015 13:34:50 +0000 (07:34 -0600)
config.h.in
configure
configure.ac
include/sudo_compat.h

index e66d2b2baebd51350270e54dbf97ce6e3b4b4074..418b55461f2771c5e0bd552f84058b09e584ff91 100644 (file)
    don't. */
 #undef HAVE_DECL_SETRESUID
 
+/* Define to 1 if you have the declaration of `SIG2STR_MAX', and to 0 if you
+   don't. */
+#undef HAVE_DECL_SIG2STR_MAX
+
 /* Define to 1 if you have the declaration of `SIZE_MAX', and to 0 if you
    don't. */
 #undef HAVE_DECL_SIZE_MAX
index d3ee17e35da508bb6b529c6fac1189e3081e392d..9fb7a8902cbf46c6f1aeb39d1f95b55e82e9e009 100755 (executable)
--- a/configure
+++ b/configure
@@ -15878,7 +15878,7 @@ else
 
     # We add -Werror if it's gcc to force an error exit if the weak attribute
     # isn't understood
-    if test $GCC = yes; then :
+    if test "$GCC" = yes; then :
 
       save_CFLAGS=$CFLAGS
       CFLAGS=-Werror
@@ -15908,7 +15908,7 @@ rm -f core conftest.err conftest.$ac_objext \
     conftest$ac_exeext conftest.$ac_ext
 
     # Restore original CFLAGS
-    if test $GCC = yes; then :
+    if test "$GCC" = yes; then :
 
       CFLAGS=$save_CFLAGS
 fi
@@ -21431,6 +21431,20 @@ do :
 if test "x$ac_cv_func_sig2str" = xyes; then :
   cat >>confdefs.h <<_ACEOF
 #define HAVE_SIG2STR 1
+_ACEOF
+
+    ac_fn_c_check_decl "$LINENO" "SIG2STR_MAX" "ac_cv_have_decl_SIG2STR_MAX" "
+#      include <signal.h>
+
+"
+if test "x$ac_cv_have_decl_SIG2STR_MAX" = xyes; then :
+  ac_have_decl=1
+else
+  ac_have_decl=0
+fi
+
+cat >>confdefs.h <<_ACEOF
+#define HAVE_DECL_SIG2STR_MAX $ac_have_decl
 _ACEOF
 
 else
index 83e2488e81d7bf0bc78a9ea09119e75f3a17962f..d95ecea1c135520d31edfb798d982352e28b2e7a 100644 (file)
@@ -3134,7 +3134,10 @@ AC_INCLUDES_DEFAULT
 dnl
 dnl Check for sig2str(), sys_signame or sys_sigabbrev
 dnl
-AC_CHECK_FUNCS([sig2str], [], [
+AC_CHECK_FUNCS([sig2str], [
+    AC_CHECK_DECLS(SIG2STR_MAX, [], [], [
+#      include <signal.h>
+])], [
     AC_LIBOBJ(sig2str)
     SUDO_APPEND_COMPAT_EXP(sudo_sig2str)
     HAVE_SIGNAME="false"
index dba659634440464e31457321d9824accf52feff9..636086b2ab2fd7f4cd501725b8ceb6067a6ad92a 100644 (file)
@@ -312,7 +312,7 @@ extern int errno;
 #endif
 
 /* For sig2str() */
-#ifndef HAVE_SIG2STR
+#ifndef HAVE_DECL_SIG2STR_MAX
 # define SIG2STR_MAX 32
 #endif