From 93b331de6b9783e1344f593e7687a19cdb21062b Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Fri, 27 Dec 2024 23:39:42 +0100 Subject: [PATCH] Rename module strings to strings-h. * modules/strings-h: Renamed from modules/strings. * modules/strings-h-tests: Renamed from modules/strings-tests. * modules/strings-h-c++-tests: Renamed from modules/strings-c++-tests. * tests/test-strings-h.c: Renamed from tests/test-strings.c. * tests/test-strings-h-c++.cc: Renamed from tests/test-strings-c++.cc. * doc/posix-headers/strings.texi: Update. * modules/* (Depends-on): Update. * modules/strings: New file. --- ChangeLog | 12 +++++ doc/posix-headers/strings.texi | 4 +- modules/bcopy | 2 +- modules/ffs | 2 +- modules/posixcheck | 2 +- modules/strcase | 2 +- modules/strings | 42 +++------------ modules/strings-c++-tests | 18 ------- modules/strings-h | 53 +++++++++++++++++++ modules/strings-h-c++-tests | 18 +++++++ modules/strings-h-tests | 11 ++++ modules/strings-tests | 11 ---- ...t-strings-c++.cc => test-strings-h-c++.cc} | 0 tests/{test-strings.c => test-strings-h.c} | 0 14 files changed, 107 insertions(+), 70 deletions(-) delete mode 100644 modules/strings-c++-tests create mode 100644 modules/strings-h create mode 100644 modules/strings-h-c++-tests create mode 100644 modules/strings-h-tests delete mode 100644 modules/strings-tests rename tests/{test-strings-c++.cc => test-strings-h-c++.cc} (100%) rename tests/{test-strings.c => test-strings-h.c} (100%) diff --git a/ChangeLog b/ChangeLog index 21666360ba..57d7d1e99f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,15 @@ +2024-12-27 Bruno Haible + + Rename module strings to strings-h. + * modules/strings-h: Renamed from modules/strings. + * modules/strings-h-tests: Renamed from modules/strings-tests. + * modules/strings-h-c++-tests: Renamed from modules/strings-c++-tests. + * tests/test-strings-h.c: Renamed from tests/test-strings.c. + * tests/test-strings-h-c++.cc: Renamed from tests/test-strings-c++.cc. + * doc/posix-headers/strings.texi: Update. + * modules/* (Depends-on): Update. + * modules/strings: New file. + 2024-12-27 Bruno Haible Rename module string to string-h. diff --git a/doc/posix-headers/strings.texi b/doc/posix-headers/strings.texi index 279f812a6f..b9190b4368 100644 --- a/doc/posix-headers/strings.texi +++ b/doc/posix-headers/strings.texi @@ -3,8 +3,8 @@ POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/strings.h.html} -Gnulib module: strings -@mindex strings +Gnulib module: strings-h +@mindex strings-h Portability problems fixed by Gnulib: @itemize diff --git a/modules/bcopy b/modules/bcopy index 146fb90c6a..124b3be7c3 100644 --- a/modules/bcopy +++ b/modules/bcopy @@ -11,7 +11,7 @@ Files: lib/bcopy.c Depends-on: -strings +strings-h configure.ac: AC_REPLACE_FUNCS(bcopy) diff --git a/modules/ffs b/modules/ffs index 90980fd728..e8bb9b3e44 100644 --- a/modules/ffs +++ b/modules/ffs @@ -6,7 +6,7 @@ lib/ffs.c m4/ffs.m4 Depends-on: -strings +strings-h configure.ac: gl_FUNC_FFS diff --git a/modules/posixcheck b/modules/posixcheck index 8394ede762..2371aaf0e4 100644 --- a/modules/posixcheck +++ b/modules/posixcheck @@ -31,7 +31,7 @@ spawn-h stdio-h stdlib-h string-h -strings +strings-h sys_file sys_ioctl sys_random diff --git a/modules/strcase b/modules/strcase index faf40578e7..4d90a042a5 100644 --- a/modules/strcase +++ b/modules/strcase @@ -7,7 +7,7 @@ lib/strncasecmp.c m4/strcase.m4 Depends-on: -strings +strings-h configure.ac: gl_STRCASE diff --git a/modules/strings b/modules/strings index 6e8ef48684..689e1dcf18 100644 --- a/modules/strings +++ b/modules/strings @@ -1,47 +1,20 @@ Description: A substitute . +Status: +deprecated + +Notice: +This module is deprecated. Use the module 'strings-h' instead. + Files: -lib/strings.in.h -m4/strings_h.m4 Depends-on: -gen-header -include_next -snippet/arg-nonnull -snippet/c++defs -snippet/warn-on-use -sys_types +strings-h configure.ac: -gl_STRINGS_H -gl_STRINGS_H_REQUIRE_DEFAULTS -AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += strings.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) -@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_STRINGS_H''@|$(HAVE_STRINGS_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_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ - -e 's/@''GNULIB_FFS''@/$(GNULIB_FFS)/g' \ - -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \ - -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ - -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - $(srcdir)/strings.in.h > $@-t - $(AM_V_at)mv $@-t $@ -MOSTLYCLEANFILES += strings.h strings.h-t Include: @@ -50,4 +23,3 @@ License: LGPLv2+ Maintainer: -all diff --git a/modules/strings-c++-tests b/modules/strings-c++-tests deleted file mode 100644 index 485b701a44..0000000000 --- a/modules/strings-c++-tests +++ /dev/null @@ -1,18 +0,0 @@ -Files: -tests/test-strings-c++.cc -tests/signature.h - -Status: -c++-test - -Depends-on: -ansi-c++-opt - -configure.ac: - -Makefile.am: -if ANSICXX -TESTS += test-strings-c++ -check_PROGRAMS += test-strings-c++ -test_strings_c___SOURCES = test-strings-c++.cc -endif diff --git a/modules/strings-h b/modules/strings-h new file mode 100644 index 0000000000..6e8ef48684 --- /dev/null +++ b/modules/strings-h @@ -0,0 +1,53 @@ +Description: +A substitute . + +Files: +lib/strings.in.h +m4/strings_h.m4 + +Depends-on: +gen-header +include_next +snippet/arg-nonnull +snippet/c++defs +snippet/warn-on-use +sys_types + +configure.ac: +gl_STRINGS_H +gl_STRINGS_H_REQUIRE_DEFAULTS +AC_PROG_MKDIR_P + +Makefile.am: +BUILT_SOURCES += strings.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +strings.h: strings.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_H) $(ARG_NONNULL_H) +@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_STRINGS_H''@|$(HAVE_STRINGS_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_STRINGS_H''@|$(NEXT_STRINGS_H)|g' \ + -e 's/@''GNULIB_FFS''@/$(GNULIB_FFS)/g' \ + -e 's|@''HAVE_FFS''@|$(HAVE_FFS)|g' \ + -e 's|@''HAVE_STRCASECMP''@|$(HAVE_STRCASECMP)|g' \ + -e 's|@''HAVE_DECL_STRNCASECMP''@|$(HAVE_DECL_STRNCASECMP)|g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + $(srcdir)/strings.in.h > $@-t + $(AM_V_at)mv $@-t $@ +MOSTLYCLEANFILES += strings.h strings.h-t + +Include: + + +License: +LGPLv2+ + +Maintainer: +all diff --git a/modules/strings-h-c++-tests b/modules/strings-h-c++-tests new file mode 100644 index 0000000000..4e212c07ed --- /dev/null +++ b/modules/strings-h-c++-tests @@ -0,0 +1,18 @@ +Files: +tests/test-strings-h-c++.cc +tests/signature.h + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-strings-h-c++ +check_PROGRAMS += test-strings-h-c++ +test_strings_h_c___SOURCES = test-strings-h-c++.cc +endif diff --git a/modules/strings-h-tests b/modules/strings-h-tests new file mode 100644 index 0000000000..c4dc6054f5 --- /dev/null +++ b/modules/strings-h-tests @@ -0,0 +1,11 @@ +Files: +tests/test-strings-h.c + +Depends-on: +strings-h-c++-tests + +configure.ac: + +Makefile.am: +TESTS += test-strings-h +check_PROGRAMS += test-strings-h diff --git a/modules/strings-tests b/modules/strings-tests deleted file mode 100644 index ad66af4661..0000000000 --- a/modules/strings-tests +++ /dev/null @@ -1,11 +0,0 @@ -Files: -tests/test-strings.c - -Depends-on: -strings-c++-tests - -configure.ac: - -Makefile.am: -TESTS += test-strings -check_PROGRAMS += test-strings diff --git a/tests/test-strings-c++.cc b/tests/test-strings-h-c++.cc similarity index 100% rename from tests/test-strings-c++.cc rename to tests/test-strings-h-c++.cc diff --git a/tests/test-strings.c b/tests/test-strings-h.c similarity index 100% rename from tests/test-strings.c rename to tests/test-strings-h.c