alignasof: new module
authorPaul Eggert <eggert@cs.ucla.edu>
Sun, 15 Jan 2023 19:48:43 +0000 (11:48 -0800)
committerPaul Eggert <eggert@cs.ucla.edu>
Sun, 15 Jan 2023 19:51:07 +0000 (11:51 -0800)
This splits off support for the C23 keywords alignas and alignof,
from the now-deprecated stdalign module.  The latter now merely
provides C11 support.
* MODULES.html.sh, NEWS, doc/gnulib.texi:
* doc/posix-headers/stdalign.texi: Document the change.
* lib/stdalign.in.h: Remove most of the definitions (which are now
supplied by the alignasof module), leaving only
__alignas_is_defined and __alignof_is_defined.
* modules/alignasof, modules/alignasof-tests: New files.
* m4/stdalign.m4 (gl_ALIGNASOF): New macro, with
most of the contents of the old gl_STDALIGN_H.
Do not define __alignas_is_defined or __alignof_is_defined.
(gl_STDALIGN_H): Rely on gl_ALIGNASOF for most of the work.
* modules/alignalloc, modules/alignof, modules/argp:
* modules/crypto/md4-buffer, modules/crypto/md5-buffer:
* modules/crypto/sha1-buffer, modules/crypto/sha256-buffer:
* modules/crypto/sha512-buffer, modules/crypto/sm3-buffer:
* modules/fts, modules/rawmemchr, modules/relocatable-prog-wrapper:
* modules/stddef-tests, modules/sys_socket:
Depend on alignasof, not stdalign.
* modules/stdalign: Deprecate.  Depend on alignasof.
* modules/stdalign-tests: Move most contents to the new module
alignasof-tests, and depend on that.

25 files changed:
ChangeLog
MODULES.html.sh
NEWS
doc/gnulib.texi
doc/posix-headers/stdalign.texi
lib/stdalign.in.h
m4/stdalign.m4
modules/alignalloc
modules/alignasof [new file with mode: 0644]
modules/alignasof-tests [new file with mode: 0644]
modules/alignof
modules/argp
modules/crypto/md4-buffer
modules/crypto/md5-buffer
modules/crypto/sha1-buffer
modules/crypto/sha256-buffer
modules/crypto/sha512-buffer
modules/crypto/sm3-buffer
modules/fts
modules/rawmemchr
modules/relocatable-prog-wrapper
modules/stdalign
modules/stdalign-tests
modules/stddef-tests
modules/sys_socket

index 0dedc0c7d6b14d94a82b1b980775034d747f6a53..4755f193603fb475ce2e4000152b52080e986d5f 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,30 @@
+2023-01-15  Paul Eggert  <eggert@cs.ucla.edu>
+
+       alignasof: new module
+       This splits off support for the C23 keywords alignas and alignof,
+       from the now-deprecated stdalign module.  The latter now merely
+       provides C11 support.
+       * MODULES.html.sh, NEWS, doc/gnulib.texi:
+       * doc/posix-headers/stdalign.texi: Document the change.
+       * lib/stdalign.in.h: Remove most of the definitions (which are now
+       supplied by the alignasof module), leaving only
+       __alignas_is_defined and __alignof_is_defined.
+       * modules/alignasof, modules/alignasof-tests: New files.
+       * m4/stdalign.m4 (gl_ALIGNASOF): New macro, with
+       most of the contents of the old gl_STDALIGN_H.
+       Do not define __alignas_is_defined or __alignof_is_defined.
+       (gl_STDALIGN_H): Rely on gl_ALIGNASOF for most of the work.
+       * modules/alignalloc, modules/alignof, modules/argp:
+       * modules/crypto/md4-buffer, modules/crypto/md5-buffer:
+       * modules/crypto/sha1-buffer, modules/crypto/sha256-buffer:
+       * modules/crypto/sha512-buffer, modules/crypto/sm3-buffer:
+       * modules/fts, modules/rawmemchr, modules/relocatable-prog-wrapper:
+       * modules/stddef-tests, modules/sys_socket:
+       Depend on alignasof, not stdalign.
+       * modules/stdalign: Deprecate.  Depend on alignasof.
+       * modules/stdalign-tests: Move most contents to the new module
+       alignasof-tests, and depend on that.
+
 2023-01-15  Bruno Haible  <bruno@clisp.org>
 
        fpending: Fix compilation error with NDK ≥ r14b and Android API < 23.
