]> git.ipfire.org Git - thirdparty/gnulib.git/commitdiff
stdc_store8_aligned: New module.
authorBruno Haible <bruno@clisp.org>
Fri, 13 Mar 2026 06:57:41 +0000 (07:57 +0100)
committerBruno Haible <bruno@clisp.org>
Fri, 13 Mar 2026 06:57:41 +0000 (07:57 +0100)
* lib/stdbit.in.h (_GL_STDC_STORE8_ALIGNED_INLINE): New macro.
(stdc_store8_aligned_beu{8,16,32,64},
stdc_store8_aligned_leu{8,16,32,64},
stdc_store8_aligned_bes{8,16,32,64},
stdc_store8_aligned_les{8,16,32,64}): New functions.
* lib/stdc_store8_aligned.c: New file.
* m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
GNULIB_STDC_STORE8_ALIGNED.
* modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_STORE8_ALIGNED.
* modules/stdc_store8_aligned: New file.
* doc/posix-functions/stdc_store8_aligned_beu8.texi: Mention the new
module.
* doc/posix-functions/stdc_store8_aligned_beu16.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_beu32.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_beu64.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_leu8.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_leu16.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_leu32.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_leu64.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_bes8.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_bes16.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_bes32.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_bes64.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_les8.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_les16.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_les32.texi: Likewise.
* doc/posix-functions/stdc_store8_aligned_les64.texi: Likewise.

22 files changed:
ChangeLog
doc/posix-functions/stdc_store8_aligned_bes16.texi
doc/posix-functions/stdc_store8_aligned_bes32.texi
doc/posix-functions/stdc_store8_aligned_bes64.texi
doc/posix-functions/stdc_store8_aligned_bes8.texi
doc/posix-functions/stdc_store8_aligned_beu16.texi
doc/posix-functions/stdc_store8_aligned_beu32.texi
doc/posix-functions/stdc_store8_aligned_beu64.texi
doc/posix-functions/stdc_store8_aligned_beu8.texi
doc/posix-functions/stdc_store8_aligned_les16.texi
doc/posix-functions/stdc_store8_aligned_les32.texi
doc/posix-functions/stdc_store8_aligned_les64.texi
doc/posix-functions/stdc_store8_aligned_les8.texi
doc/posix-functions/stdc_store8_aligned_leu16.texi
doc/posix-functions/stdc_store8_aligned_leu32.texi
doc/posix-functions/stdc_store8_aligned_leu64.texi
doc/posix-functions/stdc_store8_aligned_leu8.texi
lib/stdbit.in.h
lib/stdc_store8_aligned.c [new file with mode: 0644]
m4/stdbit_h.m4
modules/stdbit-h
modules/stdc_store8_aligned [new file with mode: 0644]

index e9a7699cd590b1b7f7ad83421b23a4c921299647..2cd402329a0cd3976a0a4215c10c4be063e83152 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,34 @@
+2026-03-13  Bruno Haible  <bruno@clisp.org>
+
+       stdc_store8_aligned: New module.
+       * lib/stdbit.in.h (_GL_STDC_STORE8_ALIGNED_INLINE): New macro.
+       (stdc_store8_aligned_beu{8,16,32,64},
+       stdc_store8_aligned_leu{8,16,32,64},
+       stdc_store8_aligned_bes{8,16,32,64},
+       stdc_store8_aligned_les{8,16,32,64}): New functions.
+       * lib/stdc_store8_aligned.c: New file.
+       * m4/stdbit_h.m4 (gl_STDBIT_H_REQUIRE_DEFAULTS): Initialize
+       GNULIB_STDC_STORE8_ALIGNED.
+       * modules/stdbit-h (Makefile.am): Substitute GNULIB_STDC_STORE8_ALIGNED.
+       * modules/stdc_store8_aligned: New file.
+       * doc/posix-functions/stdc_store8_aligned_beu8.texi: Mention the new
+       module.
+       * doc/posix-functions/stdc_store8_aligned_beu16.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_beu32.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_beu64.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_leu8.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_leu16.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_leu32.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_leu64.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_bes8.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_bes16.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_bes32.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_bes64.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_les8.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_les16.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_les32.texi: Likewise.
+       * doc/posix-functions/stdc_store8_aligned_les64.texi: Likewise.
+
 2026-03-12  Bruno Haible  <bruno@clisp.org>
 
        stdc_load8: Add tests.
