From: Paul Eggert Date: Sun, 2 Jul 2006 09:15:08 +0000 (+0000) Subject: (intmax_t, uintmax_t): Prefer long to long long if X-Git-Tag: v6.0~231 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=001f33d47839ef8f6741726d12b530afea5d79f2;p=thirdparty%2Fcoreutils.git (intmax_t, uintmax_t): Prefer long to long long if both are 64 bits. --- diff --git a/lib/ChangeLog b/lib/ChangeLog index 94551cf8c7..1ce4084af5 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,3 +1,12 @@ +2006-07-02 Paul Eggert + + * 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-02 Paul Eggert * Makefile.am (stdint.h): Sync from gnulib. diff --git a/lib/stdint_.h b/lib/stdint_.h index 4e582911a2..b2a53dafa9 100644 --- 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