index 185e390440a6ecf1593a7ec233b1b5ef7fed4c83..937e9c02d8e2629cef50194bd939c4f48bbb334a 100755 (executable)
@@ -2383,6 +2383,7 @@ func_all_modules ()
   func_echo "$element"
 
   func_begin_table
+  func_module alignasof
   func_module stdckdint
   func_end_table
 
diff --git a/NEWS b/NEWS
index f960dd978f894c44dcb32e89fe8f351d59cbc376..b54781a6f88296a4f36903e60f978f536d3fe846 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -74,6 +74,8 @@ User visible incompatible changes
 
 Date        Modules         Changes
 
+2023-01-15  stdalign        This module is deprecated.  Use alignasof instead.
+
 2023-01-07  timer_time      Link with $(TIMER_TIME_LIB) instead of
                             $(LIB_TIMER_TIME).
 
index 0f645206bfb0335da598ea2ef830fba7b4e4b7f7..7388fb0b4528d5ff3f688c5c49a330b13e4df66d 100644 (file)
@@ -873,10 +873,10 @@ substituted by Gnulib.
 @node alignof
 @section @code{alignof} and @code{alignas}
 
-Gnulib module: stdalign
+Gnulib module: alignasof
 
-The @code{stdalign} module arranges for @code{alignas}, @code{alignof}, and
-@code{<stdalign.h>} to be more like standard C@.  @xref{stdalign.h}.
+The @code{alignasof} module arranges for @code{alignas} and @code{alignof}
+to be more like standard C@.
 
 Portability problems fixed by Gnulib:
 @itemize
@@ -886,6 +886,7 @@ Pre-C11 platforms lack @code{alignas} and @code{alignof}.
 @item
 On pre-C23 platforms, @code{<stdalign.h>} must be included before
 using @code{alignas} or @code{alignof}.
+@xref{stdalign.h}.
 @end itemize
 
 Portability problems not fixed by Gnulib:
index be3cec80d16140033dac2164591a6260be01a70c..7f75a15540e72d14a93abae9af018357051cea29 100644 (file)
@@ -1,15 +1,17 @@
 @node stdalign.h
 @section @file{stdalign.h}
 
-POSIX specification:@* Not in POSIX yet, but we expect it will be.
-ISO C11 (latest free draft
-@url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf})
+POSIX specification:@* Not in POSIX yet, but we expect it will be,
+at least temporarily until it becomes obsolete due to its phasing
+out starting in C23.
+ISO C23 (latest free draft
+@url{http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf})
 sections 6.5.3.4, 6.7.5, 7.15.
 C++11 (latest free draft
 @url{http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf})
 section 18.10.
 
-Gnulib module: stdalign
+Gnulib module: alignasof
 
 Portability problems fixed by Gnulib:
 @itemize
@@ -17,6 +19,10 @@ Portability problems fixed by Gnulib:
 On older C platforms @code{<stdalign.h>} must be included before using
 @code{alignas} or @code{alignof}.  For example, GCC versions before 13 do not
 support these keywords, which were standardized by C23.
+On C23 and later platforms, @code{<stdalign.h>} has no effect and need
+not be included.  (Gnulib-using code should not include
+@code{<stdalign.h>} without also employing Gnulib's now-deprecated
+@code{stdalign} module.)
 @item
 This header file is missing on many platforms:
 FreeBSD 6.4, NetBSD 7.1, OpenBSD 6.7, Minix 3.3.0, AIX 7.1, HP-UX 11.31, IRIX 6.5, Solaris 11.3, mingw, MSVC 14, Android 9.0.
@@ -30,6 +36,15 @@ Older C platforms might not support the obsolescent
 @code{_Alignas} and @code{_Alignof} keywords or macros.
 This portability problem should not matter with code using this module,
 as such code should use @code{alignas} and @code{alignof} instead.
