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
# 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
conftest$ac_exeext conftest.$ac_ext
# Restore original CFLAGS
- if test $GCC = yes; then :
+ if test "$GCC" = yes; then :
CFLAGS=$save_CFLAGS
fi
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
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"
#endif
/* For sig2str() */
-#ifndef HAVE_SIG2STR
+#ifndef HAVE_DECL_SIG2STR_MAX
# define SIG2STR_MAX 32
#endif