From 5895949afc4e15c93ca6d15449692e3931c1ac26 Mon Sep 17 00:00:00 2001 From: Paul Eggert Date: Wed, 11 Oct 2006 05:58:47 +0000 Subject: 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. --- modules/inttypes | 1 + 1 file changed, 1 insertion(+) (limited to 'modules/inttypes') diff --git a/modules/inttypes b/modules/inttypes index 2deaeea7e6..fe2b0a7519 100644 --- a/modules/inttypes +++ b/modules/inttypes @@ -26,6 +26,7 @@ inttypes.h: inttypes_.h -e 's|@''ABSOLUTE_INTTYPES_H''@|$(ABSOLUTE_INTTYPES_H)|g' \ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ -e 's/@''HAVE_LONG_LONG_INT''@/$(HAVE_LONG_LONG_INT)/g' \ + -e 's/@''HAVE_UNSIGNED_LONG_LONG_INT''@/$(HAVE_UNSIGNED_LONG_LONG_INT)/g' \ -e 's/@''PRIPTR_PREFIX''@/$(PRIPTR_PREFIX)/g' \ -e 's/@''HAVE_DECL_IMAXABS''@/$(HAVE_DECL_IMAXABS)/g' \ -e 's/@''HAVE_DECL_IMAXDIV''@/$(HAVE_DECL_IMAXDIV)/g' \ -- cgit v1.2.1