+@item
+In C11 and C17, @code{<stdalign.h>} defines the macros
+@code{__alignas_is_defined} and
+@code{__alignof_is_defined} to 1.
+In C23, these macros are not defined.
+This portability problem should not matter with code using Gnulib's
+@code{alignasof} module, as such code should use @code{alignas} and
+@code{alignof} without checking these two macros.  (Gnulib's
+now-deprecated @code{stdalign} module defines these two macros.)
 @end itemize
 
 Portability problems not fixed by Gnulib:
@@ -66,14 +81,6 @@ external variables that are declared close together with
 @code{alignas}.  The bug is fixed in Sun C 5.15, also known as Oracle
 Developer Studio 12.6 (2017).
 @item
-@code{<stdalign.h>} must be #included before @code{_Alignas} and
-@code{_Alignof} can be used.
-@item
-In C11 and C17, @code{<stdalign.h>} defines the macros
-@code{__alignas_is_defined} and
-@code{__alignof_is_defined} to 1.
-In C23, these macros are not defined.
-@item
 You cannot assume that @code{alignas} and @code{alignof} are reserved words;
 they might be macros.
 @end itemize
index 17357810c7c23398ad5779b0d2e32fd735284a02..6523546f16d35160fba4734f9f9e4780ec215569 100644 (file)
 
 /* Written by Paul Eggert and Bruno Haible.  */
 
+/* Define two obsolescent C11 macros, assuming alignas and alignof are
+   either keywords or alignasof-defined macros.  */
+
 #ifndef _GL_STDALIGN_H
 #define _GL_STDALIGN_H
 
-/* ISO C11 <stdalign.h> for platforms that lack it.
-
-   References:
-   ISO C11 (latest free draft
-   <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n1570.pdf>)
-   sections 6.5.3.4, 6.7.5, 7.15.
-   C++11 (latest free draft
-   <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
-   section 18.10. */
-
-/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
-   requirement of a structure member (i.e., slot or field) that is of
-   type TYPE, as an integer constant expression.
-
-   This differs from GCC's and clang's __alignof__ operator, which can
-   yield a better-performing alignment for an object of that type.  For
-   example, on x86 with GCC and on Linux/x86 with clang,
-   __alignof__ (double) and __alignof__ (long long) are 8, whereas
-   alignof (double) and alignof (long long) are 4 unless the option
-   '-malign-double' is used.
-
-   The result cannot be used as a value for an 'enum' constant, if you
-   want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.  */
-
-/* FreeBSD 9.1 <sys/cdefs.h>, included by <stddef.h> and lots of other
-   standard headers, defines conflicting implementations of _Alignas
-   and _Alignof that are no better than ours; override them.  */
-#undef _Alignas
-#undef _Alignof
-
-/* GCC releases before GCC 4.9 had a bug in _Alignof.  See GCC bug 52023
-   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
-   clang versions < 8.0.0 have the same bug.  */
-#if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
-     || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
-         && !defined __clang__) \
-     || (defined __clang__ && __clang_major__ < 8))
-# ifdef __cplusplus
-#  if (201103 <= __cplusplus || defined _MSC_VER)
-#   define _Alignof(type) alignof (type)
-#  else
-   template <class __t> struct __alignof_helper { char __a; __t __b; };
-#   define _Alignof(type) offsetof (__alignof_helper<type>, __b)
-#   define _GL_STDALIGN_NEEDS_STDDEF 1
-#  endif
-# else
-#  define _Alignof(type) offsetof (struct { char __a; type __b; }, __b)
-#  define _GL_STDALIGN_NEEDS_STDDEF 1
-# endif
-#endif
-#if ! (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER))
-# define alignof _Alignof
-#endif
-#define __alignof_is_defined 1
-
-/* alignas (A), also known as _Alignas (A), aligns a variable or type
-   to the alignment A, where A is an integer constant expression.  For
-   example:
-
-      int alignas (8) foo;
-      struct s { int a; int alignas (8) bar; };
-
-   aligns the address of FOO and the offset of BAR to be multiples of 8.
-
-   A should be a power of two that is at least the type's alignment
-   and at most the implementation's alignment limit.  This limit is
-   2**28 on typical GNUish hosts, and 2**13 on MSVC.  To be portable
-   to MSVC through at least version 10.0, A should be an integer
-   constant, as MSVC does not support expressions such as 1 << 3.
-   To be portable to Sun C 5.11, do not align auto variables to
-   anything stricter than their default alignment.
-
-   The following C11 requirements are not supported here:
-
-     - If A is zero, alignas has no effect.
-     - alignas can be used multiple times; the strictest one wins.
-     - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
-
-   */
-
-#if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
-# if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
-#  define _Alignas(a) alignas (a)
-# elif (!defined __attribute__ \
-        && ((defined __APPLE__ && defined __MACH__ \
-             ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
-             : __GNUC__ && !defined __ibmxl__) \
-            || (4 <= __clang_major__) \
-            || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
-            || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
-#  define _Alignas(a) __attribute__ ((__aligned__ (a)))
-# elif 1300 <= _MSC_VER
-#  define _Alignas(a) __declspec (align (a))
-# endif
-#endif
-#if ((defined _Alignas \
-      && !(defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER))) \
-     || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
-# define alignas _Alignas
-#endif
 #if (defined alignas \
