* stdint_.h (intmax_t, uintmax_t): Prefer long to long long if
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 2 Jul 2006 09:12:28 +0000 (09:12 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 2 Jul 2006 09:12:28 +0000 (09:12 +0000)
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.

lib/ChangeLog
lib/stdint_.h

index a2b316be7592be19beee1d6e3a92f059c0d0e18a..46b9c6c216bd85360e4cba73ccc6773dcc25a9c7 100644 (file)
@@ -1,3 +1,12 @@
+2006-07-02  Paul Eggert  <eggert@cs.ucla.edu>
+
+       * 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.  Problem reported by
+       Jim Meyering.
+
 2006-07-01  Paul Eggert  <eggert@cs.ucla.edu>
 
        * stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid
index 4e582911a264c3d2ef33b409f7cbc6bda39ab5b6..b2a53dafa9904a3b2404af707adfff7df1fbf1dc 100644 (file)
 
 #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
 
 #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