mirror of
https://github.com/sudo-project/sudo.git
synced 2025-08-28 12:57:50 +00:00
Add configure test for NSIG, _NSIG or __NSIG.
This is better than just defining NSIG in sudo_compat.h if it is not defined since signal.h may not have been included.
This commit is contained in:
parent
49df977c2f
commit
ffb09be49d
12
config.h.in
12
config.h.in
@ -155,6 +155,10 @@
|
|||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_LLONG_MIN
|
#undef HAVE_DECL_LLONG_MIN
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of 'NSIG', and to 0 if you don't.
|
||||||
|
*/
|
||||||
|
#undef HAVE_DECL_NSIG
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of 'PATH_MAX', and to 0 if you
|
/* Define to 1 if you have the declaration of 'PATH_MAX', and to 0 if you
|
||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL_PATH_MAX
|
#undef HAVE_DECL_PATH_MAX
|
||||||
@ -231,6 +235,10 @@
|
|||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL__INNETGR
|
#undef HAVE_DECL__INNETGR
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of '_NSIG', and to 0 if you don't.
|
||||||
|
*/
|
||||||
|
#undef HAVE_DECL__NSIG
|
||||||
|
|
||||||
/* Define to 1 if you have the declaration of '_POSIX_PATH_MAX', and to 0 if
|
/* Define to 1 if you have the declaration of '_POSIX_PATH_MAX', and to 0 if
|
||||||
you don't. */
|
you don't. */
|
||||||
#undef HAVE_DECL__POSIX_PATH_MAX
|
#undef HAVE_DECL__POSIX_PATH_MAX
|
||||||
@ -243,6 +251,10 @@
|
|||||||
don't. */
|
don't. */
|
||||||
#undef HAVE_DECL__SYS_SIGNAME
|
#undef HAVE_DECL__SYS_SIGNAME
|
||||||
|
|
||||||
|
/* Define to 1 if you have the declaration of '__NSIG', and to 0 if you don't.
|
||||||
|
*/
|
||||||
|
#undef HAVE_DECL___NSIG
|
||||||
|
|
||||||
/* Define to 1 if you have the 'devname' function. */
|
/* Define to 1 if you have the 'devname' function. */
|
||||||
#undef HAVE_DEVNAME
|
#undef HAVE_DEVNAME
|
||||||
|
|
||||||
|
59
configure
vendored
59
configure
vendored
@ -27654,6 +27654,65 @@ case "$enable_zlib" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
ac_fn_check_decl "$LINENO" "NSIG" "ac_cv_have_decl_NSIG" "
|
||||||
|
$ac_includes_default
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
" "$ac_c_undeclared_builtin_options" "CFLAGS"
|
||||||
|
if test "x$ac_cv_have_decl_NSIG" = xyes
|
||||||
|
then :
|
||||||
|
ac_have_decl=1
|
||||||
|
else case e in #(
|
||||||
|
e) ac_have_decl=0 ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
printf "%s\n" "#define HAVE_DECL_NSIG $ac_have_decl" >>confdefs.h
|
||||||
|
if test $ac_have_decl = 1
|
||||||
|
then :
|
||||||
|
|
||||||
|
else case e in #(
|
||||||
|
e)
|
||||||
|
ac_fn_check_decl "$LINENO" "_NSIG" "ac_cv_have_decl__NSIG" "
|
||||||
|
$ac_includes_default
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
" "$ac_c_undeclared_builtin_options" "CFLAGS"
|
||||||
|
if test "x$ac_cv_have_decl__NSIG" = xyes
|
||||||
|
then :
|
||||||
|
ac_have_decl=1
|
||||||
|
else case e in #(
|
||||||
|
e) ac_have_decl=0 ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
printf "%s\n" "#define HAVE_DECL__NSIG $ac_have_decl" >>confdefs.h
|
||||||
|
if test $ac_have_decl = 1
|
||||||
|
then :
|
||||||
|
|
||||||
|
else case e in #(
|
||||||
|
e)
|
||||||
|
ac_fn_check_decl "$LINENO" "__NSIG" "ac_cv_have_decl___NSIG" "
|
||||||
|
$ac_includes_default
|
||||||
|
#include <signal.h>
|
||||||
|
|
||||||
|
" "$ac_c_undeclared_builtin_options" "CFLAGS"
|
||||||
|
if test "x$ac_cv_have_decl___NSIG" = xyes
|
||||||
|
then :
|
||||||
|
ac_have_decl=1
|
||||||
|
else case e in #(
|
||||||
|
e) ac_have_decl=0 ;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
printf "%s\n" "#define HAVE_DECL___NSIG $ac_have_decl" >>confdefs.h
|
||||||
|
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
;;
|
||||||
|
esac
|
||||||
|
fi
|
||||||
|
|
||||||
|
|
||||||
ac_fn_check_decl "$LINENO" "errno" "ac_cv_have_decl_errno" "
|
ac_fn_check_decl "$LINENO" "errno" "ac_cv_have_decl_errno" "
|
||||||
$ac_includes_default
|
$ac_includes_default
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
18
configure.ac
18
configure.ac
@ -3282,6 +3282,24 @@ case "$enable_zlib" in
|
|||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
|
dnl
|
||||||
|
dnl Check for NSIG, _NSIG or __NSIG declarations in signal.h
|
||||||
|
dnl
|
||||||
|
AC_CHECK_DECLS([NSIG], [], [
|
||||||
|
AC_CHECK_DECLS([_NSIG], [], [
|
||||||
|
AC_CHECK_DECLS([__NSIG], [], [], [
|
||||||
|
AC_INCLUDES_DEFAULT
|
||||||
|
#include <signal.h>
|
||||||
|
])
|
||||||
|
], [
|
||||||
|
AC_INCLUDES_DEFAULT
|
||||||
|
#include <signal.h>
|
||||||
|
])
|
||||||
|
], [
|
||||||
|
AC_INCLUDES_DEFAULT
|
||||||
|
#include <signal.h>
|
||||||
|
])
|
||||||
|
|
||||||
dnl
|
dnl
|
||||||
dnl Check for errno declaration in errno.h
|
dnl Check for errno declaration in errno.h
|
||||||
dnl
|
dnl
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
/*
|
/*
|
||||||
* SPDX-License-Identifier: ISC
|
* SPDX-License-Identifier: ISC
|
||||||
*
|
*
|
||||||
* Copyright (c) 1996, 1998-2005, 2008, 2009-2022
|
* Copyright (c) 1996, 1998-2005, 2008, 2009-2023
|
||||||
* Todd C. Miller <Todd.Miller@sudo.ws>
|
* Todd C. Miller <Todd.Miller@sudo.ws>
|
||||||
*
|
*
|
||||||
* Permission to use, copy, modify, and distribute this software for any
|
* Permission to use, copy, modify, and distribute this software for any
|
||||||
@ -205,10 +205,10 @@ extern int errno;
|
|||||||
#endif /* !HAVE_DECL_ERRNO */
|
#endif /* !HAVE_DECL_ERRNO */
|
||||||
|
|
||||||
/* Not all systems define NSIG in signal.h */
|
/* Not all systems define NSIG in signal.h */
|
||||||
#if !defined(NSIG)
|
#if !defined(HAVE_DECL_NSIG) || !HAVE_DECL_NSIG
|
||||||
# if defined(_NSIG)
|
# if defined(HAVE_DECL__NSIG) && HAVE_DECL__NSIG
|
||||||
# define NSIG _NSIG
|
# define NSIG _NSIG
|
||||||
# elif defined(__NSIG)
|
# elif defined(HAVE_DECL___NSIG) && HAVE_DECL___NSIG
|
||||||
# define NSIG __NSIG
|
# define NSIG __NSIG
|
||||||
# else
|
# else
|
||||||
# define NSIG 64
|
# define NSIG 64
|
||||||
|
Loading…
x
Reference in New Issue
Block a user