2
0
mirror of https://github.com/sudo-project/sudo.git synced 2025-08-31 06:15:37 +00:00

Fix check for SIZE_MAX, which should be in stdint.h not limits.h.

This commit is contained in:
Todd C. Miller
2015-02-02 14:36:38 -07:00
parent fd149e632e
commit bb19428fce
2 changed files with 26 additions and 17 deletions

31
configure vendored
View File

@@ -20594,20 +20594,6 @@ fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_ULLONG_MAX $ac_have_decl
_ACEOF
ac_fn_c_check_decl "$LINENO" "SIZE_MAX" "ac_cv_have_decl_SIZE_MAX" "
#include <sys/types.h>
#include <limits.h>
"
if test "x$ac_cv_have_decl_SIZE_MAX" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_SIZE_MAX $ac_have_decl
_ACEOF
ac_fn_c_check_decl "$LINENO" "PATH_MAX" "ac_cv_have_decl_PATH_MAX" "
#include <sys/types.h>
#include <limits.h>
@@ -20637,6 +20623,23 @@ cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_HOST_NAME_MAX $ac_have_decl
_ACEOF
ac_fn_c_check_decl "$LINENO" "SIZE_MAX" "ac_cv_have_decl_SIZE_MAX" "
#include <sys/types.h>
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
"
if test "x$ac_cv_have_decl_SIZE_MAX" = xyes; then :
ac_have_decl=1
else
ac_have_decl=0
fi
cat >>confdefs.h <<_ACEOF
#define HAVE_DECL_SIZE_MAX $ac_have_decl
_ACEOF
if test "$ac_cv_have_decl_LLONG_MAX" != "yes"; then
ac_fn_c_check_decl "$LINENO" "QUAD_MAX" "ac_cv_have_decl_QUAD_MAX" "
#include <sys/types.h>

View File

@@ -1,7 +1,7 @@
dnl
dnl Use the top-level autogen.sh script to generate configure and config.h.in
dnl
dnl Copyright (c) 1994-1996,1998-2014 Todd C. Miller <Todd.Miller@courtesan.com>
dnl Copyright (c) 1994-1996,1998-2015 Todd C. Miller <Todd.Miller@courtesan.com>
dnl
AC_PREREQ([2.59])
AC_INIT([sudo], [1.8.12], [http://www.sudo.ws/bugs/], [sudo])
@@ -2945,12 +2945,18 @@ AC_INCLUDES_DEFAULT
])
dnl
dnl Check for incomplete limits.h
dnl Check for incomplete limits.h and missing SIZE_MAX
dnl
AC_CHECK_DECLS([OPEN_MAX, LLONG_MAX, LLONG_MIN, ULLONG_MAX, SIZE_MAX, PATH_MAX, HOST_NAME_MAX], [], [], [
AC_CHECK_DECLS([OPEN_MAX, LLONG_MAX, LLONG_MIN, ULLONG_MAX, PATH_MAX, HOST_NAME_MAX], [], [], [
#include <sys/types.h>
#include <limits.h>
])
AC_CHECK_DECLS([SIZE_MAX], [], [], [
#include <sys/types.h>
#ifdef HAVE_INTTYPES_H
# include <inttypes.h>
#endif
])
dnl
dnl Try to find equivalents for missing types
dnl