diff options
author | Jim Meyering <meyering@redhat.com> | 2010-05-03 10:08:20 +0200 |
---|---|---|
committer | Jim Meyering <meyering@redhat.com> | 2010-05-03 10:12:46 +0200 |
commit | 87c320d5429dd9413929e9a60b85d69523c67499 (patch) | |
tree | 1855502ddfce1a92e9b31ce50368ed03abe48bc7 /top | |
parent | 3a59228aa9e83e507b62eb5281817accccee72ba (diff) | |
download | gnulib-87c320d5429dd9413929e9a60b85d69523c67499.tar.gz |
maint.mk: prohibit unwarranted use of <strings.h>
* top/maint.mk (sc_prohibit_strings_without_use): Reject inclusion of
strings.h in a file that does not also use strcasecmp, strncasecmp,
ffs or ffsll.
Diffstat (limited to 'top')
-rw-r--r-- | top/maint.mk | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/top/maint.mk b/top/maint.mk index 66dc9b6cb7..9bca202b40 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -544,6 +544,13 @@ sc_prohibit_signal_without_use: re='\<($(_sig_function_re)) *\(|\<($(_sig_syms_re))\>' \ $(_sc_header_without_use) +# Prohibit the inclusion of strings.h without a sensible use. +# Using the likes of bcmp, bcopy, bzero, index or rindex is not sensible. +sc_prohibit_strings_without_use: + @h='<strings.h>' \ + re='\<(strn?casecmp|ffs(ll)?)\>' \ + $(_sc_header_without_use) + # Get the list of symbol names with this: # perl -lne '/^# *define (\w+)\(/ and print $1' lib/intprops.h|grep -v '^s'|fmt _intprops_names = \ |