index fb1a5610234cb40af951a35f22242803ca37f51f..7dc7d157b1837acf3c6accbc6cc7aba3b177e4f6 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 c63a3cf536a2908563feb8bd66361b0b0428cfef..181fc1a7ceb9d6c73291235077f540496e201288 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 98bc64a801d645f95d97cf5d37ed3dbb1a7b6b82..ecf3cf5e0f8b697fe24f7687fbd922944a05f4ac 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 9afde30becd0d1e79bd60a84810549d28e617ea2..0d8816739bdb98fa2e1961538cb2d779dd8f119c 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 e8bf9146bca1e03b7099a91f66fb190a61716fbc..b0a4386f28fb1cbf9f1080fea6f47a366c8232ee 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 12c04e5acf7da7c7f3fd11328506ec5a0894c373..7b2cdf440636714947b7f7a39459938a7424a651 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 7f2610904c524b0b4b01f3ae3a067bc465bb4eb7..0090ff874ad7ffc3dc2ba2d42f7c13d81b063a24 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 0b041d720cd0d12a015f2e9463490cc75b4d44f5..9577f8cd1243474c40597ab51182a104c7f36f5c 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 2baedca86909fa95ebd19c6958abc02c6733e125..0b526d0cf89aa34e0b1e1c90c74e3c579f07f585 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 d980b326ff4f83bc7cb4aa02fd137bf7fb85745e..9c1bb7661af44531ef19a101cedbd81d10f1556f 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 6a9c7b320a7f1c9013596a289216610be1f51805..ba2dc1e360fe5852f870065c3dfdf2714c9bf0a5 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 f96be350473d2a5a5b493b888b69a49dd604749b..9f2870aa39e51fb940a495715bdfde45f3bcdf3e 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 d76c399ece2e4ad86de994cd7d7f15eb27002b4a..a2a9e1593c8f424d3f507643a29c91403f4c0f94 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 1f9969f92354c42876abb5abcad67d51c3a3f45c..66c1fdeb54d24f7fef0029c91682d4a62d392e18 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 274b2d2877133ceeecc9e871a1f56c6ce9d830be..613ee7f952336e07edba5033695aa343cc079e4e 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 ed451473f163c7b7589040498d39469408193d2c..78c38d77cd5d07e2de112eca080a0a4373040c1e 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.22.
 
-Gnulib module: ---
+Gnulib module: stdc_store8_aligned
+@mindex stdc_store8_aligned
 
 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 e171606e2588322aab1f9509d6ae58580a057528..37e1566884227ee3edf845afdf066313dfee10cf 100644 (file)
@@ -37,7 +37,7 @@
  #error "Please include config.h first."
 #endif
 
-#if @GNULIB_STDC_LOAD8_ALIGNED@ || @GNULIB_STDC_LOAD8@
+#if @GNULIB_STDC_LOAD8_ALIGNED@ || @GNULIB_STDC_LOAD8@ || @GNULIB_STDC_STORE8_ALIGNED@
 
 /* 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.  */
@@ -45,7 +45,7 @@
 
 #endif
 
-#if @GNULIB_STDC_LOAD8_ALIGNED@
+#if @GNULIB_STDC_LOAD8_ALIGNED@ || @GNULIB_STDC_STORE8_ALIGNED@
 
 /* Get bswap_16, bswap_32, bswap_64.  */
 # include <byteswap.h>
@@ -105,6 +105,9 @@ _GL_INLINE_HEADER_BEGIN
 #ifndef _GL_STDC_LOAD8_INLINE
 # define _GL_STDC_LOAD8_INLINE _GL_INLINE
 #endif
+#ifndef _GL_STDC_STORE8_ALIGNED_INLINE
+# define _GL_STDC_STORE8_ALIGNED_INLINE _GL_INLINE
+#endif
 
 /* An expression, preferably with the type of A, that has the value of B.  */
 #if ((defined __GNUC__ && 2 <= __GNUC__) \
@@ -1390,6 +1393,157 @@ stdc_load8_les64 (const unsigned char ptr[8])
 #endif
 
 
+/* ISO C2y ยง 7.18.22 Endian-Aware 8-Bit Store  */
+
+#if @GNULIB_STDC_STORE8_ALIGNED@
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_beu8 (uint_least8_t value, unsigned char ptr[1])
+{
+  ptr[0] = value;
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_beu16 (uint_least16_t value, unsigned char ptr[2])
+{
+# ifdef WORDS_BIGENDIAN
+  *(uint16_t *)ptr = value;
+# else
+  *(uint16_t *)ptr = bswap_16 (value);
+# endif
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_beu32 (uint_least32_t value, unsigned char ptr[4])
+{
+# ifdef WORDS_BIGENDIAN
+  *(uint32_t *)ptr = value;
+# else
+  *(uint32_t *)ptr = bswap_32 (value);
+# endif
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_beu64 (uint_least64_t value, unsigned char ptr[8])
+{
+# ifdef WORDS_BIGENDIAN
+  *(uint64_t *)ptr = value;
+# else
+  *(uint64_t *)ptr = bswap_64 (value);
+# endif
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_leu8 (uint_least8_t value, unsigned char ptr[1])
+{
+  ptr[0] = value;
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_leu16 (uint_least16_t value, unsigned char ptr[2])
+{
+# ifdef WORDS_BIGENDIAN
+  *(uint16_t *)ptr = bswap_16 (value);
+# else
+  *(uint16_t *)ptr = value;
+# endif
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_leu32 (uint_least32_t value, unsigned char ptr[4])
+{
+# ifdef WORDS_BIGENDIAN
+  *(uint32_t *)ptr = bswap_32 (value);
+# else
+  *(uint32_t *)ptr = value;
+# endif
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_leu64 (uint_least64_t value, unsigned char ptr[8])
+{
+# ifdef WORDS_BIGENDIAN
+  *(uint64_t *)ptr = bswap_64 (value);
+# else
+  *(uint64_t *)ptr = value;
+# endif
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_bes8 (int_least8_t value, unsigned char ptr[1])
+{
+  *(signed char *)ptr = value;
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_bes16 (int_least16_t value, unsigned char ptr[2])
+{
+# ifdef WORDS_BIGENDIAN
+  *(int16_t *)ptr = value;
+# else
+  *(uint16_t *)ptr = bswap_16 ((uint16_t) value);
+# endif
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_bes32 (int_least32_t value, unsigned char ptr[4])
+{
+# ifdef WORDS_BIGENDIAN
+  *(int32_t *)ptr = value;
+# else
+  *(uint32_t *)ptr = bswap_32 ((uint32_t) value);
+# endif
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_bes64 (int_least64_t value, unsigned char ptr[8])
+{
+# ifdef WORDS_BIGENDIAN
+  *(int64_t *)ptr = value;
+# else
+  *(uint64_t *)ptr = bswap_64 ((uint64_t) value);
+# endif
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_les8 (int_least8_t value, unsigned char ptr[1])
+{
+  *(signed char *)ptr = value;
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_les16 (int_least16_t value, unsigned char ptr[2])
+{
+# ifdef WORDS_BIGENDIAN
+  *(uint16_t *)ptr = bswap_16 ((uint16_t) value);
+# else
+  *(int16_t *)ptr = value;
+# endif
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_les32 (int_least32_t value, unsigned char ptr[4])
+{
+# ifdef WORDS_BIGENDIAN
+  *(uint32_t *)ptr = bswap_32 ((uint32_t) value);
+# else
+  *(int32_t *)ptr = value;
+# endif
+}
+
+_GL_STDC_STORE8_ALIGNED_INLINE void
+stdc_store8_aligned_les64 (int_least64_t value, unsigned char ptr[8])
+{
+# ifdef WORDS_BIGENDIAN
+  *(uint64_t *)ptr = bswap_64 ((uint64_t) value);
+# else
+  *(int64_t *)ptr = value;
+# endif
+}
+
+#endif
+
+
 #ifdef __cplusplus
 }
 #endif
diff --git a/lib/stdc_store8_aligned.c b/lib/stdc_store8_aligned.c
new file mode 100644 (file)
index 0000000..cb36d06
--- /dev/null
@@ -0,0 +1,19 @@
+/* stdc_store8_aligned_* 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_STORE8_ALIGNED_INLINE _GL_EXTERN_INLINE
+#include <config.h>
+#include <stdbit.h>
index 7872902b6c6d05af456429da631ff298c396fff7..5aba49e055e3d5762da2c5aa77432ab3628c77bb 100644 (file)
@@ -1,5 +1,5 @@
 # stdbit_h.m4
-# serial 7
+# serial 8
 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,
@@ -68,6 +68,7 @@ AC_DEFUN([gl_STDBIT_H_REQUIRE_DEFAULTS],
     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])
+    gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_STDC_STORE8_ALIGNED])
   ])
   m4_require(GL_MODULE_INDICATOR_PREFIX[_STDBIT_H_MODULE_INDICATOR_DEFAULTS])
   AC_REQUIRE([gl_STDBIT_H_DEFAULTS])
index 2e4ca2ebcc86faf0b23a7f8a28c7d7b748d9e925..f937e29551cfa1d682a374f44c7c1e7f89eadd2e 100644 (file)
@@ -48,6 +48,7 @@ stdbit.h: stdbit.in.h $(top_builddir)/config.status
          -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' \
+         -e 's/@''GNULIB_STDC_STORE8_ALIGNED''@/$(GNULIB_STDC_STORE8_ALIGNED)/g' \
          $(srcdir)/stdbit.in.h > $@-t
        $(AM_V_at)mv $@-t $@
 lib_SOURCES += stdbit.c
diff --git a/modules/stdc_store8_aligned b/modules/stdc_store8_aligned
new file mode 100644 (file)
index 0000000..b5463eb
--- /dev/null
@@ -0,0 +1,28 @@
+Description:
+stdc_store8_aligned_* functions: Endian-aware storing of a few bytes.
+
+Files:
+lib/stdc_store8_aligned.c
+
+Depends-on:
+stdbit-h
+stdint-h
+byteswap
+
+configure.ac:
+AC_REQUIRE([gl_STDBIT_H])
+gl_STDBIT_MODULE_INDICATOR([stdc_store8_aligned])
+
+Makefile.am:
+if GL_GENERATE_STDBIT_H
+lib_SOURCES += stdc_store8_aligned.c
+endif
+
+Include:
+<stdbit.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all