summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJim Meyering <meyering@redhat.com>2009-01-31 09:39:12 +0100
committerJim Meyering <meyering@redhat.com>2009-01-31 09:39:12 +0100
commit2b32399fdc265d5f1555bba4b70adde9074d98cb (patch)
tree3d836730f6ddc8163990da8a46353d8cd505f4b7
parent44421c22a3c9aca7b7899b9fa8037d89dddaff20 (diff)
downloadcoreutils-2b32399fdc265d5f1555bba4b70adde9074d98cb.tar.xz
maint: detect useless inclusion of c-ctype.h
* maint.mk (sc_prohibit_c_ctype_without_use): New rule.
-rw-r--r--maint.mk6
1 files changed, 6 insertions, 0 deletions
diff --git a/maint.mk b/maint.mk
index 65cdf5bbc..b75e9b559 100644
--- a/maint.mk
+++ b/maint.mk
@@ -283,6 +283,12 @@ sc_prohibit_root_dev_ino_without_use:
re='(\<ROOT_DEV_INO_(CHECK|WARN)\>|\<get_root_dev_ino *\()' \
$(_header_without_use)
+# Prohibit the inclusion of c-ctype.h without an actual use.
+ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
+|isprint|ispunct|isspace|isupper|isxdigit|tolower|toupper
+sc_prohibit_c_ctype_without_use:
+ @h='[<"]c-ctype.h[">]' re='\<c_($(ctype_re)) *\(' $(_header_without_use)
+
sc_obsolete_symbols:
@re='\<(HAVE''_FCNTL_H|O''_NDELAY)\>' \
msg='do not use HAVE''_FCNTL_H or O'_NDELAY \