From baf520dd0eb493086c5f8ac7163267721b9e3ceb Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Sun, 2 Jul 2006 09:12:28 +0000 Subject: [PATCH] * 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. --- lib/ChangeLog | 9 +++++++++ lib/stdint_.h | 4 ++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/lib/ChangeLog b/lib/ChangeLog index a2b316be75..46b9c6c216 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-01 Paul Eggert * stdint_.h (_GL_STDINT_H): Renamed from _STDINT_H, to avoid 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 -- 2.30.2