+     || (defined __STDC_VERSION__ && 202311 <= __STDC_VERSION__) \
      || (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)))
 # define __alignas_is_defined 1
 #endif
 
-/* Include <stddef.h> if needed for offsetof.  */
-#if _GL_STDALIGN_NEEDS_STDDEF
-# include <stddef.h>
-#endif
+#define __alignof_is_defined 1
 
 #endif /* _GL_STDALIGN_H */
index b1438eeaced818808ba524b0630971fc338eb8cd..0bb9281f5ee49783c5fea7bd5c15f13d48840275 100644 (file)
@@ -5,9 +5,11 @@ dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
 dnl with or without modifications, as long as this notice is preserved.
 
+dnl Written by Paul Eggert and Bruno Haible.
+
 # Prepare for substituting <stdalign.h> if it is not supported.
 
-AC_DEFUN([gl_STDALIGN_H],
+AC_DEFUN([gl_ALIGNASOF],
 [
   AC_CACHE_CHECK([for alignas and alignof],
     [gl_cv_header_working_stdalign_h],
@@ -58,16 +60,11 @@ AC_DEFUN([gl_STDALIGN_H],
       test "$gl_cv_header_working_stdalign_h" != no && break
      done])
 
-  GL_GENERATE_STDALIGN_H=false
   AS_CASE([$gl_cv_header_working_stdalign_h],
-    [no],
-      [GL_GENERATE_STDALIGN_H=true],
     [yes*keyword*],
       [AC_DEFINE([HAVE_C_ALIGNASOF], [1],
          [Define to 1 if the alignas and alignof keywords work.])])
 
-  AC_CHECK_HEADERS_ONCE([stdalign.h])
-
   dnl The "zz" puts this toward config.h's end, to avoid potential
   dnl collisions with other definitions.
   AH_VERBATIM([zzalignas],
@@ -75,11 +72,33 @@ AC_DEFUN([gl_STDALIGN_H],
 # if HAVE_STDALIGN_H
 #  include <stdalign.h>
 # else
-   /* Substitute.  Keep consistent with gnulib/lib/stdalign.in.h.  */
-#  ifndef _GL_STDALIGN_H
-#   define _GL_STDALIGN_H
-#   undef _Alignas
-#   undef _Alignof
+/* ISO C23 alignas and alignof for platforms that lack it.
+
+   References:
+   ISO C23 (latest free draft
+   <http://www.open-std.org/jtc1/sc22/wg14/www/docs/n3047.pdf>)
+   sections 6.5.3.4, 6.7.5, 7.15.
+   C++11 (latest free draft
+   <http://www.open-std.org/jtc1/sc22/wg21/docs/papers/2011/n3242.pdf>)
+   section 18.10. */
+
+/* alignof (TYPE), also known as _Alignof (TYPE), yields the alignment
+   requirement of a structure member (i.e., slot or field) that is of
+   type TYPE, as an integer constant expression.
+
+   This differs from GCC's and clang's __alignof__ operator, which can
+   yield a better-performing alignment for an object of that type.  For
+   example, on x86 with GCC and on Linux/x86 with clang,
+   __alignof__ (double) and __alignof__ (long long) are 8, whereas
+   alignof (double) and alignof (long long) are 4 unless the option
+   '-malign-double' is used.
+
+   The result cannot be used as a value for an 'enum' constant, if you
+   want to be portable to HP-UX 10.20 cc and AIX 3.2.5 xlc.  */
+
+/* GCC releases before GCC 4.9 had a bug in _Alignof.  See GCC bug 52023
+   <https://gcc.gnu.org/bugzilla/show_bug.cgi?id=52023>.
+   clang versions < 8.0.0 have the same bug.  */
 #   if (!defined __STDC_VERSION__ || __STDC_VERSION__ < 201112 \
         || (defined __GNUC__ && __GNUC__ < 4 + (__GNUC_MINOR__ < 9) \
             && !defined __clang__) \
@@ -100,35 +119,65 @@ AC_DEFUN([gl_STDALIGN_H],
 #   if ! (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER))
 #    define alignof _Alignof
 #   endif
-#   define __alignof_is_defined 1
-#   if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
-#    if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
-#     define _Alignas(a) alignas (a)
-#    elif (!defined __attribute__ \
-           && ((defined __APPLE__ && defined __MACH__ \
-                ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
-                : __GNUC__ && !defined __ibmxl__) \
-               || (4 <= __clang_major__) \
-               || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
-               || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
-#     define _Alignas(a) __attribute__ ((__aligned__ (a)))
-#    elif 1300 <= _MSC_VER
-#     define _Alignas(a) __declspec (align (a))
-#    endif
-#   endif
-#   if ((defined _Alignas \
-         && !(defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER))) \
-        || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
-#    define alignas _Alignas
-#   endif
-#   if (defined alignas \
-        || (defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)))
-#    define __alignas_is_defined 1
-#   endif
-#   if _GL_STDALIGN_NEEDS_STDDEF
-#    include <stddef.h>
+
+/* alignas (A), also known as _Alignas (A), aligns a variable or type
+   to the alignment A, where A is an integer constant expression.  For
+   example:
+
+      int alignas (8) foo;
+      struct s { int a; int alignas (8) bar; };
+
+   aligns the address of FOO and the offset of BAR to be multiples of 8.
+
+   A should be a power of two that is at least the type's alignment
+   and at most the implementation's alignment limit.  This limit is
+   2**28 on typical GNUish hosts, and 2**13 on MSVC.  To be portable
+   to MSVC through at least version 10.0, A should be an integer
+   constant, as MSVC does not support expressions such as 1 << 3.
+   To be portable to Sun C 5.11, do not align auto variables to
+   anything stricter than their default alignment.
+
+   The following C23 requirements are not supported here:
+
+     - If A is zero, alignas has no effect.
+     - alignas can be used multiple times; the strictest one wins.
+     - alignas (TYPE) is equivalent to alignas (alignof (TYPE)).
+
+   */
+#  if !defined __STDC_VERSION__ || __STDC_VERSION__ < 201112
+#   if defined __cplusplus && (201103 <= __cplusplus || defined _MSC_VER)
+#    define _Alignas(a) alignas (a)
+#   elif (!defined __attribute__ \
+          && ((defined __APPLE__ && defined __MACH__ \
+               ? 4 < __GNUC__ + (1 <= __GNUC_MINOR__) \
+               : __GNUC__ && !defined __ibmxl__) \
+              || (4 <= __clang_major__) \
+              || (__ia64 && (61200 <= __HP_cc || 61200 <= __HP_aCC)) \
+              || __ICC || 0x590 <= __SUNPRO_C || 0x0600 <= __xlC__))
+#    define _Alignas(a) __attribute__ ((__aligned__ (a)))
+#   elif 1300 <= _MSC_VER
+#    define _Alignas(a) __declspec (align (a))
 #   endif
-#  endif /* _GL_STDALIGN_H */
+#  endif
+#  if ((defined _Alignas \
+        && !(defined __cplusplus \
+             && (201103 <= __cplusplus || defined _MSC_VER))) \
+       || (defined __STDC_VERSION__ && 201112 <= __STDC_VERSION__))
+#   define alignas _Alignas
+#  endif
+#  if _GL_STDALIGN_NEEDS_STDDEF
+#   include <stddef.h>
+#  endif
 # endif
 #endif])
 ])
