From 3d0b3c0a33327650e9717d6f0c60502c4bc3556d Mon Sep 17 00:00:00 2001 From: Bruno Haible Date: Thu, 13 Feb 2025 21:00:06 +0100 Subject: [PATCH] Rename module ctype to ctype-h. * modules/ctype-h: Renamed from modules/ctype. * modules/ctype-h-tests: Renamed from modules/ctype-tests. * modules/ctype-h-c++-tests: Renamed from modules/ctype-c++-tests. * tests/test-ctype-h.c: Renamed from tests/test-ctype.c. * tests/test-ctype-h-c++.cc: Renamed from tests/test-ctype-c++.cc. * tests/test-ctype-h-c++2.cc: Renamed from tests/test-ctype-c++2.cc. * doc/posix-headers/ctype.texi: Update. * modules/* (Depends-on): Update. * modules/ctype: New file. --- ChangeLog | 13 +++++ doc/posix-headers/ctype.texi | 4 +- modules/c-ctype-tests | 2 +- modules/ctype | 39 ++++----------- modules/ctype-c++-tests | 19 -------- modules/ctype-h | 48 +++++++++++++++++++ modules/ctype-h-c++-tests | 19 ++++++++ modules/ctype-h-tests | 11 +++++ modules/ctype-tests | 11 ----- modules/dfa | 2 +- modules/isblank | 2 +- modules/posixcheck | 2 +- ...{test-ctype-c++.cc => test-ctype-h-c++.cc} | 0 ...est-ctype-c++2.cc => test-ctype-h-c++2.cc} | 0 tests/{test-ctype.c => test-ctype-h.c} | 0 15 files changed, 105 insertions(+), 67 deletions(-) delete mode 100644 modules/ctype-c++-tests create mode 100644 modules/ctype-h create mode 100644 modules/ctype-h-c++-tests create mode 100644 modules/ctype-h-tests delete mode 100644 modules/ctype-tests rename tests/{test-ctype-c++.cc => test-ctype-h-c++.cc} (100%) rename tests/{test-ctype-c++2.cc => test-ctype-h-c++2.cc} (100%) rename tests/{test-ctype.c => test-ctype-h.c} (100%) diff --git a/ChangeLog b/ChangeLog index 51a17c3354..87d47c71f8 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,16 @@ +2025-02-13 Bruno Haible + + Rename module ctype to ctype-h. + * modules/ctype-h: Renamed from modules/ctype. + * modules/ctype-h-tests: Renamed from modules/ctype-tests. + * modules/ctype-h-c++-tests: Renamed from modules/ctype-c++-tests. + * tests/test-ctype-h.c: Renamed from tests/test-ctype.c. + * tests/test-ctype-h-c++.cc: Renamed from tests/test-ctype-c++.cc. + * tests/test-ctype-h-c++2.cc: Renamed from tests/test-ctype-c++2.cc. + * doc/posix-headers/ctype.texi: Update. + * modules/* (Depends-on): Update. + * modules/ctype: New file. + 2025-02-13 Bruno Haible getaddrinfo: Fix a compilation error in C++ mode (regression yesterday). diff --git a/doc/posix-headers/ctype.texi b/doc/posix-headers/ctype.texi index 19d024e19a..e36c254987 100644 --- a/doc/posix-headers/ctype.texi +++ b/doc/posix-headers/ctype.texi @@ -3,8 +3,8 @@ POSIX specification:@* @url{https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/ctype.h.html} -Gnulib module: ctype -@mindex ctype +Gnulib module: ctype-h +@mindex ctype-h Portability problems fixed by Gnulib: @itemize diff --git a/modules/c-ctype-tests b/modules/c-ctype-tests index 0d8a8b63c5..8d49573e59 100644 --- a/modules/c-ctype-tests +++ b/modules/c-ctype-tests @@ -3,7 +3,7 @@ tests/test-c-ctype.c tests/macros.h Depends-on: -ctype +ctype-h isblank configure.ac: diff --git a/modules/ctype b/modules/ctype index ca22800163..5de1b545fa 100644 --- a/modules/ctype +++ b/modules/ctype @@ -1,42 +1,20 @@ Description: -A that conforms to C99. +A that works around platform issues. + +Status: +deprecated + +Notice: +This module is deprecated. Use the module 'ctype-h' instead. Files: -lib/ctype.in.h -m4/ctype_h.m4 Depends-on: -extern-inline -gen-header -include_next -snippet/c++defs -snippet/warn-on-use +ctype-h configure.ac: -gl_CTYPE_H -gl_CTYPE_H_REQUIRE_DEFAULTS -AC_PROG_MKDIR_P Makefile.am: -BUILT_SOURCES += ctype.h - -# We need the following in order to create when the system -# doesn't have one that works with the given compiler. -ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ - -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ - -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ - -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \ - -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \ - -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ - -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ - -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ - $(srcdir)/ctype.in.h > $@-t - $(AM_V_at)mv $@-t $@ -MOSTLYCLEANFILES += ctype.h ctype.h-t Include: @@ -45,4 +23,3 @@ License: LGPLv2+ Maintainer: -all diff --git a/modules/ctype-c++-tests b/modules/ctype-c++-tests deleted file mode 100644 index 9ba765909c..0000000000 --- a/modules/ctype-c++-tests +++ /dev/null @@ -1,19 +0,0 @@ -Files: -tests/test-ctype-c++.cc -tests/test-ctype-c++2.cc -tests/signature.h - -Status: -c++-test - -Depends-on: -ansi-c++-opt - -configure.ac: - -Makefile.am: -if ANSICXX -TESTS += test-ctype-c++ -check_PROGRAMS += test-ctype-c++ -test_ctype_c___SOURCES = test-ctype-c++.cc test-ctype-c++2.cc -endif diff --git a/modules/ctype-h b/modules/ctype-h new file mode 100644 index 0000000000..ca22800163 --- /dev/null +++ b/modules/ctype-h @@ -0,0 +1,48 @@ +Description: +A that conforms to C99. + +Files: +lib/ctype.in.h +m4/ctype_h.m4 + +Depends-on: +extern-inline +gen-header +include_next +snippet/c++defs +snippet/warn-on-use + +configure.ac: +gl_CTYPE_H +gl_CTYPE_H_REQUIRE_DEFAULTS +AC_PROG_MKDIR_P + +Makefile.am: +BUILT_SOURCES += ctype.h + +# We need the following in order to create when the system +# doesn't have one that works with the given compiler. +ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) $(WARN_ON_USE_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|@''INCLUDE_NEXT''@|$(INCLUDE_NEXT)|g' \ + -e 's|@''PRAGMA_SYSTEM_HEADER''@|@PRAGMA_SYSTEM_HEADER@|g' \ + -e 's|@''PRAGMA_COLUMNS''@|@PRAGMA_COLUMNS@|g' \ + -e 's|@''NEXT_CTYPE_H''@|$(NEXT_CTYPE_H)|g' \ + -e 's/@''GNULIB_ISBLANK''@/$(GNULIB_ISBLANK)/g' \ + -e 's/@''HAVE_ISBLANK''@/$(HAVE_ISBLANK)/g' \ + -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \ + -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \ + $(srcdir)/ctype.in.h > $@-t + $(AM_V_at)mv $@-t $@ +MOSTLYCLEANFILES += ctype.h ctype.h-t + +Include: + + +License: +LGPLv2+ + +Maintainer: +all diff --git a/modules/ctype-h-c++-tests b/modules/ctype-h-c++-tests new file mode 100644 index 0000000000..44059897c1 --- /dev/null +++ b/modules/ctype-h-c++-tests @@ -0,0 +1,19 @@ +Files: +tests/test-ctype-h-c++.cc +tests/test-ctype-h-c++2.cc +tests/signature.h + +Status: +c++-test + +Depends-on: +ansi-c++-opt + +configure.ac: + +Makefile.am: +if ANSICXX +TESTS += test-ctype-h-c++ +check_PROGRAMS += test-ctype-h-c++ +test_ctype_h_c___SOURCES = test-ctype-h-c++.cc test-ctype-h-c++2.cc +endif diff --git a/modules/ctype-h-tests b/modules/ctype-h-tests new file mode 100644 index 0000000000..925f970065 --- /dev/null +++ b/modules/ctype-h-tests @@ -0,0 +1,11 @@ +Files: +tests/test-ctype-h.c + +Depends-on: +ctype-h-c++-tests + +configure.ac: + +Makefile.am: +TESTS += test-ctype-h +check_PROGRAMS += test-ctype-h diff --git a/modules/ctype-tests b/modules/ctype-tests deleted file mode 100644 index cae5067e4f..0000000000 --- a/modules/ctype-tests +++ /dev/null @@ -1,11 +0,0 @@ -Files: -tests/test-ctype.c - -Depends-on: -ctype-c++-tests - -configure.ac: - -Makefile.am: -TESTS += test-ctype -check_PROGRAMS += test-ctype diff --git a/modules/dfa b/modules/dfa index f8b8c9b22c..a3c4e44dba 100644 --- a/modules/dfa +++ b/modules/dfa @@ -16,7 +16,7 @@ c32tob c32tolower c32toupper c99 -ctype +ctype-h flexmember gettext-h gnulib-i18n diff --git a/modules/isblank b/modules/isblank index ffbb16568a..53e31fbb60 100644 --- a/modules/isblank +++ b/modules/isblank @@ -7,7 +7,7 @@ m4/isblank.m4 Depends-on: extensions -ctype +ctype-h configure.ac: gl_FUNC_ISBLANK diff --git a/modules/posixcheck b/modules/posixcheck index 1ea334ab8b..656299cd30 100644 --- a/modules/posixcheck +++ b/modules/posixcheck @@ -8,7 +8,7 @@ m4/posixcheck.m4 Depends-on: # All modules that depend on 'snippet/warn-on-use'. arpa_inet-h -ctype +ctype-h dirent-h fcntl-h fnmatch-h diff --git a/tests/test-ctype-c++.cc b/tests/test-ctype-h-c++.cc similarity index 100% rename from tests/test-ctype-c++.cc rename to tests/test-ctype-h-c++.cc diff --git a/tests/test-ctype-c++2.cc b/tests/test-ctype-h-c++2.cc similarity index 100% rename from tests/test-ctype-c++2.cc rename to tests/test-ctype-h-c++2.cc diff --git a/tests/test-ctype.c b/tests/test-ctype-h.c similarity index 100% rename from tests/test-ctype.c rename to tests/test-ctype-h.c -- 2.39.5