--- /home/reed/src/isc/libbind/libbind/include/arpa/nameser.h 2013-06-05 09:35:24.000000000 -0500 +++ /usr/src/include/arpa/nameser.h 2012-10-24 08:34:05.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: nameser.h,v 1.25 2009/04/12 17:07:34 christos Exp $ */ + /* * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1996-2003 Internet Software Consortium. @@ -45,14 +47,12 @@ */ /* - * $Id: nameser.h,v 1.16 2009-03-03 01:52:48 each Exp $ + * Id: nameser.h,v 1.16 2009/03/03 01:52:48 each Exp */ #ifndef _ARPA_NAMESER_H_ #define _ARPA_NAMESER_H_ -/*! \file */ - #define BIND_4_COMPAT #include @@ -86,13 +86,14 @@ #define NS_HFIXEDSZ 12 /*%< #/bytes of fixed data in header */ #define NS_QFIXEDSZ 4 /*%< #/bytes of fixed data in query */ #define NS_RRFIXEDSZ 10 /*%< #/bytes of fixed data in r record */ -#define NS_INT32SZ 4 /*%< #/bytes of data in a u_int32_t */ -#define NS_INT16SZ 2 /*%< #/bytes of data in a u_int16_t */ +#define NS_INT32SZ 4 /*%< #/bytes of data in a uint32_t */ +#define NS_INT16SZ 2 /*%< #/bytes of data in a uint16_t */ #define NS_INT8SZ 1 /*%< #/bytes of data in a u_int8_t */ #define NS_INADDRSZ 4 /*%< IPv4 T_A */ #define NS_IN6ADDRSZ 16 /*%< IPv6 T_AAAA */ #define NS_CMPRSFLGS 0xc0 /*%< Flag bits indicating name compression. */ #define NS_DEFAULTPORT 53 /*%< For both TCP and UDP. */ + /* * These can be expanded with synonyms, just keep ns_parse.c:ns_parserecord() * in synch with it. @@ -127,7 +128,7 @@ */ typedef struct __ns_msg { const u_char *_msg, *_eom; - u_int16_t _id, _flags, _counts[ns_s_max]; + uint16_t _id, _flags, _counts[ns_s_max]; const u_char *_sections[ns_s_max]; ns_sect _sect; int _rrnum; @@ -154,7 +155,7 @@ #define ns_msg_id(handle) ((handle)._id + 0) #define ns_msg_base(handle) ((handle)._msg + 0) #define ns_msg_end(handle) ((handle)._eom + 0) -#define ns_msg_size(handle) ((handle)._eom - (handle)._msg) +#define ns_msg_size(handle) ((size_t)((handle)._eom - (handle)._msg)) #define ns_msg_count(handle, section) ((handle)._counts[section] + 0) /*% @@ -162,10 +163,10 @@ */ typedef struct __ns_rr { char name[NS_MAXDNAME]; - u_int16_t type; - u_int16_t rr_class; - u_int32_t ttl; - u_int16_t rdlength; + uint16_t type; + uint16_t rr_class; + uint32_t ttl; + uint16_t rdlength; const u_char * rdata; } ns_rr; @@ -188,8 +189,8 @@ #define ns_rr_nnamel(rr) ((rr).nnamel + 0) #define ns_rr_type(rr) ((ns_type)((rr).type + 0)) #define ns_rr_class(rr) ((ns_class)((rr).rr_class + 0)) -#define ns_rr_ttl(rr) ((rr).ttl + 0) -#define ns_rr_rdlen(rr) ((rr).rdlength + 0) +#define ns_rr_ttl(rr) ((u_long)(rr).ttl + 0) +#define ns_rr_rdlen(rr) ((size_t)(rr).rdlength + 0) #define ns_rr_rdata(rr) ((rr).rdata + 0) /*% @@ -430,6 +431,7 @@ NS_KEY_RESERVED10 | \ NS_KEY_RESERVED11 ) #define NS_KEY_RESERVED_BITMASK2 0xFFFF /*%< no bits defined here */ + /* The Algorithm field of the KEY and SIG RR's is an integer, {1..254} */ #define NS_ALG_MD5RSA 1 /*%< MD5 with RSA */ #define NS_ALG_DH 2 /*%< Diffie Hellman KEY */ @@ -437,6 +439,7 @@ #define NS_ALG_DSS NS_ALG_DSA #define NS_ALG_EXPIRE_ONLY 253 /*%< No alg, no security */ #define NS_ALG_PRIVATE_OID 254 /*%< Key begins with OID giving alg */ + /* Protocol values */ /* value 0 is reserved */ #define NS_KEY_PROT_TLS 1 @@ -468,6 +471,7 @@ #define NS_SIG_SIGNED 12 /*%< Signature time */ #define NS_SIG_FOOT 16 /*%< Key footprint */ #define NS_SIG_SIGNER 18 /*%< Domain name of who signed it */ + /* How RR types are represented as bit-flags in NXT records */ #define NS_NXT_BITS 8 #define NS_NXT_BIT_SET( n,p) (p[(n)/NS_NXT_BITS] |= (0x80>>((n)%NS_NXT_BITS))) @@ -485,40 +489,40 @@ * Inline versions of get/put short/long. Pointer is advanced. */ #define NS_GET16(s, cp) do { \ - register const u_char *t_cp = (const u_char *)(cp); \ - (s) = ((u_int16_t)t_cp[0] << 8) \ - | ((u_int16_t)t_cp[1]) \ + const u_char *t_cp = (const u_char *)(cp); \ + (s) = ((uint16_t)t_cp[0] << 8) \ + | ((uint16_t)t_cp[1]) \ ; \ (cp) += NS_INT16SZ; \ -} while (0) +} while (/*CONSTCOND*/0) #define NS_GET32(l, cp) do { \ - register const u_char *t_cp = (const u_char *)(cp); \ - (l) = ((u_int32_t)t_cp[0] << 24) \ - | ((u_int32_t)t_cp[1] << 16) \ - | ((u_int32_t)t_cp[2] << 8) \ - | ((u_int32_t)t_cp[3]) \ + const u_char *t_cp = (const u_char *)(cp); \ + (l) = ((uint32_t)t_cp[0] << 24) \ + | ((uint32_t)t_cp[1] << 16) \ + | ((uint32_t)t_cp[2] << 8) \ + | ((uint32_t)t_cp[3]) \ ; \ (cp) += NS_INT32SZ; \ -} while (0) +} while (/*CONSTCOND*/0) #define NS_PUT16(s, cp) do { \ - register u_int16_t t_s = (u_int16_t)(s); \ - register u_char *t_cp = (u_char *)(cp); \ + uint32_t t_s = (uint32_t)(s); \ + u_char *t_cp = (u_char *)(cp); \ *t_cp++ = t_s >> 8; \ *t_cp = t_s; \ (cp) += NS_INT16SZ; \ -} while (0) +} while (/*CONSTCOND*/0) #define NS_PUT32(l, cp) do { \ - register u_int32_t t_l = (u_int32_t)(l); \ - register u_char *t_cp = (u_char *)(cp); \ + uint32_t t_l = (uint32_t)(l); \ + u_char *t_cp = (u_char *)(cp); \ *t_cp++ = t_l >> 24; \ *t_cp++ = t_l >> 16; \ *t_cp++ = t_l >> 8; \ *t_cp = t_l; \ (cp) += NS_INT32SZ; \ -} while (0) +} while (/*CONSTCOND*/0) /*% * ANSI C identifier hiding for bind's lib/nameser. @@ -578,80 +582,87 @@ #define ns_rdata_refers __ns_rdata_refers __BEGIN_DECLS -int ns_msg_getflag __P((ns_msg, int)); -u_int ns_get16 __P((const u_char *)); -u_long ns_get32 __P((const u_char *)); -void ns_put16 __P((u_int, u_char *)); -void ns_put32 __P((u_long, u_char *)); -int ns_initparse __P((const u_char *, int, ns_msg *)); -int ns_skiprr __P((const u_char *, const u_char *, ns_sect, int)); -int ns_parserr __P((ns_msg *, ns_sect, int, ns_rr *)); -int ns_parserr2 __P((ns_msg *, ns_sect, int, ns_rr2 *)); -int ns_sprintrr __P((const ns_msg *, const ns_rr *, - const char *, const char *, char *, size_t)); -int ns_sprintrrf __P((const u_char *, size_t, const char *, +int ns_msg_getflag(ns_msg, int); +uint16_t ns_get16(const u_char *); +uint32_t ns_get32(const u_char *); +void ns_put16(uint16_t, u_char *); +void ns_put32(uint32_t, u_char *); +int ns_initparse(const u_char *, int, ns_msg *); +int ns_skiprr(const u_char *, const u_char *, ns_sect, int); +int ns_parserr(ns_msg *, ns_sect, int, ns_rr *); +int ns_parserr2(ns_msg *, ns_sect, int, ns_rr2 *); +int ns_sprintrr(const ns_msg *, const ns_rr *, + const char *, const char *, char *, size_t); +int ns_sprintrrf(const u_char *, size_t, const char *, ns_class, ns_type, u_long, const u_char *, size_t, const char *, const char *, - char *, size_t)); -int ns_format_ttl __P((u_long, char *, size_t)); -int ns_parse_ttl __P((const char *, u_long *)); -u_int32_t ns_datetosecs __P((const char *cp, int *errp)); -int ns_name_ntol __P((const u_char *, u_char *, size_t)); -int ns_name_ntop __P((const u_char *, char *, size_t)); -int ns_name_pton __P((const char *, u_char *, size_t)); -int ns_name_pton2 __P((const char *, u_char *, size_t, size_t *)); -int ns_name_unpack __P((const u_char *, const u_char *, - const u_char *, u_char *, size_t)); -int ns_name_unpack2 __P((const u_char *, const u_char *, + char *, size_t); +int ns_format_ttl(u_long, char *, size_t); +int ns_parse_ttl(const char *, u_long *); +uint32_t ns_datetosecs(const char *cp, int *errp); +int ns_name_ntol(const u_char *, u_char *, size_t); +int ns_name_ntop(const u_char *, char *, size_t); +int ns_name_pton(const char *, u_char *, size_t); +int ns_name_pton2(const char *, u_char *, size_t, size_t *); +int ns_name_unpack(const u_char *, const u_char *, + const u_char *, u_char *, size_t); +int ns_name_unpack2(const u_char *, const u_char *, const u_char *, u_char *, size_t, - size_t *)); -int ns_name_pack __P((const u_char *, u_char *, int, - const u_char **, const u_char **)); -int ns_name_uncompress __P((const u_char *, const u_char *, - const u_char *, char *, size_t)); -int ns_name_compress __P((const char *, u_char *, size_t, - const u_char **, const u_char **)); -int ns_name_skip __P((const u_char **, const u_char *)); -void ns_name_rollback __P((const u_char *, const u_char **, - const u_char **)); + size_t *); +int ns_name_pack(const u_char *, u_char *, int, + const u_char **, const u_char **); +int ns_name_uncompress(const u_char *, const u_char *, + const u_char *, char *, size_t); +int ns_name_compress(const char *, u_char *, size_t, + const u_char **, const u_char **); +int ns_name_skip(const u_char **, const u_char *); +void ns_name_rollback(const u_char *, const u_char **, + const u_char **); +#ifndef __LIBC12_SOURCE__ +int ns_sign(u_char *, int *, int, int, void *, + const u_char *, int, u_char *, int *, time_t) + __RENAME(__ns_sign50); +int ns_sign2(u_char *, int *, int, int, void *, + const u_char *, int, u_char *, int *, time_t, + u_char **, u_char **) + __RENAME(__ns_sign250); +#endif ssize_t ns_name_length(ns_nname_ct, size_t); int ns_name_eq(ns_nname_ct, size_t, ns_nname_ct, size_t); int ns_name_owned(ns_namemap_ct, int, ns_namemap_ct, int); int ns_name_map(ns_nname_ct, size_t, ns_namemap_t, int); int ns_name_labels(ns_nname_ct, size_t); -int ns_sign __P((u_char *, int *, int, int, void *, - const u_char *, int, u_char *, int *, time_t)); -int ns_sign2 __P((u_char *, int *, int, int, void *, - const u_char *, int, u_char *, int *, time_t, - u_char **, u_char **)); -int ns_sign_tcp __P((u_char *, int *, int, int, - ns_tcp_tsig_state *, int)); -int ns_sign_tcp2 __P((u_char *, int *, int, int, +int ns_sign_tcp(u_char *, int *, int, int, + ns_tcp_tsig_state *, int); +int ns_sign_tcp2(u_char *, int *, int, int, ns_tcp_tsig_state *, int, - u_char **, u_char **)); -int ns_sign_tcp_init __P((void *, const u_char *, int, - ns_tcp_tsig_state *)); -u_char *ns_find_tsig __P((u_char *, u_char *)); -int ns_verify __P((u_char *, int *, void *, + u_char **, u_char **); +int ns_sign_tcp_init(void *, const u_char *, int, + ns_tcp_tsig_state *); +u_char *ns_find_tsig(u_char *, u_char *); +#ifndef __LIBC12_SOURCE__ +int ns_verify(u_char *, int *, void *, const u_char *, int, u_char *, int *, - time_t *, int)); -int ns_verify_tcp __P((u_char *, int *, ns_tcp_tsig_state *, int)); -int ns_verify_tcp_init __P((void *, const u_char *, int, - ns_tcp_tsig_state *)); -int ns_samedomain __P((const char *, const char *)); -int ns_subdomain __P((const char *, const char *)); -int ns_makecanon __P((const char *, char *, size_t)); -int ns_samename __P((const char *, const char *)); + time_t *, int) + __RENAME(__ns_verify50); +#endif +int ns_verify_tcp(u_char *, int *, ns_tcp_tsig_state *, int); +int ns_verify_tcp_init(void *, const u_char *, int, + ns_tcp_tsig_state *); +int ns_samedomain(const char *, const char *); +int ns_subdomain(const char *, const char *); +int ns_makecanon(const char *, char *, size_t); +int ns_samename(const char *, const char *); int ns_newmsg_init(u_char *buffer, size_t bufsiz, ns_newmsg *); int ns_newmsg_copy(ns_newmsg *, ns_msg *); -void ns_newmsg_id(ns_newmsg *handle, u_int16_t id); +void ns_newmsg_id(ns_newmsg *handle, uint16_t id); void ns_newmsg_flag(ns_newmsg *handle, ns_flag flag, u_int value); int ns_newmsg_q(ns_newmsg *handle, ns_nname_ct qname, ns_type qtype, ns_class qclass); int ns_newmsg_rr(ns_newmsg *handle, ns_sect sect, ns_nname_ct name, ns_type type, - ns_class rr_class, u_int32_t ttl, - u_int16_t rdlen, const u_char *rdata); + ns_class rr_class, uint32_t ttl, + uint16_t rdlen, const u_char *rdata); size_t ns_newmsg_done(ns_newmsg *handle); ssize_t ns_rdata_unpack(const u_char *, const u_char *, ns_type, const u_char *, size_t, u_char *, size_t); @@ -668,4 +679,3 @@ #endif #endif /* !_ARPA_NAMESER_H_ */ -/*! \file */ --- /home/reed/src/isc/libbind/libbind/include/arpa/inet.h 2013-06-05 09:33:54.000000000 -0500 +++ /usr/src/include/arpa/inet.h 2012-10-24 08:34:05.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: inet.h,v 1.24 2008/06/21 20:12:49 christos Exp $ */ + /* * ++Copyright++ 1983, 1993 * - @@ -51,72 +53,53 @@ /*% * @(#)inet.h 8.1 (Berkeley) 6/2/93 - * $Id: inet.h,v 1.4 2013-01-06 23:14:51 marka Exp $ + * Id: inet.h,v 1.3 2005/04/27 04:56:16 sra Exp */ -#ifndef _INET_H_ -#define _INET_H_ +#ifndef _ARPA_INET_H_ +#define _ARPA_INET_H_ /* External definitions for functions in inet(3) */ -#include -#if (!defined(BSD)) || (BSD < 199306) -# include -#else -# include -#endif +#include #include +#include +#include -#define inet_addr __inet_addr -#define inet_aton __inet_aton -#define inet_lnaof __inet_lnaof -#define inet_makeaddr __inet_makeaddr -#define inet_neta __inet_neta -#define inet_netof __inet_netof -#define inet_network __inet_network -#define inet_net_ntop __inet_net_ntop -#define inet_net_pton __inet_net_pton -#define inet_cidr_ntop __inet_cidr_ntop -#define inet_cidr_pton __inet_cidr_pton -#define inet_ntoa __inet_ntoa -#define inet_pton __inet_pton -#define inet_ntop __inet_ntop -#define inet_nsap_addr __inet_nsap_addr -#define inet_nsap_ntoa __inet_nsap_ntoa +#include -__BEGIN_DECLS -unsigned long inet_addr __P((const char *)); -int inet_aton __P((const char *, struct in_addr *)); -unsigned long inet_lnaof __P((struct in_addr)); -struct in_addr inet_makeaddr __P((u_long , u_long)); -char * inet_neta __P((u_long, char *, size_t)); -unsigned long inet_netof __P((struct in_addr)); -unsigned long inet_network __P((const char *)); -char *inet_net_ntop __P((int, const void *, int, char *, size_t)); -int inet_net_pton __P((int, const char *, void *, size_t)); -char *inet_cidr_ntop __P((int, const void *, int, char *, size_t)); -int inet_cidr_pton __P((int, const char *, void *, int *)); -/*const*/ char *inet_ntoa __P((struct in_addr)); -int inet_pton __P((int, const char *, void *)); -const char *inet_ntop __P((int, const void *, char *, size_t)); -u_int inet_nsap_addr __P((const char *, u_char *, int)); -char *inet_nsap_ntoa __P((int, const u_char *, char *)); -__END_DECLS +#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ + defined(_NETBSD_SOURCE) +#ifndef socklen_t +typedef __socklen_t socklen_t; +#define socklen_t __socklen_t +#endif +#endif /* _POSIX_C_SOURCE >= 200112 || XOPEN_SOURCE >= 520 || _NETBSD_SOURCE */ -#if defined(__hpux) && defined(_XOPEN_SOURCE_EXTENDED) -/* - * Macros for number representation conversion. - * - * netinet/in.h is another location for these macros - */ -#ifndef ntohl -#define ntohl(x) (x) -#define ntohs(x) (x) -#define htonl(x) (x) -#define htons(x) (x) +__BEGIN_DECLS +in_addr_t inet_addr(const char *); +in_addr_t inet_lnaof(struct in_addr); +struct in_addr inet_makeaddr(in_addr_t, in_addr_t); +in_addr_t inet_netof(struct in_addr); +in_addr_t inet_network(const char *); +char *inet_ntoa(struct in_addr); +#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ + defined(_NETBSD_SOURCE) +const char *inet_ntop(int, const void * __restrict, + char * __restrict, socklen_t); +int inet_pton(int, const char * __restrict, + void * __restrict); #endif +#if defined(_NETBSD_SOURCE) +int inet_aton(const char *, struct in_addr *); +char * inet_neta(u_long, char *, size_t); +char *inet_net_ntop(int, const void *, int, char *, size_t); +int inet_net_pton(int, const char *, void *, size_t); +char *inet_cidr_ntop(int, const void *, int, char *, size_t); +int inet_cidr_pton(int, const char *, void *, int *); +u_int inet_nsap_addr(const char *, u_char *, int); +char *inet_nsap_ntoa(int, const u_char *, char *); #endif +__END_DECLS -#endif /* !_INET_H_ */ - -/*! \file */ +#endif /* _ARPA_INET_H_ */ --- /home/reed/src/isc/libbind/libbind/include/arpa/nameser_compat.h 2013-06-05 09:33:54.000000000 -0500 +++ /usr/src/include/arpa/nameser_compat.h 2012-10-24 08:34:05.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: nameser_compat.h,v 1.5 2009/04/12 17:07:34 christos Exp $ */ + /* Copyright (c) 1983, 1989 * The Regents of the University of California. All rights reserved. * @@ -9,7 +11,11 @@ * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in the * documentation and/or other materials provided with the distribution. - * 3. Neither the name of the University nor the names of its contributors + * 3. All advertising materials mentioning features or use of this software + * must display the following acknowledgement: + * This product includes software developed by the University of + * California, Berkeley and its contributors. + * 4. Neither the name of the University nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. * @@ -28,13 +34,14 @@ /*% * from nameser.h 8.1 (Berkeley) 6/2/93 - * $Id: nameser_compat.h,v 1.9 2013-01-06 23:14:51 marka Exp $ + * Id: nameser_compat.h,v 1.8 2006/05/19 02:33:40 marka Exp */ #ifndef _ARPA_NAMESER_COMPAT_ #define _ARPA_NAMESER_COMPAT_ #define __BIND 19950621 /*%< (DEAD) interface version stamp. */ + #ifndef BYTE_ORDER #if (BSD >= 199103) # include @@ -45,7 +52,9 @@ #define LITTLE_ENDIAN 1234 /*%< least-significant byte first (vax, pc) */ #define BIG_ENDIAN 4321 /*%< most-significant byte first (IBM, net) */ #define PDP_ENDIAN 3412 /*%< LSB first in word, MSW first in long (pdp) */ + #if defined(vax) || defined(ns32000) || defined(sun386) || defined(i386) || \ + defined(MIPSEL) || defined(_MIPSEL) || defined(BIT_ZERO_ON_RIGHT) || \ defined(__i386__) || defined(__i386) || defined(__amd64__) || \ defined(__x86_64__) || defined(MIPSEL) || defined(_MIPSEL) || \ defined(BIT_ZERO_ON_RIGHT) || defined(__alpha__) || defined(__alpha) || \ @@ -225,4 +234,3 @@ #define PUTLONG NS_PUT32 #endif /* _ARPA_NAMESER_COMPAT_ */ -/*! \file */ --- /home/reed/src/isc/libbind/libbind/include/fd_setsize.h 2005-04-26 23:56:14.000000000 -0500 +++ /usr/src/lib/libc/include/fd_setsize.h 2004-05-20 17:26:22.000000000 -0500 @@ -1,10 +1,9 @@ #ifndef _FD_SETSIZE_H #define _FD_SETSIZE_H -/*% +/* * If you need a bigger FD_SETSIZE, this is NOT the place to set it. * This file is a fallback for BIND ports which don't specify their own. */ #endif /* _FD_SETSIZE_H */ -/*! \file */ --- /home/reed/src/isc/libbind/libbind/include/hesiod.h 2005-04-26 23:56:14.000000000 -0500 +++ /usr/src/include/hesiod.h 2012-10-24 08:34:03.000000000 -0500 @@ -1,39 +1,89 @@ +/* $NetBSD: hesiod.h,v 1.5 2008/04/28 20:22:54 martin Exp $ */ + +/*- + * Copyright (c) 1997, 1998, 1999 The NetBSD Foundation, Inc. + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS + * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED + * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS + * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR + * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF + * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS + * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN + * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE + * POSSIBILITY OF SUCH DAMAGE. + */ + /* - * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") - * Copyright (c) 1996,1999 by Internet Software Consortium. + * Copyright (c) 1996 by Internet Software Consortium. * * Permission to use, copy, modify, and distribute this software for any * purpose with or without fee is hereby granted, provided that the above * copyright notice and this permission notice appear in all copies. * - * THE SOFTWARE IS PROVIDED "AS IS" AND ISC DISCLAIMS ALL WARRANTIES - * WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF - * MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL ISC BE LIABLE FOR - * ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES - * WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN - * ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT - * OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + * THE SOFTWARE IS PROVIDED "AS IS" AND INTERNET SOFTWARE CONSORTIUM DISCLAIMS + * ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES + * OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL INTERNET SOFTWARE + * CONSORTIUM BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL + * DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR + * PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS + * ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS + * SOFTWARE. */ -/*! \file - * \brief - * This file is primarily maintained by and . - */ +#ifndef _HESIOD_H_ +#define _HESIOD_H_ -/* - * $Id: hesiod.h,v 1.4 2005/04/27 04:56:14 sra Exp $ - */ + /* Application-visible indication that we have the new interfaces */ + +#define HESIOD_INTERFACES + + /* Configuration information. */ + +#ifndef _PATH_HESIOD_CONF /* Configuration file. */ +#define _PATH_HESIOD_CONF "/etc/hesiod.conf" +#endif + +#define DEF_RHS "" /* Defaults if HESIOD_CONF */ +#define DEF_LHS "" /* file is not present. */ + + /* Error codes (for backwards compatibility) */ + +#define HES_ER_UNINIT -1 /* uninitialized */ +#define HES_ER_OK 0 /* no error */ +#define HES_ER_NOTFOUND 1 /* Hesiod name not found by server */ +#define HES_ER_CONFIG 2 /* local problem (no config file?) */ +#define HES_ER_NET 3 /* network problem */ + + /* Declaration of routines */ + +#include -#ifndef _HESIOD_H_INCLUDED -#define _HESIOD_H_INCLUDED +__BEGIN_DECLS +int hesiod_init (void **); +char **hesiod_resolve (void *, const char *, const char *); +void hesiod_free_list(void *, char **); +char *hesiod_to_bind (void *, const char *, const char *); +void hesiod_end (void *); -int hesiod_init __P((void **)); -void hesiod_end __P((void *)); -char * hesiod_to_bind __P((void *, const char *, const char *)); -char ** hesiod_resolve __P((void *, const char *, const char *)); -void hesiod_free_list __P((void *, char **)); -struct __res_state * __hesiod_res_get __P((void *)); -void __hesiod_res_set __P((void *, struct __res_state *, - void (*)(void *))); + /* backwards compatibility */ +int hes_init (void); +char *hes_to_bind (const char *, const char *); +char **hes_resolve (const char *, const char *); +int hes_error (void); +void hes_free (char **); +__END_DECLS -#endif /*_HESIOD_H_INCLUDED*/ +#endif /* ! _HESIOD_H_ */ --- /home/reed/src/isc/libbind/libbind/include/netdb.h 2013-06-05 09:33:54.000000000 -0500 +++ /usr/src/include/netdb.h 2012-10-24 08:34:04.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: netdb.h,v 1.64.8.1 2012/06/03 21:41:34 jdc Exp $ */ + /* * ++Copyright++ 1980, 1983, 1988, 1993 * - @@ -48,7 +50,7 @@ * - * Portions Copyright (C) 1995, 1996, 1997, and 1998 WIDE Project. * All rights reserved. - * + * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: @@ -64,7 +66,7 @@ * 4. Neither the name of the project nor the names of its contributors * may be used to endorse or promote products derived from this software * without specific prior written permission. - * + * * THIS SOFTWARE IS PROVIDED BY THE PROJECT AND CONTRIBUTORS ``AS IS'' AND * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE @@ -82,24 +84,34 @@ /* * @(#)netdb.h 8.1 (Berkeley) 6/2/93 - * $Id: netdb.h,v 1.23 2013-01-06 23:14:51 marka Exp $ + * Id: netdb.h,v 1.22 2008/02/28 05:34:17 marka Exp */ #ifndef _NETDB_H_ -#define _NETDB_H_ +#define _NETDB_H_ -#include -#include -#if (!defined(BSD)) || (BSD < 199306) -# include -#endif +#include +#include +#include #include -#include -#include -#include +#include +#include +/* + * Data types + */ +#ifndef socklen_t +typedef __socklen_t socklen_t; +#define socklen_t __socklen_t +#endif + +#ifdef _BSD_SIZE_T_ +typedef _BSD_SIZE_T_ size_t; +#undef _BSD_SIZE_T_ +#endif +#if defined(_NETBSD_SOURCE) #ifndef _PATH_HEQUIV -#define _PATH_HEQUIV "/etc/hosts.equiv" +#define _PATH_HEQUIV "/etc/hosts.equiv" #endif #ifndef _PATH_HOSTS #define _PATH_HOSTS "/etc/hosts" @@ -113,19 +125,21 @@ #ifndef _PATH_SERVICES #define _PATH_SERVICES "/etc/services" #endif - -#if (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) -#define __h_errno __h_errno_location +#ifndef _PATH_SERVICES_CDB +#define _PATH_SERVICES_CDB "/var/db/services.cdb" +#endif +#ifndef _PATH_SERVICES_DB +#define _PATH_SERVICES_DB "/var/db/services.db" +#endif #endif + __BEGIN_DECLS -extern int * __h_errno __P((void)); -__END_DECLS -#if defined(_REENTRANT) || \ - (__GLIBC__ > 2 || __GLIBC__ == 2 && __GLIBC_MINOR__ >= 3) -#define h_errno (*__h_errno()) -#else extern int h_errno; +extern int * __h_errno(void); +#ifdef _REENTRANT +#define h_errno (*__h_errno()) #endif +__END_DECLS /*% * Structures returned by network data base library. All addresses are @@ -149,7 +163,15 @@ char *n_name; /*%< official name of net */ char **n_aliases; /*%< alias list */ int n_addrtype; /*%< net address type */ - unsigned long n_net; /*%< network # */ +#if (defined(__sparc__) && defined(_LP64)) || \ + (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _BIG_ENDIAN)) + int __n_pad0; /* ABI compatibility */ +#endif + uint32_t n_net; /*%< network # */ +#if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) || \ + (defined(__sh__) && defined(_LP64) && (_BYTE_ORDER == _LITTLE_ENDIAN)) + int __n_pad0; /* ABI compatibility */ +#endif }; struct servent { @@ -165,44 +187,60 @@ int p_proto; /*%< protocol # */ }; -struct addrinfo { +/* + * Note: ai_addrlen used to be a size_t, per RFC 2553. + * In XNS5.2, and subsequently in POSIX-2001 and + * draft-ietf-ipngwg-rfc2553bis-02.txt it was changed to a socklen_t. + * To accommodate for this while preserving binary compatibility with the + * old interface, we prepend or append 32 bits of padding, depending on + * the (LP64) architecture's endianness. + * + * This should be deleted the next time the libc major number is + * incremented. + */ +#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ + defined(_NETBSD_SOURCE) +struct addrinfo { int ai_flags; /*%< AI_PASSIVE, AI_CANONNAME */ int ai_family; /*%< PF_xxx */ int ai_socktype; /*%< SOCK_xxx */ int ai_protocol; /*%< 0 or IPPROTO_xxx for IPv4 and IPv6 */ -#if defined(sun) && defined(_SOCKLEN_T) -#ifdef __sparcv9 - int _ai_pad; -#endif - socklen_t ai_addrlen; -#else - size_t ai_addrlen; /*%< length of ai_addr */ +#if defined(__sparc__) && defined(_LP64) + int __ai_pad0; /* ABI compatibility */ +#endif + socklen_t ai_addrlen; /*%< length of ai_addr */ +#if defined(__alpha__) || (defined(__i386__) && defined(_LP64)) + int __ai_pad0; /* ABI compatibility */ #endif -#ifdef __linux - struct sockaddr *ai_addr; /*%< binary address */ - char *ai_canonname; /*%< canonical name for hostname */ -#else char *ai_canonname; /*%< canonical name for hostname */ struct sockaddr *ai_addr; /*%< binary address */ -#endif struct addrinfo *ai_next; /*%< next structure in linked list */ }; +#endif /*% * Error return codes from gethostbyname() and gethostbyaddr() * (left in extern int h_errno). */ +#if defined(_NETBSD_SOURCE) #define NETDB_INTERNAL -1 /*%< see errno */ #define NETDB_SUCCESS 0 /*%< no problem */ +#endif +#define NO_ADDRESS NO_DATA /* no address, look for MX record */ #define HOST_NOT_FOUND 1 /*%< Authoritative Answer Host not found */ #define TRY_AGAIN 2 /*%< Non-Authoritive Host not found, or SERVERFAIL */ #define NO_RECOVERY 3 /*%< Non recoverable errors, FORMERR, REFUSED, NOTIMP */ #define NO_DATA 4 /*%< Valid name, no data record of requested type */ +#if defined(_NETBSD_SOURCE) #define NO_ADDRESS NO_DATA /*%< no address, look for MX record */ +#endif + /* * Error return codes from getaddrinfo() */ +#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ + defined(_NETBSD_SOURCE) #define EAI_ADDRFAMILY 1 /*%< address family for hostname not supported */ #define EAI_AGAIN 2 /*%< temporary failure in name resolution */ #define EAI_BADFLAGS 3 /*%< invalid value for ai_flags */ @@ -214,31 +252,37 @@ #define EAI_SERVICE 9 /*%< servname not supported for ai_socktype */ #define EAI_SOCKTYPE 10 /*%< ai_socktype not supported */ #define EAI_SYSTEM 11 /*%< system error returned in errno */ -#define EAI_BADHINTS 12 -#define EAI_PROTOCOL 13 -#define EAI_MAX 14 +#define EAI_BADHINTS 12 /* invalid value for hints */ +#define EAI_PROTOCOL 13 /* resolved protocol is unknown */ +#define EAI_OVERFLOW 14 /* argument buffer overflow */ +#define EAI_MAX 15 +#endif /* _POSIX_C_SOURCE >= 200112 || _XOPEN_SOURCE >= 520 || _NETBSD_SOURCE */ /*% * Flag values for getaddrinfo() */ -#define AI_PASSIVE 0x00000001 -#define AI_CANONNAME 0x00000002 -#define AI_NUMERICHOST 0x00000004 -#define AI_MASK 0x00000007 - -/*% - * Flag values for getipnodebyname() - */ -#define AI_V4MAPPED 0x00000008 -#define AI_ALL 0x00000010 -#define AI_ADDRCONFIG 0x00000020 -#define AI_DEFAULT (AI_V4MAPPED|AI_ADDRCONFIG) +#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ + defined(_NETBSD_SOURCE) +#define AI_PASSIVE 0x00000001 /* get address to use bind() */ +#define AI_CANONNAME 0x00000002 /* fill ai_canonname */ +#define AI_NUMERICHOST 0x00000004 /* prevent host name resolution */ +#define AI_NUMERICSERV 0x00000008 /* prevent service name resolution */ +/* valid flags for addrinfo (not a standard def, apps should not use it) */ +#define AI_MASK \ + (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | \ + AI_ADDRCONFIG) +#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */ +#endif +#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ + defined(_NETBSD_SOURCE) /*% * Constants for getnameinfo() */ +#if defined(_NETBSD_SOURCE) #define NI_MAXHOST 1025 #define NI_MAXSERV 32 +#endif /*% * Flag values for getnameinfo() @@ -249,330 +293,65 @@ #define NI_NUMERICSERV 0x00000008 #define NI_DGRAM 0x00000010 #define NI_WITHSCOPEID 0x00000020 -#define NI_NUMERICSCOPE 0x00000040 +#define NI_NUMERICSCOPE 0x00000040 /*% * Scope delimit character */ -#define SCOPE_DELIMITER '%' - - -#ifdef _REENTRANT -#if defined (__hpux) || defined(__osf__) || defined(_AIX) -#define _MAXALIASES 35 -#define _MAXLINELEN 1024 -#define _MAXADDRS 35 -#define _HOSTBUFSIZE (BUFSIZ + 1) - -struct hostent_data { - struct in_addr host_addr; - char *h_addr_ptrs[_MAXADDRS + 1]; - char hostaddr[_MAXADDRS]; - char hostbuf[_HOSTBUFSIZE]; - char *host_aliases[_MAXALIASES]; - char *host_addrs[2]; - FILE *hostf; -#ifdef __osf__ - int svc_gethostflag; - int svc_gethostbind; -#endif -#ifdef __hpux - short _nsw_src; - short _flags; - char *current; - int currentlen; +#if defined(_NETBSD_SOURCE) +#define SCOPE_DELIMITER '%' #endif -}; +#endif /* (_POSIX_C_SOURCE - 0) >= 200112L || ... */ -struct netent_data { - FILE *net_fp; -#if defined(__osf__) || defined(_AIX) - char line[_MAXLINELEN]; -#endif -#ifdef __hpux - char line[_MAXLINELEN+1]; -#endif - char *net_aliases[_MAXALIASES]; -#ifdef __osf__ - int _net_stayopen; - int svc_getnetflag; -#endif -#ifdef __hpux - short _nsw_src; - short _flags; - char *current; - int currentlen; -#endif -#ifdef _AIX - int _net_stayopen; - char *current; - int currentlen; - void *_net_reserv1; /* reserved for future use */ - void *_net_reserv2; /* reserved for future use */ -#endif -}; - -struct protoent_data { - FILE *proto_fp; -#ifdef _AIX - int _proto_stayopen; - char line[_MAXLINELEN]; -#endif -#ifdef __osf__ - char line[1024]; -#endif -#ifdef __hpux - char line[_MAXLINELEN+1]; -#endif - char *proto_aliases[_MAXALIASES]; -#ifdef __osf__ - int _proto_stayopen; - int svc_getprotoflag; -#endif -#ifdef __hpux - short _nsw_src; - short _flags; - char *current; - int currentlen; -#endif -#ifdef _AIX - int currentlen; - char *current; - void *_proto_reserv1; /* reserved for future use */ - void *_proto_reserv2; /* reserved for future use */ -#endif -}; - -struct servent_data { - FILE *serv_fp; -#if defined(__osf__) || defined(_AIX) - char line[_MAXLINELEN]; -#endif -#ifdef __hpux - char line[_MAXLINELEN+1]; -#endif - char *serv_aliases[_MAXALIASES]; -#ifdef __osf__ - int _serv_stayopen; - int svc_getservflag; -#endif -#ifdef __hpux - short _nsw_src; - short _flags; - char *current; - int currentlen; -#endif -#ifdef _AIX - int _serv_stayopen; - char *current; - int currentlen; - void *_serv_reserv1; /* reserved for future use */ - void *_serv_reserv2; /* reserved for future use */ -#endif -}; -#endif -#endif __BEGIN_DECLS -void endhostent __P((void)); -void endnetent __P((void)); -void endprotoent __P((void)); -void endservent __P((void)); -void freehostent __P((struct hostent *)); -struct hostent *gethostbyaddr __P((const char *, int, int)); -struct hostent *gethostbyname __P((const char *)); -struct hostent *gethostbyname2 __P((const char *, int)); -struct hostent *gethostent __P((void)); -struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *)); -struct hostent *getipnodebyname __P((const char *, int, int, int *)); -struct netent *getnetbyaddr __P((unsigned long, int)); -struct netent *getnetbyname __P((const char *)); -struct netent *getnetent __P((void)); -struct protoent *getprotobyname __P((const char *)); -struct protoent *getprotobynumber __P((int)); -struct protoent *getprotoent __P((void)); -struct servent *getservbyname __P((const char *, const char *)); -struct servent *getservbyport __P((int, const char *)); -struct servent *getservent __P((void)); -void herror __P((const char *)); -const char *hstrerror __P((int)); -void sethostent __P((int)); -/* void sethostfile __P((const char *)); */ -void setnetent __P((int)); -void setprotoent __P((int)); -void setservent __P((int)); -int getaddrinfo __P((const char *, const char *, - const struct addrinfo *, struct addrinfo **)); -int getnameinfo __P((const struct sockaddr *, size_t, char *, - size_t, char *, size_t, int)); -void freeaddrinfo __P((struct addrinfo *)); -const char *gai_strerror __P((int)); -struct hostent *getipnodebyname __P((const char *, int, int, int *)); -struct hostent *getipnodebyaddr __P((const void *, size_t, int, int *)); -void freehostent __P((struct hostent *)); -#ifdef __GLIBC__ -int getnetgrent __P((/* const */ char **, /* const */ char **, - /* const */ char **)); -void setnetgrent __P((const char *)); -void endnetgrent __P((void)); -int innetgr __P((const char *, const char *, const char *, - const char *)); -#endif - -#ifdef _REENTRANT -#if defined(__hpux) || defined(__osf__) || defined(_AIX) -int gethostbyaddr_r __P((const char *, int, int, struct hostent *, - struct hostent_data *)); -int gethostbyname_r __P((const char *, struct hostent *, - struct hostent_data *)); -int gethostent_r __P((struct hostent *, struct hostent_data *)); -#if defined(_AIX) -void sethostent_r __P((int, struct hostent_data *)); -#else -int sethostent_r __P((int, struct hostent_data *)); -#endif -#if defined(__hpux) -int endhostent_r __P((struct hostent_data *)); -#else -void endhostent_r __P((struct hostent_data *)); -#endif - -#if defined(__hpux) || defined(__osf__) -int getnetbyaddr_r __P((int, int, - struct netent *, struct netent_data *)); -#else -int getnetbyaddr_r __P((long, int, - struct netent *, struct netent_data *)); -#endif -int getnetbyname_r __P((const char *, - struct netent *, struct netent_data *)); -int getnetent_r __P((struct netent *, struct netent_data *)); -int setnetent_r __P((int, struct netent_data *)); -#ifdef __hpux -int endnetent_r __P((struct netent_data *buffer)); -#else -void endnetent_r __P((struct netent_data *buffer)); -#endif - -int getprotobyname_r __P((const char *, - struct protoent *, struct protoent_data *)); -int getprotobynumber_r __P((int, - struct protoent *, struct protoent_data *)); -int getprotoent_r __P((struct protoent *, struct protoent_data *)); -int setprotoent_r __P((int, struct protoent_data *)); -#ifdef __hpux -int endprotoent_r __P((struct protoent_data *)); -#else -void endprotoent_r __P((struct protoent_data *)); -#endif - -int getservbyname_r __P((const char *, const char *, - struct servent *, struct servent_data *)); -int getservbyport_r __P((int, const char *, - struct servent *, struct servent_data *)); -int getservent_r __P((struct servent *, struct servent_data *)); -int setservent_r __P((int, struct servent_data *)); -#ifdef __hpux -int endservent_r __P((struct servent_data *)); -#else -void endservent_r __P((struct servent_data *)); -#endif -#ifdef _AIX -int setnetgrent_r __P((char *, void **)); -void endnetgrent_r __P((void **)); -/* - * Note: AIX's netdb.h declares innetgr_r() as: - * int innetgr_r(char *, char *, char *, char *, struct innetgr_data *); - */ -int innetgr_r __P((const char *, const char *, const char *, - const char *)); -#endif -#else - /* defined(sun) || defined(bsdi) */ -#if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) -int gethostbyaddr_r __P((const char *, int, int, struct hostent *, - char *, size_t, struct hostent **, int *)); -int gethostbyname_r __P((const char *, struct hostent *, - char *, size_t, struct hostent **, int *)); -int gethostent_r __P((struct hostent *, char *, size_t, - struct hostent **, int *)); -#else -struct hostent *gethostbyaddr_r __P((const char *, int, int, struct hostent *, - char *, int, int *)); -struct hostent *gethostbyname_r __P((const char *, struct hostent *, - char *, int, int *)); -struct hostent *gethostent_r __P((struct hostent *, char *, int, int *)); -#endif -void sethostent_r __P((int)); -void endhostent_r __P((void)); - -#if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) -int getnetbyname_r __P((const char *, struct netent *, - char *, size_t, struct netent **, int*)); -int getnetbyaddr_r __P((unsigned long int, int, struct netent *, - char *, size_t, struct netent **, int*)); -int getnetent_r __P((struct netent *, char *, size_t, struct netent **, int*)); -#else -struct netent *getnetbyname_r __P((const char *, struct netent *, - char *, int)); -struct netent *getnetbyaddr_r __P((long, int, struct netent *, - char *, int)); -struct netent *getnetent_r __P((struct netent *, char *, int)); -#endif -void setnetent_r __P((int)); -void endnetent_r __P((void)); - -#if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) -int getprotobyname_r __P((const char *, struct protoent *, char *, - size_t, struct protoent **)); -int getprotobynumber_r __P((int, struct protoent *, char *, size_t, - struct protoent **)); -int getprotoent_r __P((struct protoent *, char *, size_t, struct protoent **)); -#else -struct protoent *getprotobyname_r __P((const char *, - struct protoent *, char *, int)); -struct protoent *getprotobynumber_r __P((int, - struct protoent *, char *, int)); -struct protoent *getprotoent_r __P((struct protoent *, char *, int)); -#endif -void setprotoent_r __P((int)); -void endprotoent_r __P((void)); - -#if defined(__GLIBC__) || defined(__FreeBSD__) && (__FreeBSD_version + 0 >= 601103) -int getservbyname_r __P((const char *name, const char *, - struct servent *, char *, size_t, struct servent **)); -int getservbyport_r __P((int port, const char *, - struct servent *, char *, size_t, struct servent **)); -int getservent_r __P((struct servent *, char *, size_t, struct servent **)); -#else -struct servent *getservbyname_r __P((const char *name, const char *, - struct servent *, char *, int)); -struct servent *getservbyport_r __P((int port, const char *, - struct servent *, char *, int)); -struct servent *getservent_r __P((struct servent *, char *, int)); -#endif -void setservent_r __P((int)); -void endservent_r __P((void)); - -#ifdef __GLIBC__ -int getnetgrent_r __P((char **, char **, char **, char *, size_t)); -#endif - -#endif +void endhostent(void); +void endnetent(void); +void endprotoent(void); +void endservent(void); +#if (_XOPEN_SOURCE - 0) >= 520 && (_XOPEN_SOURCE - 0) < 600 || \ + defined(_NETBSD_SOURCE) +#if 0 /* we do not ship this */ +void freehostent(struct hostent *); +#endif +#endif +struct hostent *gethostbyaddr(const char *, socklen_t, int); +struct hostent *gethostbyname(const char *); +#if defined(_NETBSD_SOURCE) +struct hostent *gethostbyname2(const char *, int); +#endif +struct hostent *gethostent(void); +struct netent *getnetbyaddr(uint32_t, int); +struct netent *getnetbyname(const char *); +struct netent *getnetent(void); +struct protoent *getprotobyname(const char *); +struct protoent *getprotobynumber(int); +struct protoent *getprotoent(void); +struct servent *getservbyname(const char *, const char *); +struct servent *getservbyport(int, const char *); +struct servent *getservent(void); +#if defined(_NETBSD_SOURCE) +void herror(const char *); +const char *hstrerror(int); +#endif +void sethostent(int); +#if defined(_NETBSD_SOURCE) +/* void sethostfile(const char *); */ +#endif +void setnetent(int); +void setprotoent(int); +void setservent(int); +#if (_POSIX_C_SOURCE - 0) >= 200112L || (_XOPEN_SOURCE - 0) >= 520 || \ + defined(_NETBSD_SOURCE) +int getaddrinfo(const char * __restrict, const char * __restrict, + const struct addrinfo * __restrict, + struct addrinfo ** __restrict); +int getnameinfo(const struct sockaddr * __restrict, socklen_t, + char * __restrict, socklen_t, + char * __restrict, socklen_t, int); +struct addrinfo *allocaddrinfo(socklen_t); +void freeaddrinfo(struct addrinfo *); +const char *gai_strerror(int); #endif __END_DECLS -/* This is nec'y to make this include file properly replace the sun version. */ -#ifdef sun -#ifdef __GNU_LIBRARY__ -#include -#else -struct rpcent { - char *r_name; /*%< name of server for this rpc program */ - char **r_aliases; /*%< alias list */ - int r_number; /*%< rpc program number */ -}; -struct rpcent *getrpcbyname(), *getrpcbynumber(), *getrpcent(); -#endif /* __GNU_LIBRARY__ */ -#endif /* sun */ #endif /* !_NETDB_H_ */ -/*! \file */ --- /home/reed/src/isc/libbind/libbind/include/netgroup.h 2005-04-26 23:56:15.000000000 -0500 +++ /usr/src/include/netgroup.h 2012-10-24 08:34:05.000000000 -0500 @@ -1,26 +1,71 @@ -#ifndef netgroup_h -#define netgroup_h -#ifndef __GLIBC__ +/* $NetBSD: netgroup.h,v 1.10 2009/10/21 01:07:45 snj Exp $ */ /* - * The standard is crazy. These values "belong" to getnetgrent() and - * shouldn't be altered by the caller. + * Copyright (c) 1994 Christos Zoulas + * All rights reserved. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions + * are met: + * 1. Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * 2. Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * + * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS + * OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + * SUCH DAMAGE. */ -int getnetgrent __P((/* const */ char **, /* const */ char **, - /* const */ char **)); -int getnetgrent_r __P((char **, char **, char **, char *, int)); +#ifndef _NETGROUP_H_ +#define _NETGROUP_H_ -void endnetgrent __P((void)); +#include -#ifdef __osf__ -int innetgr __P((char *, char *, char *, char *)); -void setnetgrent __P((char *)); -#else -void setnetgrent __P((const char *)); -int innetgr __P((const char *, const char *, const char *, const char *)); -#endif -#endif -#endif +#define _PATH_NETGROUP "/etc/netgroup" -/*! \file */ +#define _PATH_NETGROUP_DB "/var/db/netgroup.db" + +#define _PATH_NETGROUP_MKDB "/usr/sbin/netgroup_mkdb" + +#define _NG_KEYBYNAME '1' /* stored by name */ +#define _NG_KEYBYUSER '2' /* stored by user */ +#define _NG_KEYBYHOST '3' /* stored by host */ + +#define _NG_ERROR -1 +#define _NG_NONE 0 +#define _NG_NAME 1 +#define _NG_GROUP 2 + +struct netgroup { + __aconst char *ng_host; /* host name */ + __aconst char *ng_user; /* user name */ + __aconst char *ng_domain; /* domain name */ + struct netgroup *ng_next; /* thread */ +}; + +__BEGIN_DECLS +void setnetgrent (const char *); +int getnetgrent (const char **, const char **, const char **); +void endnetgrent (void); +int innetgr (const char *, const char *, const char *, + const char *); +#ifdef _NETGROUP_PRIVATE +char *_ng_makekey(const char *, const char *, size_t); +int _ng_parse(char **, char **, struct netgroup **); +void _ng_print(char *, size_t, const struct netgroup *); +void _ng_cycle(const char *, const StringList *); +#endif /* _NETGROUP_PRIVATE */ + +__END_DECLS + +#endif /* !_NETGROUP_H_ */ --- /home/reed/src/isc/libbind/libbind/include/res_update.h 2005-04-26 23:56:15.000000000 -0500 +++ /usr/src/include/res_update.h 2012-10-24 08:34:05.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: res_update.h,v 1.7 2009/04/12 17:07:33 christos Exp $ */ + /* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1999 by Internet Software Consortium, Inc. @@ -16,14 +18,12 @@ */ /* - * $Id: res_update.h,v 1.3 2005/04/27 04:56:15 sra Exp $ + * Id: res_update.h,v 1.3 2005/04/27 04:56:15 sra Exp */ #ifndef __RES_UPDATE_H #define __RES_UPDATE_H -/*! \file */ - #include #include #include @@ -38,7 +38,7 @@ char * r_dname; /*%< owner of the RR */ ns_class r_class; /*%< class number */ ns_type r_type; /*%< type number */ - u_int32_t r_ttl; /*%< time to live */ + uint32_t r_ttl; /*%< time to live */ u_char * r_data; /*%< rdata fields as text string */ u_int r_size; /*%< size of r_data field */ int r_opcode; /*%< type of operation */ @@ -57,13 +57,11 @@ #define res_nmkupdate __res_nmkupdate #define res_nupdate __res_nupdate -int res_mkupdate __P((ns_updrec *, u_char *, int)); -int res_update __P((ns_updrec *)); -ns_updrec * res_mkupdrec __P((int, const char *, u_int, u_int, u_long)); -void res_freeupdrec __P((ns_updrec *)); -int res_nmkupdate __P((res_state, ns_updrec *, u_char *, int)); -int res_nupdate __P((res_state, ns_updrec *, ns_tsig_key *)); +int res_mkupdate(ns_updrec *, u_char *, int); +int res_update(ns_updrec *); +ns_updrec * res_mkupdrec(int, const char *, u_int, u_int, u_long); +void res_freeupdrec(ns_updrec *); +int res_nmkupdate(res_state, ns_updrec *, u_char *, int); +int res_nupdate(res_state, ns_updrec *, ns_tsig_key *); #endif /*__RES_UPDATE_H*/ - -/*! \file */ --- /home/reed/src/isc/libbind/libbind/include/resolv.h 2013-06-05 09:33:54.000000000 -0500 +++ /usr/src/include/resolv.h 2012-10-24 08:34:05.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: resolv.h,v 1.38 2009/10/24 17:23:34 christos Exp $ */ + /* * Portions Copyright (C) 2004, 2005, 2008, 2009 Internet Systems Consortium, Inc. ("ISC") * Portions Copyright (C) 1995-2003 Internet Software Consortium. @@ -46,7 +48,7 @@ /*% * @(#)resolv.h 8.1 (Berkeley) 6/2/93 - * $Id: resolv.h,v 1.33 2013-01-06 23:14:51 marka Exp $ + * Id: resolv.h,v 1.30 2009/03/03 01:52:48 each Exp */ #ifndef _RESOLV_H_ @@ -56,7 +58,7 @@ #if (!defined(BSD)) || (BSD < 199306) # include #else -# include +#include #endif #include #include @@ -95,7 +97,7 @@ #define RES_SET_H_ERRNO(r,x) __h_errno_set(r,x) struct __res_state; /*%< forward */ __BEGIN_DECLS -void __h_errno_set(struct __res_state *res, int err); +void __h_errno_set(struct __res_state *, int); __END_DECLS /*% @@ -111,21 +113,13 @@ typedef enum { res_goahead, res_nextns, res_modified, res_done, res_error } res_sendhookact; -#ifndef __PMT -#if defined(__STDC__) || defined(__cplusplus) -#define __PMT(args) args -#else -#define __PMT(args) () -#endif -#endif - -typedef res_sendhookact (*res_send_qhook)__PMT((struct sockaddr * const *, - const u_char **, int *, - u_char *, int, int *)); - -typedef res_sendhookact (*res_send_rhook)__PMT((const struct sockaddr *, - const u_char *, int, u_char *, - int, int *)); +typedef res_sendhookact (*res_send_qhook)(struct sockaddr * const *, + const u_char **, int *, + u_char *, int, int *); + +typedef res_sendhookact (*res_send_rhook)(const struct sockaddr *, + const u_char *, int, u_char *, + int, int *); struct res_sym { int number; /*%< Identifying number, like T_MX */ @@ -147,6 +141,7 @@ #define RES_MAXRETRY 5 /*%< only for resolv.conf/RES_OPTIONS */ #define RES_DFLRETRY 2 /*%< Default #/tries. */ #define RES_MAXTIME 65535 /*%< Infinity, in milliseconds. */ + struct __res_state_ext; struct __res_state { @@ -174,8 +169,11 @@ char unused[3]; struct { struct in_addr addr; - u_int32_t mask; + uint32_t mask; } sort_list[MAXRESOLVSORT]; +#ifdef __OLD_RES_STATE + char lookups[4]; +#else res_send_qhook qhook; /*%< query hook */ res_send_rhook rhook; /*%< response hook */ int res_h_errno; /*%< last one set for this context */ @@ -184,17 +182,16 @@ u_int _pad; /*%< make _u 64 bit aligned */ union { /* On an 32-bit arch this means 512b total. */ - char pad[72 - 4*sizeof (int) - 2*sizeof (void *)]; + char pad[56 - 4*sizeof (int) - 3*sizeof (void *)]; struct { - u_int16_t nscount; - u_int16_t nstimes[MAXNS]; /*%< ms. */ + uint16_t nscount; + uint16_t nstimes[MAXNS]; /*%< ms. */ int nssocks[MAXNS]; - /*% extention for IPv6 */ - struct __res_state_ext *ext; - /*% PRIVATE: random state */ - u_char _rnd[16]; + struct __res_state_ext *ext; /*%< extention for IPv6 */ } _ext; } _u; + u_char *_rnd; /*%< PRIVATE: random state */ +#endif }; typedef struct __res_state *res_state; @@ -209,7 +206,7 @@ #else int32_t __align32; /*%< 32bit alignment */ #endif - char __space[128]; /*%< max size */ + char __space[128]; /* max size */ }; /*% @@ -283,21 +280,18 @@ /* 0x00010000 */ /* Things involving an internal (static) resolver context. */ -#ifdef _REENTRANT __BEGIN_DECLS +extern struct __res_state *__res_get_state(void); +extern void __res_put_state(struct __res_state *); + +/* + * Source and Binary compatibility; _res will not work properly + * with multi-threaded programs. + */ extern struct __res_state *__res_state(void); -__END_DECLS #define _res (*__res_state()) -#else -#ifdef __linux -__BEGIN_DECLS -extern struct __res_state * __res_state(void); + __END_DECLS -#endif -#ifndef __BIND_NOSTATIC -extern struct __res_state _res; -#endif -#endif #ifndef __BIND_NOSTATIC #define fp_nquery __fp_nquery @@ -305,32 +299,39 @@ #define hostalias __hostalias #define p_query __p_query #define res_close __res_close -#define res_init __res_init #define res_isourserver __res_isourserver -#define res_mkquery __res_mkquery -#define res_query __res_query -#define res_querydomain __res_querydomain -#define res_search __res_search +#define res_opt __res_opt +#define res_querydomain __res_querydomain #define res_send __res_send #define res_sendsigned __res_sendsigned +#ifdef notdef +/* NetBSD protects these via weak symbols. */ +#define res_init __res_init +#define res_query __res_query +#define res_mkquery __res_mkquery +#define dn_expand __dn_expand +#define res_search __res_search +#endif + __BEGIN_DECLS -void fp_nquery __P((const u_char *, int, FILE *)); -void fp_query __P((const u_char *, FILE *)); -const char * hostalias __P((const char *)); -void p_query __P((const u_char *)); -void res_close __P((void)); -int res_init __P((void)); -int res_isourserver __P((const struct sockaddr_in *)); -int res_mkquery __P((int, const char *, int, int, const u_char *, - int, const u_char *, u_char *, int)); -int res_query __P((const char *, int, int, u_char *, int)); -int res_querydomain __P((const char *, const char *, int, int, - u_char *, int)); -int res_search __P((const char *, int, int, u_char *, int)); -int res_send __P((const u_char *, int, u_char *, int)); -int res_sendsigned __P((const u_char *, int, ns_tsig_key *, - u_char *, int)); +void fp_nquery(const u_char *, int, FILE *); +void fp_query(const u_char *, FILE *); +const char * hostalias(const char *); +void p_query(const u_char *); +void res_close(void); +int res_init(void); +int res_opt(int, u_char *, int, int); +int res_isourserver(const struct sockaddr_in *); +int res_mkquery(int, const char *, int, int, const u_char *, + int, const u_char *, u_char *, int); +int res_query(const char *, int, int, u_char *, int); +int res_querydomain(const char *, const char *, int, int, + u_char *, int); +int res_search(const char *, int, int, u_char *, int); +int res_send(const u_char *, int, u_char *, int); +int res_sendsigned(const u_char *, int, ns_tsig_key *, + u_char *, int); __END_DECLS #endif @@ -353,7 +354,6 @@ #define b64_pton __b64_pton #define dn_comp __dn_comp #define dn_count_labels __dn_count_labels -#define dn_expand __dn_expand #define dn_skipname __dn_skipname #define fp_resstat __fp_resstat #define loc_aton __loc_aton @@ -372,6 +372,7 @@ #define p_sockun __p_sockun #define putlong __putlong #define putshort __putshort +#define res_check __res_check #define res_dnok __res_dnok #define res_findzonecut __res_findzonecut #define res_findzonecut2 __res_findzonecut2 @@ -417,96 +418,92 @@ #define res_servicename __res_servicename #define res_servicenumber __res_servicenumber __BEGIN_DECLS -int res_hnok __P((const char *)); -int res_ownok __P((const char *)); -int res_mailok __P((const char *)); -int res_dnok __P((const char *)); -int sym_ston __P((const struct res_sym *, const char *, int *)); -const char * sym_ntos __P((const struct res_sym *, int, int *)); -const char * sym_ntop __P((const struct res_sym *, int, int *)); -int b64_ntop __P((u_char const *, size_t, char *, size_t)); -int b64_pton __P((char const *, u_char *, size_t)); -int loc_aton __P((const char *, u_char *)); -const char * loc_ntoa __P((const u_char *, char *)); -int dn_skipname __P((const u_char *, const u_char *)); -void putlong __P((u_int32_t, u_char *)); -void putshort __P((u_int16_t, u_char *)); +int res_hnok(const char *); +int res_ownok(const char *); +int res_mailok(const char *); +struct timespec; +int res_check(res_state, struct timespec *); +int res_dnok(const char *); +int sym_ston(const struct res_sym *, const char *, int *); +const char * sym_ntos(const struct res_sym *, int, int *); +const char * sym_ntop(const struct res_sym *, int, int *); +int b64_ntop(u_char const *, size_t, char *, size_t); +int b64_pton(char const *, u_char *, size_t); +int loc_aton(const char *, u_char *); +const char * loc_ntoa(const u_char *, char *); +int dn_skipname(const u_char *, const u_char *); +void putlong(uint32_t, u_char *); +void putshort(uint16_t, u_char *); #ifndef __ultrix__ -u_int16_t _getshort __P((const u_char *)); -u_int32_t _getlong __P((const u_char *)); +uint16_t _getshort(const u_char *); +uint32_t _getlong(const u_char *); #endif -const char * p_class __P((int)); -const char * p_time __P((u_int32_t)); -const char * p_type __P((int)); -const char * p_rcode __P((int)); -const char * p_sockun __P((union res_sockaddr_union, char *, size_t)); -const u_char * p_cdnname __P((const u_char *, const u_char *, int, FILE *)); -const u_char * p_cdname __P((const u_char *, const u_char *, FILE *)); -const u_char * p_fqnname __P((const u_char *, const u_char *, - int, char *, int)); -const u_char * p_fqname __P((const u_char *, const u_char *, FILE *)); -const char * p_option __P((u_long)); -char * p_secstodate __P((u_long)); -int dn_count_labels __P((const char *)); -int dn_comp __P((const char *, u_char *, int, - u_char **, u_char **)); -int dn_expand __P((const u_char *, const u_char *, const u_char *, - char *, int)); -void res_rndinit __P((res_state)); -u_int res_randomid __P((void)); -u_int res_nrandomid __P((res_state)); -int res_nameinquery __P((const char *, int, int, const u_char *, - const u_char *)); -int res_queriesmatch __P((const u_char *, const u_char *, - const u_char *, const u_char *)); -const char * p_section __P((int, int)); +const char * p_class(int); +const char * p_time(uint32_t); +const char * p_type(int); +const char * p_rcode(int); +const char * p_sockun(union res_sockaddr_union, char *, size_t); +const u_char * p_cdnname(const u_char *, const u_char *, int, FILE *); +const u_char * p_cdname(const u_char *, const u_char *, FILE *); +const u_char * p_fqnname(const u_char *, const u_char *, + int, char *, int); +const u_char * p_fqname(const u_char *, const u_char *, FILE *); +const char * p_option(u_long); +char * p_secstodate(u_long); +int dn_count_labels(const char *); +int dn_comp(const char *, u_char *, int, u_char **, u_char **); +int dn_expand(const u_char *, const u_char *, const u_char *, + char *, int); +void res_rndinit(res_state); +u_int res_randomid(void); +u_int res_nrandomid(res_state); +int res_nameinquery(const char *, int, int, const u_char *, + const u_char *); +int res_queriesmatch(const u_char *, const u_char *, + const u_char *, const u_char *); +const char * p_section(int, int); /* Things involving a resolver context. */ -int res_ninit __P((res_state)); -int res_nisourserver __P((const res_state, - const struct sockaddr_in *)); -void fp_resstat __P((const res_state, FILE *)); -void res_pquery __P((const res_state, const u_char *, int, FILE *)); -const char * res_hostalias __P((const res_state, const char *, - char *, size_t)); -int res_nquery __P((res_state, const char *, int, int, - u_char *, int)); -int res_nsearch __P((res_state, const char *, int, int, u_char *, - int)); -int res_nquerydomain __P((res_state, const char *, const char *, - int, int, u_char *, int)); -int res_nmkquery __P((res_state, int, const char *, int, int, +int res_ninit(res_state); +int res_nisourserver(const res_state, const struct sockaddr_in *); +void fp_resstat(const res_state, FILE *); +void res_pquery(const res_state, const u_char *, int, FILE *); +const char * res_hostalias(const res_state, const char *, char *, size_t); +int res_nquery(res_state, const char *, int, int, u_char *, int); +int res_nsearch(res_state, const char *, int, int, u_char *, int); +int res_nquerydomain(res_state, const char *, const char *, + int, int, u_char *, int); +int res_nmkquery(res_state, int, const char *, int, int, const u_char *, int, const u_char *, - u_char *, int)); -int res_nsend __P((res_state, const u_char *, int, u_char *, int)); -int res_nsendsigned __P((res_state, const u_char *, int, - ns_tsig_key *, u_char *, int)); -int res_findzonecut __P((res_state, const char *, ns_class, int, - char *, size_t, struct in_addr *, int)); -int res_findzonecut2 __P((res_state, const char *, ns_class, int, + u_char *, int); +int res_nsend(res_state, const u_char *, int, u_char *, int); +int res_nsendsigned(res_state, const u_char *, int, + ns_tsig_key *, u_char *, int); +int res_findzonecut(res_state, const char *, ns_class, int, + char *, size_t, struct in_addr *, int); +int res_findzonecut2(res_state, const char *, ns_class, int, char *, size_t, - union res_sockaddr_union *, int)); -void res_nclose __P((res_state)); -int res_nopt __P((res_state, int, u_char *, int, int)); -int res_nopt_rdata __P((res_state, int, u_char *, int, u_char *, - u_short, u_short, u_char *)); -void res_send_setqhook __P((res_send_qhook)); -void res_send_setrhook __P((res_send_rhook)); -int __res_vinit __P((res_state, int)); -void res_destroyservicelist __P((void)); -const char * res_servicename __P((u_int16_t, const char *)); -const char * res_protocolname __P((int)); -void res_destroyprotolist __P((void)); -void res_buildprotolist __P((void)); -const char * res_get_nibblesuffix __P((res_state)); -const char * res_get_nibblesuffix2 __P((res_state)); -void res_ndestroy __P((res_state)); -u_int16_t res_nametoclass __P((const char *, int *)); -u_int16_t res_nametotype __P((const char *, int *)); -void res_setservers __P((res_state, - const union res_sockaddr_union *, int)); -int res_getservers __P((res_state, - union res_sockaddr_union *, int)); + union res_sockaddr_union *, int); +void res_nclose(res_state); +int res_nopt(res_state, int, u_char *, int, int); +int res_nopt_rdata(res_state, int, u_char *, int, u_char *, + u_short, u_short, u_char *); +void res_send_setqhook(res_send_qhook); +void res_send_setrhook(res_send_rhook); +int __res_vinit(res_state, int); +void res_destroyservicelist(void); +const char * res_servicename(uint16_t, const char *); +const char * res_protocolname(int); +void res_destroyprotolist(void); +void res_buildprotolist(void); +const char * res_get_nibblesuffix(res_state); +const char * res_get_nibblesuffix2(res_state); +void res_ndestroy(res_state); +uint16_t res_nametoclass(const char *, int *); +uint16_t res_nametotype(const char *, int *); +void res_setservers(res_state, + const union res_sockaddr_union *, int); +int res_getservers(res_state, + union res_sockaddr_union *, int); __END_DECLS #endif /* !_RESOLV_H_ */ -/*! \file */ --- /home/reed/src/isc/libbind/libbind/include/resolv_mt.h 2005-07-28 01:54:09.000000000 -0500 +++ /usr/src/lib/libc/include/resolv_mt.h 2012-10-24 08:34:35.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: resolv_mt.h,v 1.1.1.3 2009/04/12 16:35:44 christos Exp $ */ + #ifndef _RESOLV_MT_H #define _RESOLV_MT_H --- /home/reed/src/isc/libbind/libbind/include/isc/assertions.h 2008-11-13 20:36:51.000000000 -0600 +++ /usr/src/lib/libc/include/isc/assertions.h 2012-10-24 08:34:35.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: assertions.h,v 1.5 2009/04/12 17:07:16 christos Exp $ */ + /* * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1997-2001 Internet Software Consortium. @@ -16,7 +18,7 @@ */ /* - * $Id: assertions.h,v 1.5 2008/11/14 02:36:51 marka Exp $ + * Id: assertions.h,v 1.5 2008/11/14 02:36:51 marka Exp */ #ifndef ASSERTIONS_H @@ -48,6 +50,7 @@ #define CHECK_INVARIANT 0 #endif +#ifdef _DIAGNOSTIC #ifndef CHECK_REQUIRE #define CHECK_REQUIRE 1 #endif @@ -63,6 +66,7 @@ #ifndef CHECK_INVARIANT #define CHECK_INVARIANT 1 #endif +#endif /* _DIAGNOSTIC */ #if CHECK_REQUIRE != 0 #define REQUIRE(cond) \ @@ -102,8 +106,13 @@ ((__assertion_failed)(__FILE__, __LINE__, assert_insist, \ #cond, 1), 0))) #else +#if !defined(__lint__) #define INSIST(cond) ((void) (cond)) #define INSIST_ERR(cond) ((void) (cond)) +#else /* !__lint__ */ +#define INSIST(cond) +#define INSIST_ERR(cond) +#endif /* !__lint__ */ #endif /* CHECK_INSIST */ #if CHECK_INVARIANT != 0 --- /home/reed/src/isc/libbind/libbind/include/isc/dst.h 2005-04-26 23:56:17.000000000 -0500 +++ /usr/src/lib/libc/include/isc/dst.h 2012-10-24 08:34:35.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: dst.h,v 1.1.1.4 2009/04/12 16:35:44 christos Exp $ */ + #ifndef DST_H #define DST_H --- /home/reed/src/isc/libbind/libbind/include/isc/eventlib.h 2008-11-13 20:36:51.000000000 -0600 +++ /usr/src/lib/libc/include/isc/eventlib.h 2012-10-24 08:34:35.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: eventlib.h,v 1.3 2009/04/12 17:07:16 christos Exp $ */ + /* * Copyright (C) 2004, 2005, 2008 Internet Systems Consortium, Inc. ("ISC") * Copyright (C) 1995-1999, 2001, 2003 Internet Software Consortium. @@ -18,7 +20,7 @@ /* eventlib.h - exported interfaces for eventlib * vix 09sep95 [initial] * - * $Id: eventlib.h,v 1.7 2008/11/14 02:36:51 marka Exp $ + * Id: eventlib.h,v 1.7 2008/11/14 02:36:51 marka Exp */ #ifndef _EVENTLIB_H @@ -29,8 +31,6 @@ #include #include -#include - #ifndef __P # define __EVENTLIB_P_DEFINED # ifdef __STDC__ --- /home/reed/src/isc/libbind/libbind/include/isc/heap.h 2005-04-26 23:56:17.000000000 -0500 +++ /usr/src/lib/libc/include/isc/heap.h 2012-10-24 08:34:35.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: heap.h,v 1.1.1.4 2009/04/12 16:35:44 christos Exp $ */ + /* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1997,1999 by Internet Software Consortium. --- /home/reed/src/isc/libbind/libbind/include/isc/list.h 2009-01-29 12:26:42.000000000 -0600 +++ /usr/src/lib/libc/include/isc/list.h 2012-10-24 08:34:35.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: list.h,v 1.5 2009/04/12 17:07:16 christos Exp $ */ + /* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1997,1999 by Internet Software Consortium. @@ -21,14 +23,14 @@ #define LIST(type) struct { type *head, *tail; } #define INIT_LIST(list) \ - do { (list).head = NULL; (list).tail = NULL; } while (0) + do { (list).head = NULL; (list).tail = NULL; } while (/*CONSTCOND*/0) #define LINK(type) struct { type *prev, *next; } #define INIT_LINK_TYPE(elt, link, type) \ do { \ (elt)->link.prev = (type *)(-1); \ (elt)->link.next = (type *)(-1); \ - } while (0) + } while (/*CONSTCOND*/0) #define INIT_LINK(elt, link) \ INIT_LINK_TYPE(elt, link, void) #define LINKED(elt, link) ((void *)((elt)->link.prev) != (void *)(-1) && \ @@ -48,7 +50,7 @@ (elt)->link.prev = NULL; \ (elt)->link.next = (list).head; \ (list).head = (elt); \ - } while (0) + } while (/*CONSTCOND*/0) #define APPEND(list, elt, link) \ do { \ @@ -60,7 +62,7 @@ (elt)->link.prev = (list).tail; \ (elt)->link.next = NULL; \ (list).tail = (elt); \ - } while (0) + } while (/*CONSTCOND*/0) #define UNLINK_TYPE(list, elt, link, type) \ do { \ @@ -78,7 +80,7 @@ (list).head = (elt)->link.next; \ } \ INIT_LINK_TYPE(elt, link, type); \ - } while (0) + } while (/*CONSTCOND*/0) #define UNLINK(list, elt, link) \ UNLINK_TYPE(list, elt, link, void) @@ -96,7 +98,7 @@ (elt)->link.prev->link.next = (elt); \ (elt)->link.next = (before); \ } \ - } while (0) + } while (/*CONSTCOND*/0) #define INSERT_AFTER(list, after, elt, link) \ do { \ @@ -109,7 +111,7 @@ (elt)->link.next->link.prev = (elt); \ (elt)->link.prev = (after); \ } \ - } while (0) + } while (/*CONSTCOND*/0) #define ENQUEUE(list, elt, link) APPEND(list, elt, link) #define DEQUEUE(list, elt, link) UNLINK(list, elt, link) --- /home/reed/src/isc/libbind/libbind/include/isc/memcluster.h 2005-04-26 23:56:18.000000000 -0500 +++ /usr/src/lib/libc/include/isc/memcluster.h 2012-10-24 08:34:35.000000000 -0500 @@ -1,3 +1,5 @@ +/* $NetBSD: memcluster.h,v 1.1.1.4 2009/04/12 16:35:44 christos Exp $ */ + /* * Copyright (c) 2004 by Internet Systems Consortium, Inc. ("ISC") * Copyright (c) 1997,1999 by Internet Software Consortium.