>From 818ca1bcefc49a5c10a5b061431ee346cc00984a Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Sun, 22 Dec 2019 10:12:54 +0100 Subject: [PATCH 13/15] inttypes-incomplete: Assume that the compiler supports 'long long'. * lib/inttypes.in.h (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, _SCNu64_PREFIX): Assume HAVE_LONG_LONG_INT and HAVE_UNSIGNED_LONG_LONG_INT to be 1. * m4/inttypes.m4 (gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION): Assume HAVE_LONG_LONG_INT to be 1. * modules/inttypes-incomplete (Makefile.am): Don't substitute HAVE_LONG_LONG_INT, HAVE_UNSIGNED_LONG_LONG_INT. --- ChangeLog | 9 +++++++++ lib/inttypes.in.h | 8 ++++---- m4/inttypes.m4 | 6 ++---- modules/inttypes-incomplete | 2 -- 4 files changed, 15 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 40560e6..60d4c6b 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,14 @@ 2019-12-22 Bruno Haible + inttypes-incomplete: Assume that the compiler supports 'long long'. + * lib/inttypes.in.h (_PRI64_PREFIX, _PRIu64_PREFIX, _SCN64_PREFIX, + _SCNu64_PREFIX): Assume HAVE_LONG_LONG_INT and + HAVE_UNSIGNED_LONG_LONG_INT to be 1. + * m4/inttypes.m4 (gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION): Assume + HAVE_LONG_LONG_INT to be 1. + * modules/inttypes-incomplete (Makefile.am): Don't substitute + HAVE_LONG_LONG_INT, HAVE_UNSIGNED_LONG_LONG_INT. + malloca: Assume that the compiler supports 'long long'. * lib/malloca.h: Assume HAVE_LONG_LONG_INT to be 1. * m4/malloca.m4 (gl_MALLOCA): Don't require AC_TYPE_LONG_LONG_INT. diff --git a/lib/inttypes.in.h b/lib/inttypes.in.h index 49bcbc1..1dcd440 100644 --- a/lib/inttypes.in.h +++ b/lib/inttypes.in.h @@ -189,7 +189,7 @@ # define _PRI64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _PRI64_PREFIX "I64" -# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +# elif LONG_MAX >> 30 == 1 # define _PRI64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined PRId64 || @PRI_MACROS_BROKEN@ @@ -206,7 +206,7 @@ # define _PRIu64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _PRIu64_PREFIX "I64" -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# elif ULONG_MAX >> 31 == 1 # define _PRIu64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined PRIo64 || @PRI_MACROS_BROKEN@ @@ -682,7 +682,7 @@ # define _SCN64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _SCN64_PREFIX "I64" -# elif @HAVE_LONG_LONG_INT@ && LONG_MAX >> 30 == 1 +# elif LONG_MAX >> 30 == 1 # define _SCN64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined SCNd64 || @PRI_MACROS_BROKEN@ @@ -699,7 +699,7 @@ # define _SCNu64_PREFIX "l" # elif defined _MSC_VER || defined __MINGW32__ # define _SCNu64_PREFIX "I64" -# elif @HAVE_UNSIGNED_LONG_LONG_INT@ && ULONG_MAX >> 31 == 1 +# elif ULONG_MAX >> 31 == 1 # define _SCNu64_PREFIX _LONG_LONG_FORMAT_PREFIX # endif # if !defined SCNo64 || @PRI_MACROS_BROKEN@ diff --git a/m4/inttypes.m4 b/m4/inttypes.m4 index c58a1be..0199e01 100644 --- a/m4/inttypes.m4 +++ b/m4/inttypes.m4 @@ -1,4 +1,4 @@ -# inttypes.m4 serial 27 +# inttypes.m4 serial 28 dnl Copyright (C) 2006-2019 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -113,10 +113,8 @@ AC_DEFUN([gl_INTTYPES_CHECK_LONG_LONG_INT_CONDITION], #if $2 #define CONDITION ($3) - #elif HAVE_LONG_LONG_INT - #define CONDITION ($4) #else - #define CONDITION 0 + #define CONDITION ($4) #endif int test[CONDITION ? 1 : -1];]])], [gl_cv_test_$1=yes], diff --git a/modules/inttypes-incomplete b/modules/inttypes-incomplete index 394d48f..1b3f6f6 100644 --- a/modules/inttypes-incomplete +++ b/modules/inttypes-incomplete @@ -31,8 +31,6 @@ inttypes.h: inttypes.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_U -e 's|@''NEXT_INTTYPES_H''@|$(NEXT_INTTYPES_H)|g' \ -e 's/@''PRI_MACROS_BROKEN''@/$(PRI_MACROS_BROKEN)/g' \ -e 's/@''APPLE_UNIVERSAL_BUILD''@/$(APPLE_UNIVERSAL_BUILD)/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/@''GNULIB_IMAXABS''@/$(GNULIB_IMAXABS)/g' \ -e 's/@''GNULIB_IMAXDIV''@/$(GNULIB_IMAXDIV)/g' \ -- 2.7.4