diff lib/stdint_.h @ 6908:e01e090171d5

* stdint_.h (intmax_t, uintmax_t): Prefer long to long long if both are 64 bits, since this seems to be the tradition, and this prevents gcc -Wformat from warning about usages with PRIuMAX. If we ever run into a host that prefers long long to long in this case, we'll need another configure-time test.
author Paul Eggert <eggert@cs.ucla.edu>
date Sun, 02 Jul 2006 09:12:28 +0000
parents b912515df187
children ca3b46b1eab7
line wrap: on
line diff
--- a/lib/stdint_.h
+++ b/lib/stdint_.h
@@ -208,7 +208,7 @@
 
 #undef intmax_t
 #undef uintmax_t
-#if @HAVE_LONG_LONG_INT@
+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
 # define intmax_t long long int
 # define uintmax_t unsigned long long int
 #elif defined int64_t
@@ -434,7 +434,7 @@
 
 #undef INTMAX_C
 #undef UINTMAX_C
-#if @HAVE_LONG_LONG_INT@
+#if @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1
 # define INTMAX_C(x)   x##LL
 # define UINTMAX_C(x)  x##ULL
 #elif defined int64_t