Rename module ctype to ctype-h.
authorBruno Haible <bruno@clisp.org>
Thu, 13 Feb 2025 20:00:06 +0000 (21:00 +0100)
committerBruno Haible <bruno@clisp.org>
Thu, 13 Feb 2025 20:36:07 +0000 (21:36 +0100)
* 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.

18 files changed:
ChangeLog
doc/posix-headers/ctype.texi
modules/c-ctype-tests
modules/ctype
modules/ctype-c++-tests [deleted file]
modules/ctype-h [new file with mode: 0644]
modules/ctype-h-c++-tests [new file with mode: 0644]
modules/ctype-h-tests [new file with mode: 0644]
modules/ctype-tests [deleted file]
modules/dfa
modules/isblank
modules/posixcheck
tests/test-ctype-c++.cc [deleted file]
tests/test-ctype-c++2.cc [deleted file]
tests/test-ctype-h-c++.cc [new file with mode: 0644]
tests/test-ctype-h-c++2.cc [new file with mode: 0644]
tests/test-ctype-h.c [new file with mode: 0644]
tests/test-ctype.c [deleted file]

index 51a17c3354fd08880a965d3492071fb1849f612c..87d47c71f86001725abb82c5fe0ca8d041402516 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,16 @@
+2025-02-13  Bruno Haible  <bruno@clisp.org>
+
+       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  <bruno@clisp.org>
 
        getaddrinfo: Fix a compilation error in C++ mode (regression yesterday).
index 19d024e19a97cae95be89b6ef1a1332272afcee7..e36c2549877b524e33579b65e2ad08a582985c29 100644 (file)
@@ -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
index 0d8a8b63c5225a371016cbde4d8bc8c0b9133b57..8d49573e595620782118b210e58cb86f369a1567 100644 (file)
@@ -3,7 +3,7 @@ tests/test-c-ctype.c
 tests/macros.h
 
 Depends-on:
-ctype
+ctype-h
 isblank
 
 configure.ac:
index ca228001636a11a2220ffdb03950664f957c8803..5de1b545faae282ff3790bbe3e49c492c460d578 100644 (file)
@@ -1,42 +1,20 @@
 Description:
-A <ctype.h> that conforms to C99.
+A <ctype.h> 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 <ctype.h> 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:
 <ctype.h>
@@ -45,4 +23,3 @@ License:
 LGPLv2+
 
 Maintainer:
-all
diff --git a/modules/ctype-c++-tests b/modules/ctype-c++-tests
deleted file mode 100644 (file)
index 9ba7659..0000000
+++ /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 (file)
index 0000000..ca22800
--- /dev/null
@@ -0,0 +1,48 @@
+Description:
+A <ctype.h> 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 <ctype.h> 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:
+<ctype.h>
+
+License:
+LGPLv2+
+
+Maintainer:
+all
diff --git a/modules/ctype-h-c++-tests b/modules/ctype-h-c++-tests
new file mode 100644 (file)
index 0000000..4405989
--- /dev/null
@@ -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 (file)
index 0000000..925f970
--- /dev/null
@@ -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 (file)
index cae5067..0000000
+++ /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
index f8b8c9b22cc9fb4c62f6d1fb916a08c920331d1a..a3c4e44dba7bf1be78618bc82a531468fddc28b9 100644 (file)
@@ -16,7 +16,7 @@ c32tob
 c32tolower
 c32toupper
 c99
-ctype
+ctype-h
 flexmember
 gettext-h
 gnulib-i18n
index ffbb16568a4bdb608dbe8b3e685bbb43f667a709..53e31fbb603b8fb19b7e1e65a0b1ba566dcf3cf5 100644 (file)
@@ -7,7 +7,7 @@ m4/isblank.m4
 
 Depends-on:
 extensions
-ctype
+ctype-h
 
 configure.ac:
 gl_FUNC_ISBLANK
index 1ea334ab8bc830ba326cc4d5519d9acb76d6b3c2..656299cd30ac4d4561a5c39028cb9dcf71a31cd3 100644 (file)
@@ -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-c++.cc
deleted file mode 100644 (file)
index 395cc59..0000000
+++ /dev/null
@@ -1,35 +0,0 @@
-/* Test of <ctype.h> substitute in C++ mode.
-   Copyright (C) 2019-2025 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
-
-#define GNULIB_NAMESPACE gnulib
-#include <config.h>
-
-#include <ctype.h>
-
-#include "signature.h"
-
-
-#if 0
-SIGNATURE_CHECK (GNULIB_NAMESPACE::isblank, int, (int));
-#endif
-
-
-int
-main ()
-{
-}
diff --git a/tests/test-ctype-c++2.cc b/tests/test-ctype-c++2.cc
deleted file mode 100644 (file)
index 793afff..0000000
+++ /dev/null
@@ -1,20 +0,0 @@
-/* Test of <ctype.h> substitute in C++ mode.
-   Copyright (C) 2019-2025 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-#define GNULIB_NAMESPACE gnulib
-#include <config.h>
-
-#include <cctype>
diff --git a/tests/test-ctype-h-c++.cc b/tests/test-ctype-h-c++.cc
new file mode 100644 (file)
index 0000000..395cc59
--- /dev/null
@@ -0,0 +1,35 @@
+/* Test of <ctype.h> substitute in C++ mode.
+   Copyright (C) 2019-2025 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Bruno Haible <bruno@clisp.org>, 2019.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <ctype.h>
+
+#include "signature.h"
+
+
+#if 0
+SIGNATURE_CHECK (GNULIB_NAMESPACE::isblank, int, (int));
+#endif
+
+
+int
+main ()
+{
+}
diff --git a/tests/test-ctype-h-c++2.cc b/tests/test-ctype-h-c++2.cc
new file mode 100644 (file)
index 0000000..793afff
--- /dev/null
@@ -0,0 +1,20 @@
+/* Test of <ctype.h> substitute in C++ mode.
+   Copyright (C) 2019-2025 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+#define GNULIB_NAMESPACE gnulib
+#include <config.h>
+
+#include <cctype>
diff --git a/tests/test-ctype-h.c b/tests/test-ctype-h.c
new file mode 100644 (file)
index 0000000..bde6272
--- /dev/null
@@ -0,0 +1,27 @@
+/* Test of <ctype.h> substitute.
+   Copyright (C) 2009-2025 Free Software Foundation, Inc.
+
+   This program is free software: you can redistribute it and/or modify
+   it under the terms of the GNU General Public License as published by
+   the Free Software Foundation, either version 3 of the License, or
+   (at your option) any later version.
+
+   This program is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+   GNU General Public License for more details.
+
+   You should have received a copy of the GNU General Public License
+   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
+
+/* Written by Eric Blake <ebb9@byu.net>, 2009.  */
+
+#include <config.h>
+
+#include <ctype.h>
+
+int
+main (void)
+{
+  return 0;
+}
diff --git a/tests/test-ctype.c b/tests/test-ctype.c
deleted file mode 100644 (file)
index bde6272..0000000
+++ /dev/null
@@ -1,27 +0,0 @@
-/* Test of <ctype.h> substitute.
-   Copyright (C) 2009-2025 Free Software Foundation, Inc.
-
-   This program is free software: you can redistribute it and/or modify
-   it under the terms of the GNU General Public License as published by
-   the Free Software Foundation, either version 3 of the License, or
-   (at your option) any later version.
-
-   This program is distributed in the hope that it will be useful,
-   but WITHOUT ANY WARRANTY; without even the implied warranty of
-   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-   GNU General Public License for more details.
-
-   You should have received a copy of the GNU General Public License
-   along with this program.  If not, see <https://www.gnu.org/licenses/>.  */
-
-/* Written by Eric Blake <ebb9@byu.net>, 2009.  */
-
-#include <config.h>
-
-#include <ctype.h>
-
-int
-main (void)
-{
-  return 0;
-}