From: Paul Eggert Date: Wed, 25 Jun 2025 02:13:20 +0000 (-0700) Subject: maint: assume long long int X-Git-Tag: v9.8~281 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=671d79a0b73a9a38ea0c267612ad34f284e3a8f1;p=thirdparty%2Fcoreutils.git maint: assume long long int It’s long been safe to assume C99+ support for long long int. * .gitignore: Remove m4/longlong.m4. * bootstrap.conf (buildreq): Boost git prereq from 1.4.4 to 1.5.5, syncing with Gnulib. (bootstrap_post_import_hook): Remove m4/longlong.m4. * m4/jm-macros.m4 (gl_CHECK_ALL_TYPES): No need to require AC_TYPE_UNSIGNED_LONG_LONG_INT. * src/factor.c (DItype, UDItype): * src/od.c (main): Assume HAVE_LONG_LONG_INT. * src/od.c: (unsigned_long_long_int): Remove. All uses replaced with unsigned long long int. --- diff --git a/.gitignore b/.gitignore index 16424edf8e..87eacf621d 100644 --- a/.gitignore +++ b/.gitignore @@ -157,7 +157,6 @@ /m4/lib-link.m4 /m4/lib-prefix.m4 /m4/lock.m4 -/m4/longlong.m4 /m4/nls.m4 /m4/po.m4 /m4/printf-posix.m4 diff --git a/bootstrap.conf b/bootstrap.conf index af7092c32e..8488038a7c 100644 --- a/bootstrap.conf +++ b/bootstrap.conf @@ -1,4 +1,4 @@ -# Bootstrap configuration. +# Bootstrap configuration. -*- sh -*- # Copyright (C) 2006-2025 Free Software Foundation, Inc. @@ -340,7 +340,7 @@ XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\ --from-code=UTF-8\\\ ' -# Append these, since we use the propername module. +# Append these, since we use the propername-lite module. see_manual='"This is a proper name. See the gettext manual, section Names."' see_manual=\'"$see_manual"\' XGETTEXT_OPTIONS=$XGETTEXT_OPTIONS'\\\ @@ -359,7 +359,7 @@ automake 1.11.2 autopoint 0.19.2 bison - gettext 0.19.2 -git 1.4.4 +git 1.5.5 gperf - gzip - m4 - @@ -385,6 +385,13 @@ bootstrap_post_import_hook () && chmod a-w $tmp-1 $tmp-2 \ && mv -f $tmp-1 $m4f && mv -f $tmp-2 $mkf) + # If "AM_GNU_GETTEXT(external" or "AM_GNU_GETTEXT([external]" appears + # in configure.ac, remove a file unnecessarily imported by autopoint. + if grep '^[ ]*AM_GNU_GETTEXT(\[*external]*[,)]' \ + configure.ac >/dev/null 2>&1; then + rm -f m4/longlong.m4 + fi + # Regenerate src/single-binary.mk (mkf=src/single-binary.mk tmp=single-binary.tmp \ && rm -f $mkf $tmp \ diff --git a/m4/jm-macros.m4 b/m4/jm-macros.m4 index c7cad56ca9..883b596773 100644 --- a/m4/jm-macros.m4 +++ b/m4/jm-macros.m4 @@ -204,7 +204,6 @@ AC_DEFUN([gl_CHECK_ALL_TYPES], AC_REQUIRE([gl_BIGENDIAN]) AC_REQUIRE([AC_C_VOLATILE]) AC_REQUIRE([AC_C_INLINE]) - AC_REQUIRE([AC_TYPE_UNSIGNED_LONG_LONG_INT]) AC_REQUIRE([gl_CHECK_ALL_HEADERS]) AC_CHECK_MEMBERS( diff --git a/src/factor.c b/src/factor.c index 792ec96c48..948bf05274 100644 --- a/src/factor.c +++ b/src/factor.c @@ -171,13 +171,8 @@ typedef unsigned int UDItype __attribute__ ((mode (DI))); typedef unsigned char UQItype; typedef long SItype; typedef unsigned long int USItype; -# if HAVE_LONG_LONG_INT typedef long long int DItype; typedef unsigned long long int UDItype; -# else /* Assume `long' gives us a wide enough type. Needed for hppa2.0w. */ -typedef long int DItype; -typedef unsigned long int UDItype; -# endif # endif # define LONGLONG_STANDALONE /* Don't require GMP's longlong.h mdep files */ diff --git a/src/od.c b/src/od.c index 439f71e5b5..c1cdd310a4 100644 --- a/src/od.c +++ b/src/od.c @@ -43,14 +43,6 @@ /* The default number of input bytes per output line. */ #define DEFAULT_BYTES_PER_BLOCK 16 -#if HAVE_UNSIGNED_LONG_LONG_INT -typedef unsigned long long int unsigned_long_long_int; -#else -/* This is just a place-holder to avoid a few '#if' directives. - In this case, the type isn't actually used. */ -typedef unsigned long int unsigned_long_long_int; -#endif - #if FLOAT16_SUPPORTED /* Available since clang 6 (2018), and gcc 7 (2017). */ typedef _Float16 float16; @@ -100,7 +92,7 @@ enum output_format CHARACTER }; -#define MAX_INTEGRAL_TYPE_SIZE sizeof (unsigned_long_long_int) +#define MAX_INTEGRAL_TYPE_SIZE sizeof (unsigned long long int) /* The maximum number of bytes needed for a format string, including the trailing nul. Each format string expects a variable amount of @@ -180,7 +172,7 @@ static const int width_bytes[] = sizeof (short int), sizeof (int), sizeof (long int), - sizeof (unsigned_long_long_int), + sizeof (unsigned long long int), #if BF16_SUPPORTED sizeof (bfloat16), #else @@ -506,7 +498,7 @@ PRINT_TYPE (print_s_short, short int) PRINT_TYPE (print_short, unsigned short int) PRINT_TYPE (print_int, unsigned int) PRINT_TYPE (print_long, unsigned long int) -PRINT_TYPE (print_long_long, unsigned_long_long_int) +PRINT_TYPE (print_long_long, unsigned long long int) PRINT_FLOATTYPE (print_bfloat, bfloat16, ftoastr, FLT_BUFSIZE_BOUND) PRINT_FLOATTYPE (print_halffloat, float16, ftoastr, FLT_BUFSIZE_BOUND) @@ -1637,11 +1629,9 @@ main (int argc, char **argv) integral_type_size[sizeof (short int)] = SHORT; integral_type_size[sizeof (int)] = INT; integral_type_size[sizeof (long int)] = LONG; -#if HAVE_UNSIGNED_LONG_LONG_INT /* If 'long int' and 'long long int' have the same size, it's fine to overwrite the entry for 'long' with this one. */ - integral_type_size[sizeof (unsigned_long_long_int)] = LONG_LONG; -#endif + integral_type_size[sizeof (unsigned long long int)] = LONG_LONG; for (idx_t i = 0; i <= MAX_FP_TYPE_SIZE; i++) fp_type_size[i] = NO_SIZE;