This works around the problems observed on sparc and sparc64 (where
we've disabled use of pthreads) where the BIND applications end up
being killed with SIGTERM instead of exiting gracefully.
dig/host/whatever assumes that it is using BIND8 code. mixing BIND4 in
libc with BIND8 code will result in very strange behavior, or program panics.
it is not necessary for dig/host/whatever to obey /etc/nsswitch.conf, actually
dig(1) is explicit about it.
now dist/bind is almost clean BIND822p5, with the following exception:
- /etc/irs.conf will never be visited when running BIND8 toolchain,
to make it less complex. the search order for BIND8 toolchain is
defined in dist/bind/lib/irs/gen.c:default_map_rules().
and usr.sbin/bind compiles them in BSD make framework, with no tricks at all.
sizeof(_res) must be the same for libc, libresolv and libbind.
libc and libresolve uses bind4 while libbind seems to use bind8.
complete fix would be to share the same codebase among libc and libbind,
but I don't know if importing bind8 into libc/libresolv (or bind9 to
all the places) is the right answer. it involves a big change.
PR: 7966