From: Todd C. Miller Date: Mon, 2 Feb 2015 22:36:12 +0000 (-0700) Subject: We need to add OSDEFS to CFLAGS to expose LLONG_MAX et al on glibc X-Git-Tag: SUDO_1_8_12^2~29 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=109a866fb5cff266762d64102adf29aa09a06de8;p=sudo We need to add OSDEFS to CFLAGS to expose LLONG_MAX et al on glibc when not explicitly asking for c99. --- diff --git a/configure b/configure index a4d033e27..c8e8e419b 100755 --- a/configure +++ b/configure @@ -20538,6 +20538,8 @@ cat >>confdefs.h <<_ACEOF _ACEOF +_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $OSDEFS" ac_fn_c_check_decl "$LINENO" "OPEN_MAX" "ac_cv_have_decl_OPEN_MAX" " #include #include @@ -20640,6 +20642,7 @@ cat >>confdefs.h <<_ACEOF #define HAVE_DECL_SIZE_MAX $ac_have_decl _ACEOF +CFLAGS="$_CFLAGS" 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 diff --git a/configure.ac b/configure.ac index 4d19b2bec..90a72c47e 100644 --- a/configure.ac +++ b/configure.ac @@ -2946,7 +2946,10 @@ AC_INCLUDES_DEFAULT dnl dnl Check for incomplete limits.h and missing SIZE_MAX +dnl We need to add OSDEFS to CFLAGS to expose LLONG_MAX et al on glibc. dnl +_CFLAGS="$CFLAGS" +CFLAGS="$CFLAGS $OSDEFS" AC_CHECK_DECLS([OPEN_MAX, LLONG_MAX, LLONG_MIN, ULLONG_MAX, PATH_MAX, HOST_NAME_MAX], [], [], [ #include #include @@ -2957,6 +2960,7 @@ AC_CHECK_DECLS([SIZE_MAX], [], [], [ # include #endif ]) +CFLAGS="$_CFLAGS" dnl dnl Try to find equivalents for missing types dnl