+
+AC_DEFUN([gl_STDALIGN_H],
+[
+  AC_REQUIRE([gl_ALIGNASOF])
+  GL_GENERATE_STDALIGN_H=false
+  AS_IF([test "$gl_cv_header_working_stdalign_h" = no],
+    [GL_GENERATE_STDALIGN_H=true])
+
+  AC_CHECK_HEADERS_ONCE([stdalign.h])
+])
index 0a34b4bcf494693ad485a101d40ca9f28a464592..400ab29182797f8fd503f193d2ebc9bba74fbc64 100644 (file)
@@ -7,12 +7,12 @@ lib/alignalloc.c
 m4/alignalloc.m4
 
 Depends-on:
+alignasof
 assert-h
 extensions
 extern-inline
 idx
 posix_memalign
-stdalign
 stdckdint
 stdint
 
diff --git a/modules/alignasof b/modules/alignasof
new file mode 100644 (file)
index 0000000..c5795a0
--- /dev/null
@@ -0,0 +1,18 @@
+Description:
+alignas and alignof that are like C23 and C++11.
+
+Files:
+m4/stdalign.m4
+
+configure.ac:
+gl_ALIGNASOF
+
+Makefile.am:
+
+Include:
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/alignasof-tests b/modules/alignasof-tests
new file mode 100644 (file)
index 0000000..95602c2
--- /dev/null
@@ -0,0 +1,13 @@
+Files:
+tests/test-stdalign.c
+tests/macros.h
+
+Depends-on:
+assert-h
+stdint
+
+configure.ac:
+
+Makefile.am:
+TESTS += test-stdalign
+check_PROGRAMS += test-stdalign
index c78ab4a3c531243aca1eede9332581ef23c7c2d6..cc1ab9690318857c0e790598892c53d18eff8c98 100644 (file)
@@ -5,7 +5,7 @@ Files:
 lib/alignof.h
 
 Depends-on:
