mirror of
https://gitlab.com/libvirt/libvirt.git
synced 2025-02-03 17:47:15 +03:00
syntax-check: prohibit all new uses of gethostby* functions
* Makefile.maint (sc_prohibit_gethostby): New rule. * .x-sc_prohibit_gethostby: Exempt the few existing uses.
This commit is contained in:
parent
63efdb85c1
commit
be2d2e06e2
3
.x-sc_prohibit_gethostby
Normal file
3
.x-sc_prohibit_gethostby
Normal file
@ -0,0 +1,3 @@
|
||||
gnulib/lib/getaddrinfo.c
|
||||
gnulib/m4/getaddrinfo.m4
|
||||
src/xend_internal.c
|
@ -1,3 +1,9 @@
|
||||
Thu Dec 11 16:13:08 +0100 2008 Jim Meyering <meyering@redhat.com>
|
||||
|
||||
syntax-check: prohibit all new uses of gethostby* functions
|
||||
* Makefile.maint (sc_prohibit_gethostby): New rule.
|
||||
* .x-sc_prohibit_gethostby: Exempt the few existing uses.
|
||||
|
||||
Thu Dec 11 10:03:00 EST 2008 Cole Robinson <crobinso@redhat.com>
|
||||
|
||||
* src/test.c: Fix locking issue in test driver VolLookupByPath
|
||||
|
@ -390,6 +390,12 @@ sc_prohibit_virBufferAdd_with_string_literal:
|
||||
{ echo '$(ME): use virBufferAddLit, not virBufferAdd,' \
|
||||
'with a string literal' 1>&2; exit 1; } || :
|
||||
|
||||
# Not only do they fail to deal well with ipv6, but the gethostby*
|
||||
# functions are also not thread-safe.
|
||||
sc_prohibit_gethostby:
|
||||
@grep -nE '\<gethostby(addr|name2?) *\(' $$($(VC_LIST_EXCEPT)) && \
|
||||
{ echo '$(ME): use getaddrinfo, not gethostby*' 1>&2; exit 1; } || :
|
||||
|
||||
# Avoid useless parentheses like those in this example:
|
||||
# #if defined (SYMBOL) || defined (SYM2)
|
||||
sc_useless_cpp_parens:
|
||||
|
Loading…
x
Reference in New Issue
Block a user