mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-01-03 03:25:20 +00:00
syntax-check: update c-type checks to refer to Glib
Signed-off-by: Pavel Hrdina <phrdina@redhat.com> Reviewed-by: Cole Robinson <crobinso@redhat.com>
This commit is contained in:
parent
5d98c513c5
commit
aa7005d1c0
@ -534,7 +534,7 @@ sc_prohibit_select:
|
|||||||
# Prohibit the inclusion of <ctype.h>.
|
# Prohibit the inclusion of <ctype.h>.
|
||||||
sc_prohibit_ctype_h:
|
sc_prohibit_ctype_h:
|
||||||
@prohibit='^# *include *<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)
|
$(_sc_search_regexp)
|
||||||
|
|
||||||
# We have our own wrapper for mocking purposes
|
# 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:
|
sc_avoid_ctype_macros:
|
||||||
@prohibit='\b($(ctype_re)) *\(' \
|
@prohibit='\b($(ctype_re)) *\(' \
|
||||||
in_vc_files='\.[ch]$$' \
|
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_search_regexp)
|
||||||
|
|
||||||
sc_avoid_strcase:
|
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)\>' \
|
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)
|
$(_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:
|
# The following list was generated by running:
|
||||||
# man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
|
# man signal.h|col -b|perl -ne '/bsd_signal.*;/.../sigwaitinfo.*;/ and print' \
|
||||||
# | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
|
# | perl -lne '/^\s+(?:int|void).*?(\w+).*/ and print $1' | fmt
|
||||||
|
Loading…
Reference in New Issue
Block a user