-stdalign
+alignasof
 
 configure.ac:
 
index 74519a4b8697f478d3d9f3a9e3363f4dc3308607..88cc78c3cbc4faad953637044fc411d21b0dce0c 100644 (file)
@@ -18,6 +18,7 @@ lib/argp-xinl.c
 m4/argp.m4
 
 Depends-on:
+alignasof
 alloca
 basename-lgpl
 extern-inline
@@ -31,7 +32,6 @@ strcase
 extensions
 vsnprintf
 sleep
-stdalign
 stdbool
 stdio
 strerror
index f5a5f160ed88765716efab8d5c3bbd2e5ca40b3b..73f11e35eee0557921332cfe5c9a42536686bae8 100644 (file)
@@ -7,8 +7,8 @@ lib/md4.c
 m4/md4.m4
 
 Depends-on:
+alignasof
 byteswap
-stdalign
 stdint
 
 configure.ac:
index cd51cab2def2c7263e9e73afd18d2b8de57879fd..8290130b483a8ee6374a5f1972373e652ed38365 100644 (file)
@@ -9,10 +9,10 @@ m4/gl-openssl.m4
 m4/md5.m4
 
 Depends-on:
+alignasof
 byteswap
 c99
 extern-inline
-stdalign
 stdint
 
 configure.ac:
index a934d4e06bb1053d4fc9803d100f3ade9f4833c9..ca6f477a66e947d4cebf786cf08b775722661d86 100644 (file)
@@ -9,10 +9,10 @@ m4/gl-openssl.m4
 m4/sha1.m4
 
 Depends-on:
+alignasof
 byteswap
 c99
 extern-inline
-stdalign
 stdint
 
 configure.ac:
index 85529a342e78a28a0924d13b8a7f9f7509864b47..9e5c029af49493728e8bbe61a9f48a73df14aa40 100644 (file)
@@ -9,10 +9,10 @@ m4/gl-openssl.m4
 m4/sha256.m4
 
 Depends-on:
+alignasof
 byteswap
 c99
 extern-inline
-stdalign
 stdint
 
 configure.ac:
