* Makefile.maint (sc_prohibit_gethostby): New rule.
* .x-sc_prohibit_gethostby: Exempt the few existing uses.
--- /dev/null
+gnulib/lib/getaddrinfo.c
+gnulib/m4/getaddrinfo.m4
+src/xend_internal.c
+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
{ 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: