2N/A * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
2N/A * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
2N/A#include "dns_common.h"
2N/A * on an older libresolv (libresolv.so.1, say), then having nss_dns.so.1 or
2N/A * libnss_dns.a depend on a newer libresolv (libresolv.so.2) will cause
2N/A * (which changes in size from libresolv.so.1 to libresolv.so.2) could
2N/Astatic void _nss_dns_init(void);
2N/Aextern void __res_set_no_hosts_fallback(void);
2N/Aextern void __res_unset_no_hosts_fallback(void);
2N/Aextern int __res_enable_mt(void);
2N/Aextern int __res_disable_mt(void);
2N/Aextern int *__res_get_h_errno();
2N/Aextern int __res_override_retry(int);
2N/Astatic void __fallback_set_no_hosts(void);
2N/Astatic int *__fallback_h_errno(void);
2N/Astatic int __fallback_override_retry(int);
2N/Astatic int __is_mt_safe(void);
2N/A#ifndef NSS_DNS_LIBRESOLV
2N/A if (res_gethostbyname == 0) {
2N/A RES_SET_NO_HOSTS_FALLBACK)) != 0) {
2N/A RES_SET_NO_HOSTS_FALLBACK)) != 0) {
2N/A RES_OVERRIDE_RETRY)) == 0) {
2N/A * libresolv.so.2 will have __h_errno, a BIND 8.1.2
2N/A * of the BIND libresolv.so.2 being used.
2N/A /* BIND 8.2.2 libresolv.so.2 is MT safe. */
2N/A if ((get_h_errno =
2N/A RES_GET_H_ERRNO)) == 0) {
2N/A RES_ENABLE_MT)) != 0 &&
2N/A RES_DISABLE_MT)) == 0) {
2N/A * MT mode per-thread. These functions are in the private libresolv.so.2
2N/A * 8.2.2 libresolv.so.2 being used. __is_mt_safe() returns success
2N/A * linked to libresolv.so.1 or linked statically with pre-BIND 8.2.2
2N/A if (set_res_retry != 0) {
2N/A (*set_no_hosts_fallback)();
2N/A if (mt_disabled) {
2N/A (void) (*disable_mt)();
2N/A (*unset_no_hosts_fallback)();