index 416a0b52026cf56e2c9e54e076ad8f38aefc2be7..2a35e2ef200ef3be90353078f32e1447815731b3 100644 (file)
@@ -9,10 +9,10 @@ m4/gl-openssl.m4
 m4/sha512.m4
 
 Depends-on:
+alignasof
 byteswap
 c99
 extern-inline
-stdalign
 stdint
 u64
 
index 3df7d88259207f25bd3f85f358816b2fb92cf114..5f2f2f62428bb35b63c9d5e5f2019c10a629a95c 100644 (file)
@@ -7,10 +7,10 @@ lib/sm3.c
 m4/sm3.m4
 
 Depends-on:
+alignasof
 byteswap
 c99
 extern-inline
-stdalign
 stdint
 
 configure.ac:
index e5443adb2fd4ccb24b1ef28d58ff31caac9f8cff..18b10fac6e923447e6557442d5226ec90d42e3a1 100644 (file)
@@ -8,6 +8,7 @@ lib/fts-cycle.c
 m4/fts.m4
 
 Depends-on:
+alignasof
 attribute
 c99
 closedir
@@ -28,7 +29,6 @@ openat-h
 opendir
 opendirat
 readdir
-stdalign
 stdbool
 stddef
 
index 03da3a27b7aac891cfd86a25d82a30a74cf61dc9..5f3eeaf2d094419454eac2b13e7f9dd448abe93b 100644 (file)
@@ -7,9 +7,9 @@ lib/rawmemchr.valgrind
 m4/rawmemchr.m4
 
 Depends-on:
+alignasof
 assert-h
 extensions
-stdalign
 stdint
 string
 
index 052499c1ad974c8b12df82eb9b1c026262a71780..c885ce2759166f57bfd4f2bb919b364141419539 100644 (file)
@@ -50,6 +50,7 @@ m4/relocatable-lib.m4
 m4/setenv.m4
 
 Depends-on:
+alignasof
 assert-h
 c99
 double-slash-root
@@ -64,7 +65,6 @@ largefile
 libc-config
 pathmax
 ssize_t
-stdalign
 stdbool
 stddef
 stdckdint
index af038180fafc928553e315d36d018311012618a2..c5c29d3088deec5d54d1c36f617004db3193c08b 100644 (file)
@@ -1,11 +1,16 @@
 Description:
 alignas and alignof that are like C23 and C++11.
 
+Notice:
+The stdalign module is deprecated.
+New code should use the alignasof module, and not include <stdalign.h>.
+
 Files:
 lib/stdalign.in.h
 m4/stdalign.m4
 
 Depends-on:
+alignasof
 gen-header
 
 configure.ac:
@@ -35,4 +40,4 @@ License:
 LGPLv2+
 
 Maintainer:
-Paul Eggert
+all
index e4665ed5fcca8e7d5bdbd0a0d1ccbcc5aa909e0f..2a0d486d775b0d76ea38f19750cf71a4238b3eb9 100644 (file)
@@ -1,14 +1,9 @@
 Files:
-tests/test-stdalign.c
-tests/macros.h
 
 Depends-on:
-assert-h
-stdint
+alignasof-tests
 stdalign-c++-tests
 
 configure.ac:
 
 Makefile.am:
-TESTS += test-stdalign
-check_PROGRAMS += test-stdalign
index 644eb0d7aa02f70863000a74b455a807393aea6c..f81ca4785e44b2c41f9b7ad5e37a14071532336c 100644 (file)
@@ -2,8 +2,8 @@ Files:
 tests/test-stddef.c
 
 Depends-on:
+alignasof
 assert-h
-stdalign
 stddef-c++-tests
 
 configure.ac:
index 44b27926696acb0f6c35059b6e7e04fded4c5cbd..ebb5d7d4a6c841a77b5e62408185935053cd9359 100644 (file)
@@ -8,6 +8,7 @@ m4/sys_socket_h.m4
 m4/sockpfaf.m4
 
 Depends-on:
+alignasf
 errno
 extern-inline
 gen-header
@@ -17,7 +18,6 @@ snippet/c++defs
 snippet/warn-on-use
 socklen
 ssize_t
-stdalign
 sys_uio
 
 configure.ac: