From: Simon Josefsson <simon@josefsson.org>
Date: Mon, 6 May 2024 13:01:10 +0000 (+0200)
Subject: maintainer-makefile: Prohibit BSD4.3/SysV u_char etc types.
X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=aacceb6eff58eba91290d930ea9b8275699057cf;p=gnulib.git

maintainer-makefile: Prohibit BSD4.3/SysV u_char etc types.

* top/maint.mk (sc_unsigned_char, sc_unsigned_short)
(sc_unsigned_int, sc_unsigned_long): Add.
---

diff --git a/ChangeLog b/ChangeLog
index 6b969dddbe..54ac701a98 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2024-05-06  Simon Josefsson  <simon@josefsson.org>
+
+	maintainer-makefile: Prohibit BSD4.3/SysV u_char etc types.
+	* top/maint.mk (sc_unsigned_char, sc_unsigned_short)
+	(sc_unsigned_int, sc_unsigned_long): Add.
+
 2024-05-06  Simon Josefsson  <simon@josefsson.org>
 
 	inet-ntop, inet-pton: Avoid obsolete u_char type.
diff --git a/top/maint.mk b/top/maint.mk
index af865717c4..32228f4366 100644
--- a/top/maint.mk
+++ b/top/maint.mk
@@ -854,6 +854,24 @@ sc_obsolete_symbols:
 	halt='do not use HAVE''_FCNTL_H or O'_NDELAY			\
 	  $(_sc_search_regexp)
 
+# Prohibit BSD4.3/SysV u_char, u_short, u_int and u_long usage.
+sc_unsigned_char:
+	@prohibit=u''_char \
+	halt='don'\''t use u''_char; instead use unsigned char'	\
+	  $(_sc_search_regexp)
+sc_unsigned_short:
+	@prohibit=u''_short \
+	halt='don'\''t use u''_short; instead use unsigned short' \
+	  $(_sc_search_regexp)
+sc_unsigned_int:
+	@prohibit=u''_int \
+	halt='don'\''t use u''_int; instead use unsigned int' \
+	  $(_sc_search_regexp)
+sc_unsigned_long:
+	@prohibit=u''_long \
+	halt='don'\''t use u''_long; instead use unsigned long'	\
+	  $(_sc_search_regexp)
+
 # FIXME: warn about definitions of EXIT_FAILURE, EXIT_SUCCESS, STREQ
 
 # Each nonempty ChangeLog line must start with a year number, or a TAB.