Better test for working long long support. Ultrix compiler supports

basic long long but not all operations on them.
This commit is contained in:
Todd C. Miller
1999-08-22 11:22:06 +00:00
parent b13e8006ec
commit 084b426b3b
2 changed files with 4 additions and 5 deletions

5
aclocal.m4 vendored
View File

@@ -326,10 +326,9 @@ fi
dnl
dnl check for "long long"
dnl XXX cache
dnl XXX hard to cache since it includes 2 tests
dnl
AC_DEFUN(SUDO_LONG_LONG, [AC_MSG_CHECKING(for long long support)
AC_TRY_COMPILE(, [long long foo; foo = 1;], AC_DEFINE(HAVE_LONG_LONG)
AC_TRY_LINK(, [long long foo = 1000; foo /= 10;], AC_DEFINE(HAVE_LONG_LONG)
[AC_TRY_RUN([main() {if (sizeof(long long) == sizeof(long)) exit(0); else exit(1);}], AC_DEFINE(LONG_IS_QUAD))]
AC_MSG_RESULT(yes), AC_MSG_RESULT(no))])

4
configure vendored
View File

@@ -5356,10 +5356,10 @@ cat > conftest.$ac_ext <<EOF
#include "confdefs.h"
int main() {
long long foo; foo = 1;
long long foo = 1000; foo /= 10;
; return 0; }
EOF
if { (eval echo configure:5363: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
if { (eval echo configure:5363: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest; then
rm -rf conftest*
cat >> confdefs.h <<\EOF
#define HAVE_LONG_LONG 1