]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
stdc_load8: New module.
authorBruno Haible <bruno@clisp.org>
Thu, 12 Mar 2026 19:37:13 +0000 (20:37 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 12 Mar 2026 19:37:13 +0000 (20:37 +0100)
* lib/stdbit.in.h (_GL_STDC_LOAD8_INLINE): New macro.
(stdc_load8_beu{8,16,32,64}, stdc_load8_leu{8,16,32,64},
stdc_load8_bes{8,16,32,64}, stdc_load8_les{8,16,32,64}): New functions.
* lib/stdc_load8.c: New file.
* m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STDC_LOAD8.
* modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_LOAD8.
* modules/stdc_load8: New file.
* doc/posix-functions/stdc_load8_beu8.texi: Mention the new module.
* doc/posix-functions/stdc_load8_beu16.texi: Likewise.
* doc/posix-functions/stdc_load8_beu32.texi: Likewise.
* doc/posix-functions/stdc_load8_beu64.texi: Likewise.
* doc/posix-functions/stdc_load8_leu8.texi: Likewise.
* doc/posix-functions/stdc_load8_leu16.texi: Likewise.
* doc/posix-functions/stdc_load8_leu32.texi: Likewise.
* doc/posix-functions/stdc_load8_leu64.texi: Likewise.
* doc/posix-functions/stdc_load8_bes8.texi: Likewise.
* doc/posix-functions/stdc_load8_bes16.texi: Likewise.
* doc/posix-functions/stdc_load8_bes32.texi: Likewise.
* doc/posix-functions/stdc_load8_bes64.texi: Likewise.
* doc/posix-functions/stdc_load8_les8.texi: Likewise.
* doc/posix-functions/stdc_load8_les16.texi: Likewise.
* doc/posix-functions/stdc_load8_les32.texi: Likewise.
* doc/posix-functions/stdc_load8_les64.texi: Likewise.

22 files changed:
ChangeLog
doc/posix-functions/stdc_load8_bes16.texi
doc/posix-functions/stdc_load8_bes32.texi
doc/posix-functions/stdc_load8_bes64.texi
doc/posix-functions/stdc_load8_bes8.texi
doc/posix-functions/stdc_load8_beu16.texi
doc/posix-functions/stdc_load8_beu32.texi
doc/posix-functions/stdc_load8_beu64.texi
doc/posix-functions/stdc_load8_beu8.texi
doc/posix-functions/stdc_load8_les16.texi
doc/posix-functions/stdc_load8_les32.texi
doc/posix-functions/stdc_load8_les64.texi
doc/posix-functions/stdc_load8_les8.texi
doc/posix-functions/stdc_load8_leu16.texi
doc/posix-functions/stdc_load8_leu32.texi
doc/posix-functions/stdc_load8_leu64.texi
doc/posix-functions/stdc_load8_leu8.texi
lib/stdbit.in.h
lib/stdc_load8.c [new file with mode: 0644]
m4/stdbit_h.m4
modules/stdbit-h
modules/stdc_load8 [new file with mode: 0644]

index 603cf779ca10f126008341f611d35f7acf303769..8bb1cdfdc42d9026cf63496de2db1fe2c3391603 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,31 @@
+2026-03-12  Bruno Haible  <bruno@clisp.org>
+
+       stdc_load8: New module.
+       * lib/stdbit.in.h (_GL_STDC_LOAD8_INLINE): New macro.
+       (stdc_load8_beu{8,16,32,64}, stdc_load8_leu{8,16,32,64},
+       stdc_load8_bes{8,16,32,64}, stdc_load8_les{8,16,32,64}): New functions.
+       * lib/stdc_load8.c: New file.
+       * m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
+       GNULIB_STDC_LOAD8.
+       * modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_LOAD8.
+       * modules/stdc_load8: New file.
+       * doc/posix-functions/stdc_load8_beu8.texi: Mention the new module.
+       * doc/posix-functions/stdc_load8_beu16.texi: Likewise.
+       * doc/posix-functions/stdc_load8_beu32.texi: Likewise.
+       * doc/posix-functions/stdc_load8_beu64.texi: Likewise.
+       * doc/posix-functions/stdc_load8_leu8.texi: Likewise.
+       * doc/posix-functions/stdc_load8_leu16.texi: Likewise.
+       * doc/posix-functions/stdc_load8_leu32.texi: Likewise.
+       * doc/posix-functions/stdc_load8_leu64.texi: Likewise.
+       * doc/posix-functions/stdc_load8_bes8.texi: Likewise.
+       * doc/posix-functions/stdc_load8_bes16.texi: Likewise.
+       * doc/posix-functions/stdc_load8_bes32.texi: Likewise.
+       * doc/posix-functions/stdc_load8_bes64.texi: Likewise.
+       * doc/posix-functions/stdc_load8_les8.texi: Likewise.
+       * doc/posix-functions/stdc_load8_les16.texi: Likewise.
+       * doc/posix-functions/stdc_load8_les32.texi: Likewise.
+       * doc/posix-functions/stdc_load8_les64.texi: Likewise.
+
 2026-03-12  Bruno Haible  <bruno@clisp.org>
 
        stdc_load8_aligned: Add tests.
index 8f94a58ac153606cc18dde5131fe8cb27ff2590c..9801f5970211a15742e213025b671d8fdb202256 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index 37ee0e72c183764eb3ff6bec59cb5000a3ce58a8..c86c1b307e9f5a4bd07963a589062ff32186420a 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index a4dd1896c2c573d5d2bfa995e61a474876149dc4..716d609864d8f8fa4de21e49238ce80686f2d746 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index 24cd7ec15968fe317abebc41479f7a44df70518e..a84185ea8dc0144e44248c76175726dadb05c9c4 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index d2f844e3a56933c43743ff05dee3d61b9148e69c..b3eb5e020f1387de00edbdc0abcb800016118796 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index 7c50db4c835aa2353cf54216b34e179d014f13e0..c853598acf65a6838a767f3f517368e709c43334 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index a63a60ec82ea2c77b5710f18a91fddeed95c21ef..980191b98f176793cf8b4e7ad7d8157e879f4d90 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index 20fc1a1ceb44cd108734fe1a1f875f772b9e6a52..a7d0a5741b26336acb74c2f773286fbe725dd5dc 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index 872bfa74fea27102d2d3013d19e1e60d78b04f6b..3d83af346878deb97735e4d9575c4ba15b228d72 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index 31fa9307caf4da1c907995edfd2f2aee3276a21e..4bdd94862425d470d2c591b7490a7433fec3575d 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index 0e8bca6511469278bb3050bc4c06cc2890eaa54a..186ac64f9702d89d4f956b7e54db85c046c70a21 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index 461395ea7300449049ea7bf522610ee986aee214..c8cb49bd7520afba0a45a0b4f0e8309874bb1292 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index 563da34f3cf95ff41ab6f0d2a8919068f5f240d1..7efaf5108bb449d7ba62b145c4e52cbfe5c8600f 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index 9f273bd41bf14eaf5359bed623ed66ebe7c2dbc6..58d0759891a27a9210f289c696c9632de95b902b 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index b91a2dc20cd7343c19f4eb7f4daca206543818df..0b5ce4efd645dffc035cffe26331405f2f4abc56 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index b2c62b51593db9de5aa8e3079e9ff271dce7f7d5..1f8b41b339d23d4295cb481cd9e6b8b1a010a613 100644 (file)
@@ -7,15 +7,16 @@ ISO C2y (draft
 @url{https://www.open-std.org/jtc1/sc22/wg14/www/docs/n3783.pdf})
 section 7.18.21.
 
-Gnulib module: ---
+Gnulib module: stdc_load8
+@mindex stdc_load8
 
 Portability problems fixed by Gnulib:
 @itemize
+@item
+This function is missing on many platforms:
+glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
 
 Portability problems not fixed by Gnulib:
 @itemize
-@item
-This function is missing on many platforms:
-glibc 2.43, macOS 26, FreeBSD 15.0, NetBSD 10.0, OpenBSD 7.8, AIX 7.3.1, HP-UX 11.31, Solaris 11.4, Cygwin 3.5.3, mingw, MSVC 17, Android 15.
 @end itemize
index a26ce77292ff0538293dde262753a7ae689eeddc..e171606e2588322aab1f9509d6ae58580a057528 100644 (file)
  #error "Please include config.h first."
 #endif
 
-#if @GNULIB_STDC_LOAD8_ALIGNED@
+#if @GNULIB_STDC_LOAD8_ALIGNED@ || @GNULIB_STDC_LOAD8@
 
 /* Get int_least8_t, int_least16_t, int_least32_t, int_least64_t,
    uint_least8_t, uint_least16_t, uint_least32_t, uint_least64_t.  */
 # include <stdint.h>
 
+#endif
+
+#if @GNULIB_STDC_LOAD8_ALIGNED@
+
 /* Get bswap_16, bswap_32, bswap_64.  */
 # include <byteswap.h>
 
@@ -98,6 +102,9 @@ _GL_INLINE_HEADER_BEGIN
 #ifndef _GL_STDC_LOAD8_ALIGNED_INLINE
 # define _GL_STDC_LOAD8_ALIGNED_INLINE _GL_INLINE
 #endif
+#ifndef _GL_STDC_LOAD8_INLINE
+# define _GL_STDC_LOAD8_INLINE _GL_INLINE
+#endif
 
 /* An expression, preferably with the type of A, that has the value of B.  */
 #if ((defined __GNUC__ && 2 <= __GNUC__) \
@@ -1262,6 +1269,126 @@ stdc_load8_aligned_les64 (const unsigned char ptr[8])
 
 #endif
 
+#if @GNULIB_STDC_LOAD8@
+
+_GL_STDC_LOAD8_INLINE uint_least8_t
+stdc_load8_beu8 (const unsigned char ptr[1])
+{
+  return ptr[0];
+}
+
+_GL_STDC_LOAD8_INLINE uint_least16_t
+stdc_load8_beu16 (const unsigned char ptr[2])
+{
+  return ((uint_fast16_t) ptr[0] << 8) | (uint_fast16_t) ptr[1];
+}
+
+_GL_STDC_LOAD8_INLINE uint_least32_t
+stdc_load8_beu32 (const unsigned char ptr[4])
+{
+  return ((uint_fast32_t) ptr[0] << 24) | ((uint_fast32_t) ptr[1] << 16)
+         | ((uint_fast32_t) ptr[2] << 8) | (uint_fast32_t) ptr[3];
+}
+
+_GL_STDC_LOAD8_INLINE uint_least64_t
+stdc_load8_beu64 (const unsigned char ptr[8])
+{
+  return ((uint_fast64_t) ptr[0] << 56) | ((uint_fast64_t) ptr[1] << 48)
+         | ((uint_fast64_t) ptr[2] << 40) | ((uint_fast64_t) ptr[3] << 32)
+         | ((uint_fast64_t) ptr[4] << 24) | ((uint_fast64_t) ptr[5] << 16)
+         | ((uint_fast64_t) ptr[6] << 8) | (uint_fast64_t) ptr[7];
+}
+
+_GL_STDC_LOAD8_INLINE uint_least8_t
+stdc_load8_leu8 (const unsigned char ptr[1])
+{
+  return ptr[0];
+}
+
+_GL_STDC_LOAD8_INLINE uint_least16_t
+stdc_load8_leu16 (const unsigned char ptr[2])
+{
+  return (uint_fast16_t) ptr[0] | ((uint_fast16_t) ptr[1] << 8);
+}
+
+_GL_STDC_LOAD8_INLINE uint_least32_t
+stdc_load8_leu32 (const unsigned char ptr[4])
+{
+  return (uint_fast32_t) ptr[0] | ((uint_fast32_t) ptr[1] << 8)
+         | ((uint_fast32_t) ptr[2] << 16) | ((uint_fast32_t) ptr[3] << 24);
+}
+
+_GL_STDC_LOAD8_INLINE uint_least64_t
+stdc_load8_leu64 (const unsigned char ptr[8])
+{
+  return (uint_fast64_t) ptr[0] | ((uint_fast64_t) ptr[1] << 8)
+         | ((uint_fast64_t) ptr[2] << 16) | ((uint_fast64_t) ptr[3] << 24)
+         | ((uint_fast64_t) ptr[4] << 32) | ((uint_fast64_t) ptr[5] << 40)
+         | ((uint_fast64_t) ptr[6] << 48) | ((uint_fast64_t) ptr[7] << 56);
+}
+
+_GL_STDC_LOAD8_INLINE int_least8_t
+stdc_load8_bes8 (const unsigned char ptr[1])
+{
+  return *(signed char *)ptr;
+}
+
+_GL_STDC_LOAD8_INLINE int_least16_t
+stdc_load8_bes16 (const unsigned char ptr[2])
+{
+  return (int16_t) (((uint_fast16_t) ptr[0] << 8) | (uint_fast16_t) ptr[1]);
+}
+
+_GL_STDC_LOAD8_INLINE int_least32_t
+stdc_load8_bes32 (const unsigned char ptr[4])
+{
+  return (int32_t)
+         (((uint_fast32_t) ptr[0] << 24) | ((uint_fast32_t) ptr[1] << 16)
+          | ((uint_fast32_t) ptr[2] << 8) | (uint_fast32_t) ptr[3]);
+}
+
+_GL_STDC_LOAD8_INLINE int_least64_t
+stdc_load8_bes64 (const unsigned char ptr[8])
+{
+  return (int64_t)
+         (((uint_fast64_t) ptr[0] << 56) | ((uint_fast64_t) ptr[1] << 48)
+          | ((uint_fast64_t) ptr[2] << 40) | ((uint_fast64_t) ptr[3] << 32)
+          | ((uint_fast64_t) ptr[4] << 24) | ((uint_fast64_t) ptr[5] << 16)
+          | ((uint_fast64_t) ptr[6] << 8) | (uint_fast64_t) ptr[7]);
+}
+
+_GL_STDC_LOAD8_INLINE int_least8_t
+stdc_load8_les8 (const unsigned char ptr[1])
+{
+  return *(signed char *)ptr;
+}
+
+_GL_STDC_LOAD8_INLINE int_least16_t
+stdc_load8_les16 (const unsigned char ptr[2])
+{
+  return (int16_t) ((uint_fast16_t) ptr[0] | ((uint_fast16_t) ptr[1] << 8));
+}
+
+_GL_STDC_LOAD8_INLINE int_least32_t
+stdc_load8_les32 (const unsigned char ptr[4])
+{
+  return (int32_t)
+         ((uint_fast32_t) ptr[0] | ((uint_fast32_t) ptr[1] << 8)
+          | ((uint_fast32_t) ptr[2] << 16) | ((uint_fast32_t) ptr[3] << 24));
+}
+
+_GL_STDC_LOAD8_INLINE int_least64_t
+stdc_load8_les64 (const unsigned char ptr[8])
+{
+  return (int64_t)
+         ((uint_fast64_t) ptr[0] | ((uint_fast64_t) ptr[1] << 8)
+          | ((uint_fast64_t) ptr[2] << 16) | ((uint_fast64_t) ptr[3] << 24)
+          | ((uint_fast64_t) ptr[4] << 32) | ((uint_fast64_t) ptr[5] << 40)
+          | ((uint_fast64_t) ptr[6] << 48) | ((uint_fast64_t) ptr[7] << 56));
+}
+
+#endif
+
 
 #ifdef __cplusplus
 }
diff --git a/lib/stdc_load8.c b/lib/stdc_load8.c
new file mode 100644 (file)
index 0000000..af3d411
--- /dev/null
@@ -0,0 +1,19 @@
+/* stdc_load8_* (unaligned) functions.
+   Copyright (C) 2026 Free Software Foundation, Inc.
+
+   This file is free software: you can redistribute it and/or modify
+   it under the terms of the GNU Lesser General Public License as
+   published by the Free Software Foundation; either version 2.1 of the
+   License, or (at your option) any later version.
+
+   This file is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#define _GL_STDC_LOAD8_INLINE _GL_EXTERN_INLINE
+#include <config.h>
+#include <stdbit.h>
index 31f82c375c3eb94ba28339b267bb81df7e313320..7872902b6c6d05af456429da631ff298c396fff7 100644 (file)
@@ -1,5 +1,5 @@
 # stdbit_h.m4
-# serial 6
+# serial 7
 dnl Copyright 2024-2026 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -67,6 +67,7 @@ AC_DEFUN([gl_STDBIT_H_REQUIRE_DEFAULTS],
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDC_BIT_FLOOR])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDC_BIT_CEIL])
     gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDC_LOAD8_ALIGNED])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDC_LOAD8])
   ])
   m4_require(GL_MODULE_INDICATOR_PREFIX[_STDBIT_H_MODULE_INDICATOR_DEFAULTS])
   AC_REQUIRE([gl_STDBIT_H_DEFAULTS])
index 69e4a3ea193ad318c03251af03b4594ab778e3a2..2e4ca2ebcc86faf0b23a7f8a28c7d7b748d9e925 100644 (file)
@@ -47,6 +47,7 @@ stdbit.h: stdbit.in.h $(top_builddir)/config.status
          -e 's/@''GNULIB_STDC_BIT_FLOOR''@/$(GNULIB_STDC_BIT_FLOOR)/g' \
          -e 's/@''GNULIB_STDC_BIT_CEIL''@/$(GNULIB_STDC_BIT_CEIL)/g' \
          -e 's/@''GNULIB_STDC_LOAD8_ALIGNED''@/$(GNULIB_STDC_LOAD8_ALIGNED)/g' \
+         -e 's/@''GNULIB_STDC_LOAD8''@/$(GNULIB_STDC_LOAD8)/g' \
          $(srcdir)/stdbit.in.h > $@-t
        $(AM_V_at)mv $@-t $@
 lib_SOURCES += stdbit.c
diff --git a/modules/stdc_load8 b/modules/stdc_load8
new file mode 100644 (file)
index 0000000..db82fc1
--- /dev/null
@@ -0,0 +1,27 @@
+Description:
+stdc_load8_* (unaligned) functions: Endian-aware loading of a few bytes.
+
+Files:
+lib/stdc_load8.c
+
+Depends-on:
+stdbit-h
+stdint-h
+
+configure.ac:
+AC_REQUIRE([gl_STDBIT_H])
+gl_STDBIT_MODULE_INDICATOR([stdc_load8])
+
+Makefile.am:
+if GL_GENERATE_STDBIT_H
+lib_SOURCES += stdc_load8.c
+endif
+
+Include:
+<stdbit.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all