Port to Tandem NSK OSS, which has 64-bit signed int but at most
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Oct 2006 05:58:47 +0000 (05:58 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Oct 2006 05:58:47 +0000 (05:58 +0000)
commit5895949afc4e15c93ca6d15449692e3931c1ac26
tree52c5711b448a0b64efb90798bcbee79d3c04e0f1
parentd1118c8e47bb91e422987ad0b0a065a9b2fc7a9b
Port to Tandem NSK OSS, which has 64-bit signed int but at most
32-bit unsigned int.  Problem reported by Matthew Woehlke in:
http://lists.gnu.org/archive/html/bug-coreutils/2006-10/msg00062.html
More generally, don't assume that 64-bit signed int is available
if unsigned int is, and vice versa.
* lib/inttypes_.h (_PRIu64_PREFIX, _SCNu64_PREFIX): Depend on
unsigned symbols, not on their signed counterparts.
* lib/stdint_.h (uint64_t, uint_least64_t, uint_fast64_t, uintmax_t):
(UINT64_MAX, UINT_LEAST64_MAX, UINT_FAST64_MAX, UINTMAX_MAX):
(UINT64_C, UINTMAX_C):
Likewise.
* lib/strtoimax.c (strtoll): Depend on signed symbols, not their
unsigned counterparts.
(Have_long_long, Unsigned): New macros.
(Int): Renamed from INT.
(strtoimax): Use the new macros.
* m4/stdint.m4 (gl_STDINT_H): Require AC_TYPE_UNSIGNED_LONG_LONG_INT
and substitute HAVE_UNSIGNED_LONG_LONG_INT.
* modules/inttypes (inttypes.h): Substitute
HAVE_UNSIGNED_LONG_LONG_INT.
* modules/stdint (stdint.h): Likewise.
(Files): Add m4/ulonglong.m4.
ChangeLog
lib/inttypes_.h
lib/stdint_.h
lib/strtoimax.c
m4/stdint.m4
modules/inttypes
modules/stdint