* 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 | 4 ++++ lib/byteswap.in.h | 5 ++--- lib/endian.in.h | 2 +- modules/byteswap | 2 +- 4 files changed, 8 insertions(+), 5 deletions(-)
diff --git a/ChangeLog b/ChangeLog index 7dfa750e25..1321e3c4f7 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ 2026-03-20 Paul Eggert <[email protected]> + 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: diff --git a/lib/byteswap.in.h b/lib/byteswap.in.h index c7a065c8b7..043105ea03 100644 --- a/lib/byteswap.in.h +++ b/lib/byteswap.in.h @@ -23,14 +23,13 @@ #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 diff --git a/lib/endian.in.h b/lib/endian.in.h index 8e0c2f2384..5eb603a120 100644 --- a/lib/endian.in.h +++ b/lib/endian.in.h @@ -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 diff --git a/modules/byteswap b/modules/byteswap index 1ce430f983..85c7865ede 100644 --- a/modules/byteswap +++ b/modules/byteswap @@ -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: -- 2.53.0
