A small correction to the ctype.in.h patch from two days ago:

2025-02-16  Bruno Haible  <br...@clisp.org>

        ctype-h: Make ctype.h self-contained again (regr. 2025-02-14).
        * lib/ctype.in.h: Add comments re _GL_ARG_NONNULL.
        * modules/ctype-h (Depends-on): Add snippet/arg-nonnull.
        (Makefile.am): Substitute $(ARG_NONNULL_H) into ctype.h.

diff --git a/lib/ctype.in.h b/lib/ctype.in.h
index 130ef7e0d3..f0e62395b3 100644
--- a/lib/ctype.in.h
+++ b/lib/ctype.in.h
@@ -49,7 +49,7 @@
 #ifndef _@GUARD_PREFIX@_CTYPE_H
 #define _@GUARD_PREFIX@_CTYPE_H
 
-/* This file uses GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
+/* This file uses _GL_ARG_NONNULL, GNULIB_POSIXCHECK, HAVE_RAW_DECL_*.  */
 #if !_GL_CONFIG_H_INCLUDED
  #error "Please include config.h first."
 #endif
@@ -65,6 +65,8 @@
 
 /* The definitions of _GL_FUNCDECL_RPL etc. are copied here.  */
 
+/* The definition of _GL_ARG_NONNULL is copied here.  */
+
 /* The definition of _GL_WARN_ON_USE is copied here.  */
 
 /* Return non-zero if c is alphanumeric.  */
diff --git a/modules/ctype-h b/modules/ctype-h
index 56edc715b6..3caaad5f5c 100644
--- a/modules/ctype-h
+++ b/modules/ctype-h
@@ -9,6 +9,7 @@ Depends-on:
 extern-inline
 gen-header
 include_next
+snippet/arg-nonnull
 snippet/c++defs
 snippet/warn-on-use
 
@@ -22,7 +23,7 @@ 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)
+ctype.h: ctype.in.h $(top_builddir)/config.status $(CXXDEFS_H) 
$(ARG_NONNULL_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' \
@@ -61,6 +62,7 @@ ctype.h: ctype.in.h $(top_builddir)/config.status 
$(CXXDEFS_H) $(WARN_ON_USE_H)
              -e 's/@''HAVE_TOLOWER_L''@/$(HAVE_TOLOWER_L)/g' \
              -e 's/@''HAVE_TOUPPER_L''@/$(HAVE_TOUPPER_L)/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)/ctype.in.h > $@-t
        $(AM_V_at)mv $@-t $@




Reply via email to