From b91757da7aee0778822dfb0e9b8f828832b9a919 Mon Sep 17 00:00:00 2001
From: Bruno Haible <bruno@clisp.org>
Date: Fri, 28 Jul 2023 15:15:26 +0200
Subject: [PATCH] uchar: Include the necessary snippets.

* lib/uchar.in.h: Add insertion points for _GL_ARG_NONNULL and
_GL_WARN_ON_USE.
* modules/uchar (Depends-on): Add snippet/arg-nonnull,
snippet/warn-on-use.
(Makefile.am): In uchar.h, include the ARG_NONNULL_H and WARN_ON_USE_H
snippets.
---
 ChangeLog      | 10 ++++++++++
 lib/uchar.in.h |  4 ++++
 modules/uchar  |  6 +++++-
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog
index 3b7598d7cb..770f60fa5b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,13 @@
+2023-07-28  Bruno Haible  <bruno@clisp.org>
+
+	uchar: Include the necessary snippets.
+	* lib/uchar.in.h: Add insertion points for _GL_ARG_NONNULL and
+	_GL_WARN_ON_USE.
+	* modules/uchar (Depends-on): Add snippet/arg-nonnull,
+	snippet/warn-on-use.
+	(Makefile.am): In uchar.h, include the ARG_NONNULL_H and WARN_ON_USE_H
+	snippets.
+
 2023-07-23  Bruno Haible  <bruno@clisp.org>
 
 	fnmatch: Work around bugs on FreeBSD, NetBSD, Solaris, Cygwin, Android.
diff --git a/lib/uchar.in.h b/lib/uchar.in.h
index ab7c1f2d94..e3914b58ca 100644
--- a/lib/uchar.in.h
+++ b/lib/uchar.in.h
@@ -58,6 +58,10 @@
 
 /* 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.  */
+
 
 #if !(@HAVE_UCHAR_H@ || (defined __cplusplus && @CXX_HAS_UCHAR_TYPES@))
 
diff --git a/modules/uchar b/modules/uchar
index 2c947ed243..f14611fc57 100644
--- a/modules/uchar
+++ b/modules/uchar
@@ -9,7 +9,9 @@ m4/stdint.m4
 Depends-on:
 gen-header
 include_next
+snippet/arg-nonnull
 snippet/c++defs
+snippet/warn-on-use
 stdint
 wchar
 
@@ -21,7 +23,7 @@ AC_PROG_MKDIR_P
 Makefile.am:
 BUILT_SOURCES += uchar.h
 
-uchar.h: uchar.in.h $(top_builddir)/config.status $(CXXDEFS_H)
+uchar.h: uchar.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 +63,8 @@ uchar.h: uchar.in.h $(top_builddir)/config.status $(CXXDEFS_H)
 	      -e 's|@''REPLACE_C32RTOMB''@|$(REPLACE_C32RTOMB)|g' \
 	      -e 's|@''REPLACE_MBRTOC32''@|$(REPLACE_MBRTOC32)|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)/uchar.in.h > $@-t
 	$(AM_V_at)mv $@-t $@
 MOSTLYCLEANFILES += uchar.h uchar.h-t
-- 
2.39.5