From be2d2e06e262e776032c60e997f73cdd079f56f2 Mon Sep 17 00:00:00 2001 From: Jim Meyering Date: Thu, 11 Dec 2008 15:14:03 +0000 Subject: [PATCH] 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. --- .x-sc_prohibit_gethostby | 3 +++ ChangeLog | 6 ++++++ Makefile.maint | 6 ++++++ 3 files changed, 15 insertions(+) create mode 100644 .x-sc_prohibit_gethostby diff --git a/.x-sc_prohibit_gethostby b/.x-sc_prohibit_gethostby new file mode 100644 index 0000000000..d74ea404d5 --- /dev/null +++ b/.x-sc_prohibit_gethostby @@ -0,0 +1,3 @@ +gnulib/lib/getaddrinfo.c +gnulib/m4/getaddrinfo.m4 +src/xend_internal.c diff --git a/ChangeLog b/ChangeLog index feb0b3c04c..cae44d793f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Thu Dec 11 16:13:08 +0100 2008 Jim Meyering + + 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 * src/test.c: Fix locking issue in test driver VolLookupByPath diff --git a/Makefile.maint b/Makefile.maint index 10d481b764..051e4c0238 100644 --- a/Makefile.maint +++ b/Makefile.maint @@ -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 '\&2; exit 1; } || : + # Avoid useless parentheses like those in this example: # #if defined (SYMBOL) || defined (SYM2) sc_useless_cpp_parens: