]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
byteswap: depend on stdbit-h, not stdint-h
authorPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 Mar 2026 22:31:37 +0000 (15:31 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Fri, 20 Mar 2026 22:41:37 +0000 (15:41 -0700)
* lib/byteswap.in.h: Do not include stdint.h, as stdbit.h suffices.
* modules/byteswap (Depends-on): Depend on stdbit-h, not stdint-h.

ChangeLog
lib/byteswap.in.h
lib/endian.in.h
modules/byteswap

index 7dfa750e25a3009d1c8e1d98a4596dcd29a16b52..1321e3c4f79d66a96b78e4c93fd182a08a595d53 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,9 @@
 2026-03-20  Paul Eggert  <eggert@cs.ucla.edu>
 
+       byteswap: depend on stdbit-h, not stdint-h
+       * lib/byteswap.in.h: Do not include stdint.h, as stdbit.h suffices.
+       * modules/byteswap (Depends-on): Depend on stdbit-h, not stdint-h.
+
        countof-h: use countof, part 3
        * lib/nproc.c, lib/regex_internal.h, lib/set-permissions.c:
        * lib/strftime.c:
index c7a065c8b76a0aaf5ffd206171a9fe09c6f0ed11..043105ea03a114fb8d706f70702a3382c9d8f610 100644 (file)
  #error "Please include config.h first."
 #endif
 
-/* Define this now, rather than after including stdint.h, in case
-   stdint.h recursively includes us.  This is for Gnulib endian.h.  */
+/* Define this now, rather than after including stdbit.h, in case stdbit.h
+   recursively includes us via stdint.h.  This is for Gnulib endian.h.  */
 #ifndef _GL_BYTESWAP_INLINE
 # define _GL_BYTESWAP_INLINE _GL_INLINE
 #endif
 
 #include <stdbit.h>
-#include <stdint.h>
 
 _GL_INLINE_HEADER_BEGIN
 
index 8e0c2f23840d94303501abee5877cadda4af1232..5eb603a12071403c0498fc95f0cc24f50f243e15 100644 (file)
@@ -109,7 +109,7 @@ _GL_INLINE_HEADER_BEGIN
 extern "C" {
 #endif
 
-/* These declarations are needed if Gnulib byteswap.h -> stdint.h ->
+/* These declarations are needed if Gnulib byteswap.h -> stdbit.h -> stdint.h ->
    sys/types.h -> endian.h -> Gnulib byteswap.h, the last of which is blocked
    by its include guard so the functions are not yet declared.  */
 #ifdef _GL_BYTESWAP_INLINE
index 1ce430f98352e2c8f577a457c541d30653bf41b2..85c7865ede8a78820bedc65122d51d50b72bdcb4 100644 (file)
@@ -9,7 +9,7 @@ m4/byteswap.m4
 Depends-on:
 gen-header
 extern-inline           [$GL_GENERATE_BYTESWAP_H]
-stdint-h                [$GL_GENERATE_BYTESWAP_H]
+stdbit-h                [$GL_GENERATE_BYTESWAP_H]
 stdc_memreverse8u       [$GL_GENERATE_BYTESWAP_H]
 
 configure.ac: