提交 aa7005d1 编写于 作者: P Pavel Hrdina

syntax-check: update c-type checks to refer to Glib

Signed-off-by: NPavel Hrdina <phrdina@redhat.com>
Reviewed-by: NCole Robinson <crobinso@redhat.com>
上级 5d98c513
......@@ -534,7 +534,7 @@ sc_prohibit_select:
# Prohibit the inclusion of <ctype.h>.
sc_prohibit_ctype_h:
@prohibit='^# *include *<ctype\.h>' \
halt='use c-ctype.h instead of ctype.h' \
halt='use Glib g_ascii_* function instead of ctype.h' \
$(_sc_search_regexp)
# We have our own wrapper for mocking purposes
......@@ -585,7 +585,7 @@ ctype_re = isalnum|isalpha|isascii|isblank|iscntrl|isdigit|isgraph|islower\
sc_avoid_ctype_macros:
@prohibit='\b($(ctype_re)) *\(' \
in_vc_files='\.[ch]$$' \
halt='use c-ctype.h instead of ctype macros' \
halt='use Glib g_ascii_ macros instead of ctype macros' \
$(_sc_search_regexp)
sc_avoid_strcase:
......@@ -1554,13 +1554,6 @@ sc_prohibit_openat_without_use:
re='\<(openat_(permissive|needs_fchdir|(save|restore)_fail)|l?(stat|ch(own|mod))at|(euid)?accessat|(FCHMOD|FCHOWN|STAT)AT_INLINE)\>' \
$(_sc_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)) *\(' \
$(_sc_header_without_use)
# The following list was generated by running:
# man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
# | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册