]> git.ipfire.org Git - thirdparty/coreutils.git/commitdiff
maint: assume long long int
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 25 Jun 2025 02:13:20 +0000 (19:13 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 29 Jun 2025 04:00:41 +0000 (21:00 -0700)
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.

.gitignore
bootstrap.conf
m4/jm-macros.m4
src/factor.c
src/od.c

index 16424edf8e5a3d77458673a98a2b22a17b891a7a..87eacf621d52dc5cf6198bdf26eddded6afda714 100644 (file)
 /m4/lib-link.m4
 /m4/lib-prefix.m4
 /m4/lock.m4
-/m4/longlong.m4
 /m4/nls.m4
 /m4/po.m4
 /m4/printf-posix.m4
index af7092c32eb9bd3110e99ab73d3cc2b58324568c..8488038a7cc0026865d7c1f9cbc3971d4069b690 100644 (file)
@@ -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 \
index c7cad56ca9cd7e84f9664fbf59abf2af42b6f0b1..883b596773a173d60f54662b471e27310c2ed7de 100644 (file)
@@ -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(
index 792ec96c4834cbde03deceb407fb32f93fabc133..948bf052748d3bd47ca258b19dddda25a94f0688 100644 (file)
@@ -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 */
 
index 439f71e5b50a3f71706d8f35c9ff895ee70c4164..c1cdd310a49cc81c86c855c41f8e7fab2e24ea1e 100644 (file)
--- a/src/od.c
+++ b/src/od.c
 /* 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;