+2006-07-02 Paul Eggert <eggert@cs.ucla.edu>
+
+ * lib/autoconf/types.m4 (AC_TYPE_LONG_LONG_INT):
+ Require that long long int be at least 64 bits wide. C99 requires
+ this and enough programs depend on it so we should check for it.
+ Bruno Haible reports in
+ <http://lists.gnu.org/archive/html/bug-gnulib/2006-06/msg00286.html>
+ that long long int is 32 bits wide with some nonstandard compilers.
+ (AC_TYPE_UNSIGNED_LONG_LONG_INT): Likewise.
+
2006-06-30 Paul Eggert <eggert@cs.ucla.edu>
* tests/torture.at (Configuring subdirectories): Set CONFIG_SITE
AC_CACHE_CHECK([for long long int], [ac_cv_type_long_long_int],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
- [long long int ll = 1LL; int i = 63;],
- [long long int llmax = (long long int) -1;
- return ll << i | ll >> i | llmax / ll | llmax % ll;])],
+ [[long long int ll = 9223372036854775807ll;
+ long long int nll = -9223372036854775807LL;
+ typedef int a[((-9223372036854775807LL < 0
+ && 0 < 9223372036854775807ll)
+ ? 1 : -1)];
+ int i = 63;]],
+ [[long long int llmax = 9223372036854775807ll;
+ return (ll << 63 | ll >> 63 | ll < i | ll > i
+ | llmax / ll | llmax % ll);]])],
[ac_cv_type_long_long_int=yes],
[ac_cv_type_long_long_int=no])])
if test $ac_cv_type_long_long_int = yes; then
[ac_cv_type_unsigned_long_long_int],
[AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
- [unsigned long long int ull = 1ULL; int i = 63;],
- [unsigned long long int ullmax = (unsigned long long int) -1;
- return ull << i | ull >> i | ullmax / ull | ullmax % ull;])],
+ [[unsigned long long int ull = 18446744073709551615ULL;
+ typedef int a[(18446744073709551615ULL <= (unsigned long long int) -1
+ ? 1 : -1)];
+ int i = 63;]],
+ [[unsigned long long int ullmax = 18446744073709551615ull;
+ return (ull << 63 | ull >> 63 | ull << i | ull >> i
+ | ullmax / ull | ullmax % ull);]])],
[ac_cv_type_unsigned_long_long_int=yes],
[ac_cv_type_unsigned_long_long_int=no])])
if test $ac_cv_type_unsigned_long_long_int = yes; then