diff options
author | Paul Eggert <eggert@cs.ucla.edu> | 2006-07-02 09:15:08 +0000 |
---|---|---|
committer | Paul Eggert <eggert@cs.ucla.edu> | 2006-07-02 09:15:08 +0000 |
commit | 001f33d47839ef8f6741726d12b530afea5d79f2 (patch) | |
tree | 6f10d07a9cb86913eeb01905f213ba4b3cb39a1c /lib | |
parent | 2789dcc1b9b0a377a6368c5ee3e4432e43d8bb16 (diff) | |
download | coreutils-001f33d47839ef8f6741726d12b530afea5d79f2.tar.xz |
(intmax_t, uintmax_t): Prefer long to long long if
both are 64 bits.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/ChangeLog | 9 | ||||
-rw-r--r-- | lib/stdint_.h | 4 |
2 files changed, 11 insertions, 2 deletions
diff --git a/lib/ChangeLog b/lib/ChangeLog index 94551cf8c..1ce4084af 100644 --- a/lib/ChangeLog +++ b/lib/ChangeLog @@ -1,5 +1,14 @@ 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-02 Paul Eggert <eggert@cs.ucla.edu> + * Makefile.am (stdint.h): Sync from gnulib. * stdint_.h: Sync from gnulib. diff --git a/lib/stdint_.h b/lib/stdint_.h index 4e582911a..b2a53dafa 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 |