From aae07f607542872779c7e43e5beab808698ad585 Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 27 Dec 2024 23:16:18 +0100 Subject: [PATCH] Rename module stdalign to stdalign-h. * modules/stdalign-h: Renamed from modules/stdalign. * modules/stdalign-h-tests: Renamed from modules/stdalign-tests. * modules/stdalign-h-c++-tests: Renamed from modules/stdalign-c++-tests. * tests/test-stdalign-h-c++.cc: Renamed from tests/test-stdalign-c++.cc. * doc/posix-headers/stdalign.texi: Update. * modules/stdalign: New file. --- ChangeLog | 10 ++++ doc/posix-headers/stdalign.texi | 6 +-- modules/stdalign | 36 ++----------- modules/stdalign-c++-tests | 17 ------- modules/stdalign-h | 50 +++++++++++++++++++ modules/stdalign-h-c++-tests | 17 +++++++ modules/{stdalign-tests => stdalign-h-tests} | 2 +- ...stdalign-c++.cc => test-stdalign-h-c++.cc} | 0 8 files changed, 86 insertions(+), 52 deletions(-) delete mode 100644 modules/stdalign-c++-tests create mode 100644 modules/stdalign-h create mode 100644 modules/stdalign-h-c++-tests rename modules/{stdalign-tests => stdalign-h-tests} (75%) rename tests/{test-stdalign-c++.cc => test-stdalign-h-c++.cc} (100%) diff --git a/ChangeLog b/ChangeLog index f33ce8ce6c..894222c555 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,13 @@ +2024-12-27 Bruno Haible + + Rename module stdalign to stdalign-h. + * modules/stdalign-h: Renamed from modules/stdalign. + * modules/stdalign-h-tests: Renamed from modules/stdalign-tests. + * modules/stdalign-h-c++-tests: Renamed from modules/stdalign-c++-tests. + * tests/test-stdalign-h-c++.cc: Renamed from tests/test-stdalign-c++.cc. + * doc/posix-headers/stdalign.texi: Update. + * modules/stdalign: New file. + 2024-12-27 Bruno Haible Rename module spawn to spawn-h. diff --git a/doc/posix-headers/stdalign.texi b/doc/posix-headers/stdalign.texi index 57715d3f3f..fa9c2885af 100644 --- a/doc/posix-headers/stdalign.texi +++ b/doc/posix-headers/stdalign.texi @@ -18,10 +18,10 @@ On older C platforms @code{} must be included before using support these keywords, which were standardized by C23. On C23 and later platforms, @code{} has no effect and need not be included. -@mindex stdalign +@mindex stdalign-h (Gnulib-using code should not include @code{} without also employing Gnulib's now-deprecated -@code{stdalign} module.) +@code{stdalign-h} module.) @item This header file is missing on many platforms: FreeBSD 6.4, NetBSD 7.1, OpenBSD 7.5, Minix 3.3.0, AIX 7.1, HP-UX 11.31, Solaris 11.3, mingw, MSVC 14, Android 9.0. @@ -43,7 +43,7 @@ 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.) +now-deprecated @code{stdalign-h} module defines these two macros.) @item @c https://github.com/llvm/llvm-project/issues/81472 Clang 17 does not support an @code{alignas} attribute in the diff --git a/modules/stdalign b/modules/stdalign index ceeab546a2..b0f0ebf2e9 100644 --- a/modules/stdalign +++ b/modules/stdalign @@ -1,45 +1,20 @@ Description: alignas and alignof that are like C23 and C++11. +Status: +deprecated + Notice: -The stdalign module is deprecated. -New code should use the alignasof module, and not include . +This module is deprecated. Use the module 'stdalign-h' instead. Files: -lib/stdalign.in.h -m4/stdalign.m4 Depends-on: -alignasof -gen-header +stdalign-h configure.ac: -gl_STDALIGN_H -gl_CONDITIONAL_HEADER([stdalign.h]) -AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += $(STDALIGN_H) - -# We need the following in order to create when the system -# doesn't have one that works. -if GL_GENERATE_STDALIGN_H -stdalign.h: stdalign.in.h $(top_builddir)/config.status -@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%' - $(gl_V_at)$(SED_HEADER_STDOUT) \ - -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ - -e 's|@''HAVE_STDALIGN_H''@|$(HAVE_STDALIGN_H)|g' \ - -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_STDALIGN_H''@|$(NEXT_STDALIGN_H)|g' \ - $(srcdir)/stdalign.in.h > $@-t - $(AM_V_at)mv $@-t $@ -else -stdalign.h: $(top_builddir)/config.status - rm -f $@ -endif -MOSTLYCLEANFILES += stdalign.h stdalign.h-t Include: @@ -47,4 +22,3 @@ License: LGPLv2+ Maintainer: -all diff --git a/modules/stdalign-c++-tests b/modules/stdalign-c++-tests deleted file mode 100644 index bc7a1f7f1c..0000000000 --- a/modules/stdalign-c++-tests +++ /dev/null @@ -1,17 +0,0 @@ -Files: -tests/test-stdalign-c++.cc - -Status: -c++-test - -Depends-on: -ansi-c++-opt - -configure.ac: - -Makefile.am: -if ANSICXX -TESTS += test-stdalign-c++ -check_PROGRAMS += test-stdalign-c++ -test_stdalign_c___SOURCES = test-stdalign-c++.cc -endif diff --git a/modules/stdalign-h b/modules/stdalign-h new file mode 100644 index 0000000000..ceeab546a2 --- /dev/null +++ b/modules/stdalign-h @@ -0,0 +1,50 @@ +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 . + +Files: +lib/stdalign.in.h +m4/stdalign.m4 + +Depends-on: +alignasof +gen-header + +configure.ac: +gl_STDALIGN_H +gl_CONDITIONAL_HEADER([stdalign.h]) +AC_PROG_MKDIR_P + +Makefile.am: +BUILT_SOURCES += $(STDALIGN_H) + +# We need the following in order to create when the system +# doesn't have one that works. +if GL_GENERATE_STDALIGN_H +stdalign.h: stdalign.in.h $(top_builddir)/config.status +@NMD@ $(AM_V_GEN)$(MKDIR_P) '%reldir%' + $(gl_V_at)$(SED_HEADER_STDOUT) \ + -e 's|@''GUARD_PREFIX''@|${gl_include_guard_prefix}|g' \ + -e 's|@''HAVE_STDALIGN_H''@|$(HAVE_STDALIGN_H)|g' \ + -e 's|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_STDALIGN_H''@|$(NEXT_STDALIGN_H)|g' \ + $(srcdir)/stdalign.in.h > $@-t + $(AM_V_at)mv $@-t $@ +else +stdalign.h: $(top_builddir)/config.status + rm -f $@ +endif +MOSTLYCLEANFILES += stdalign.h stdalign.h-t + +Include: + +License: +LGPLv2+ + +Maintainer: +all diff --git a/modules/stdalign-h-c++-tests b/modules/stdalign-h-c++-tests new file mode 100644 index 0000000000..d631e99727 --- /dev/null +++ b/modules/stdalign-h-c++-tests @@ -0,0 +1,17 @@ +Files: +tests/test-stdalign-h-c++.cc + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-stdalign-h-c++ +check_PROGRAMS += test-stdalign-h-c++ +test_stdalign_h_c___SOURCES = test-stdalign-h-c++.cc +endif diff --git a/modules/stdalign-tests b/modules/stdalign-h-tests similarity index 75% rename from modules/stdalign-tests rename to modules/stdalign-h-tests index 2a0d486d77..60fb9f51f6 100644 --- a/modules/stdalign-tests +++ b/modules/stdalign-h-tests @@ -2,7 +2,7 @@ Files: Depends-on: alignasof-tests -stdalign-c++-tests +stdalign-h-c++-tests configure.ac: diff --git a/tests/test-stdalign-c++.cc b/tests/test-stdalign-h-c++.cc similarity index 100% rename from tests/test-stdalign-c++.cc rename to tests/test-stdalign-h-c++.cc -- 2.39.5