From 035f7d68870fb56e1a1cc7383d700c801d38c6d5 Mon Sep 17 00:00:00 2001
From: Marko Lindqvist <cazfi74@gmail.com>
Date: Sun, 8 Nov 2026 11:50:50 +0200
Subject: [PATCH 70/70] gnulib-common.m4: Update to serial 126

See RM #2466

Signed-off-by: Marko Lindqvist <cazfi74@gmail.com>
---
 dependencies/m4/gnulib-common.m4 | 48 +++++++++++++++++++++++++++++++-
 1 file changed, 47 insertions(+), 1 deletion(-)

diff --git a/dependencies/m4/gnulib-common.m4 b/dependencies/m4/gnulib-common.m4
index a1d0f0d26d..119c638e66 100644
--- a/dependencies/m4/gnulib-common.m4
+++ b/dependencies/m4/gnulib-common.m4
@@ -1,5 +1,5 @@
 # gnulib-common.m4
-# serial 125
+# serial 126
 dnl Copyright (C) 2007-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,
@@ -112,6 +112,7 @@ AC_DEFUN([gl_COMMON_BODY], [
 /* The following lines list the first GCC version that supports the attribute.
    Although the lines are not used in GCC 5 and later (as GCC 5 introduced
    __has_attribute support), list GCC versions 5+ anyway for completeness.  */
+#  define _GL_ATTR_access _GL_GNUC_PREREQ (10, 1)
 #  define _GL_ATTR_alloc_size _GL_GNUC_PREREQ (4, 3)
 #  define _GL_ATTR_always_inline _GL_GNUC_PREREQ (3, 2)
 #  define _GL_ATTR_artificial _GL_GNUC_PREREQ (4, 3)
@@ -355,6 +356,51 @@ AC_DEFUN([gl_COMMON_BODY], [
        - In C, before the 'extern' keyword.
        - In C++, between the 'extern "C"' and the variable's type.
  */
+
+/* _GL_ATTRIBUTE_ACCESS_READ_ONLY ((N, S)) declares that the Nth argument of
+   the function is used to read the referenced object but not to write to it.
+   _GL_ATTRIBUTE_ACCESS_WRITE_ONLY ((N, S)) declares that the Nth argument of
+   the function is used to write the referenced object but not to read from it.
+   _GL_ATTRIBUTE_ACCESS_READ_WRITE ((N, S)) declares that the Nth argument of
+   the function is used to both read from and write to the referenced object.
+   _GL_ATTRIBUTE_ACCESS_NONE ((N, S)) declares that the Nth argument of the
+   function is not used to access the referenced object at all.
+
+   Each of the _GL_ATTRIBUTE_ACCESS_* macros accepts an optional size index S,
+   which specifies the position of the argument indicating the maximum size of
+   the access, in elements.  The size of each element is determined by the type
+   of the Nth argument, or is 1 if that argument is a void pointer.  The memory
+   pointed to by the sized object is not required to be initialized.  These
+   macros specify how the object being pointed to can be accessed, not that the
+   access will happen.  They also do not imply whether or not the pointer is or
+   can be NULL.  This information can be specified by combining the
+   _GL_ATTRIBUTE_ACCESS_* macros with _GL_ATTRIBUTE_NONNULL or
+   _GL_ATTRIBUTE_NONNULL_IF_NONZERO.
+ */
+/* Applies to: functions.  */
+/* Clang does not support these attributes.  */
+#ifndef _GL_ATTRIBUTE_ACCESS_READ_ONLY
+# if _GL_HAS_ATTRIBUTE (access) && ! defined __clang__
+#  define _GL_ATTRIBUTE_ACCESS_READ_ONLY(args) \
+     __attribute__ ((__access__ (__read_only__, args)))
+#  define _GL_ATTRIBUTE_ACCESS_WRITE_ONLY(args) \
+     __attribute__ ((__access__ (__write_only__, args)))
+#  define _GL_ATTRIBUTE_ACCESS_READ_WRITE(args) \
+     __attribute__ ((__access__ (__read_write__, args)))
+#  if _GL_GNUC_PREREQ (11, 1)
+#   define _GL_ATTRIBUTE_ACCESS_NONE(args) \
+      __attribute__ ((__access__ (__none__, args)))
+#  else
+#   define _GL_ATTRIBUTE_ACCESS_NONE(args)
+#  endif
+# else
+#  define _GL_ATTRIBUTE_ACCESS_READ_ONLY(args)
+#  define _GL_ATTRIBUTE_ACCESS_WRITE_ONLY(args)
+#  define _GL_ATTRIBUTE_ACCESS_READ_WRITE(args)
+#  define _GL_ATTRIBUTE_ACCESS_NONE(args)
+# endif
+#endif
+
 ]dnl There is no _GL_ATTRIBUTE_ALIGNED; use stdalign's alignas instead.
 [
 /* _GL_ATTRIBUTE_ALLOC_SIZE ((N)) declares that the Nth argument of the function
-- 
2.53.0

