From d1580ff592263fea8e6e353ba8aca16f4a5cc0d7 Mon Sep 17 00:00:00 2001 From: "Todd C. Miller" Date: Tue, 16 Apr 2013 14:36:42 -0400 Subject: [PATCH] Error out in configure if the compiler doesn't support "long long". --- INSTALL | 6 +++--- configure | 3 +++ configure.in | 3 +++ 3 files changed, 9 insertions(+), 3 deletions(-) diff --git a/INSTALL b/INSTALL index 297a9340b..aca0690ae 100644 --- a/INSTALL +++ b/INSTALL @@ -11,9 +11,9 @@ System requirements =================== To build sudo from the source distribution you need a POSIX-compliant -operating system (any modern version of BSD, Linux or Unix should -work), an ANSI/ISO C compiler that supports variadic macros (a C99 -feature) as well as the ar, make and ranlib utilities. +operating system (any modern version of BSD, Linux or Unix should work), +an ANSI/ISO C compiler that supports the "long long" type, variadic +macros (a C99 feature) as well as the ar, make and ranlib utilities. If you wish to modify the parser then you will need flex version 2.5.2 or later and either bison or byacc (sudo comes with a diff --git a/configure b/configure index 9559831d1..139e045b9 100755 --- a/configure +++ b/configure @@ -16183,6 +16183,9 @@ $as_echo "#define HAVE_LONG_LONG_INT 1" >>confdefs.h fi +if test X"$ac_cv_type_long_long_int" != X"yes"; then + as_fn_error $? "\"C compiler does not appear have required long long support\"" "$LINENO" 5 +fi # The cast to long int works around a bug in the HP C Compiler # version HP92453-01 B.11.11.23709.GP, which incorrectly rejects # declarations like `int a3[[(sizeof (unsigned char)) >= 0]];'. diff --git a/configure.in b/configure.in index d7c79d7b8..7cab1b1fb 100644 --- a/configure.in +++ b/configure.in @@ -2165,6 +2165,9 @@ AC_CHECK_TYPES([struct timespec], [], [], [#include AC_CHECK_TYPES([struct in6_addr], [], [], [#include #include ]) AC_TYPE_LONG_LONG_INT +if test X"$ac_cv_type_long_long_int" != X"yes"; then + AC_MSG_ERROR(["C compiler does not appear have required long long support"]) +fi AC_CHECK_SIZEOF([long int]) AC_CHECK_TYPE(size_t, unsigned int) AC_CHECK_TYPE(ssize_t, int)