Merge BIND9 9.3.3 into main chunk.

Obtained from:	ISC
MFC after:	1 week
This commit is contained in:
Hajimu UMEMOTO 2006-12-15 20:59:55 +00:00
parent 994f330564
commit 2cd19db26a
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=165258
6 changed files with 18 additions and 21 deletions

View File

@ -32,7 +32,7 @@
/* /*
* from nameser.h 8.1 (Berkeley) 6/2/93 * from nameser.h 8.1 (Berkeley) 6/2/93
* $Id: nameser_compat.h,v 1.1.2.3.4.2 2004/07/01 04:43:41 marka Exp $ * $Id: nameser_compat.h,v 1.1.2.3.4.3 2006/05/19 02:38:15 marka Exp $
* $FreeBSD$ * $FreeBSD$
*/ */

View File

@ -16,7 +16,7 @@
*/ */
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.1.2.1.8.1 2004/03/09 08:33:32 marka Exp $"; static const char rcsid[] = "$Id: inet_net_ntop.c,v 1.1.2.1.8.2 2006/06/20 02:53:07 marka Exp $";
#endif #endif
#include <sys/cdefs.h> #include <sys/cdefs.h>
__FBSDID("$FreeBSD$"); __FBSDID("$FreeBSD$");
@ -266,7 +266,7 @@ inet_net_ntop_ipv6(const u_char *src, int bits, char *dst, size_t size) {
} }
} }
/* Format CIDR /width. */ /* Format CIDR /width. */
SPRINTF((cp, "/%u", bits)); sprintf(cp, "/%u", bits);
if (strlen(outbuf) + 1 > size) if (strlen(outbuf) + 1 > size)
goto emsgsize; goto emsgsize;
strcpy(dst, outbuf); strcpy(dst, outbuf);

View File

@ -18,7 +18,7 @@
/* eventlib_p.h - private interfaces for eventlib /* eventlib_p.h - private interfaces for eventlib
* vix 09sep95 [initial] * vix 09sep95 [initial]
* *
* $Id: eventlib_p.h,v 1.3.2.1.4.3 2005/07/28 07:43:20 marka Exp $ * $Id: eventlib_p.h,v 1.3.2.1.4.4 2006/03/10 00:17:21 marka Exp $
* $FreeBSD$ * $FreeBSD$
*/ */
@ -48,6 +48,8 @@
#define EV_MASK_ALL (EV_READ | EV_WRITE | EV_EXCEPT) #define EV_MASK_ALL (EV_READ | EV_WRITE | EV_EXCEPT)
#define EV_ERR(e) return (errno = (e), -1) #define EV_ERR(e) return (errno = (e), -1)
#define OK(x) if ((x) < 0) EV_ERR(errno); else (void)NULL #define OK(x) if ((x) < 0) EV_ERR(errno); else (void)NULL
#define OKFREE(x, y) if ((x) < 0) { FREE((y)); EV_ERR(errno); } \
else (void)NULL
#define NEW(p) if (((p) = memget(sizeof *(p))) != NULL) \ #define NEW(p) if (((p) = memget(sizeof *(p))) != NULL) \
FILL(p); \ FILL(p); \

View File

@ -118,9 +118,10 @@ ___mtctxres(void) {
*/ */
if (!mt_key_initialized) { if (!mt_key_initialized) {
static pthread_mutex_t keylock = PTHREAD_MUTEX_INITIALIZER; static pthread_mutex_t keylock = PTHREAD_MUTEX_INITIALIZER;
pthread_mutex_lock(&keylock); if (pthread_mutex_lock(&keylock) == 0) {
_mtctxres_init(); _mtctxres_init();
pthread_mutex_unlock(&keylock); (void) pthread_mutex_unlock(&keylock);
}
} }
/* /*

View File

@ -70,7 +70,7 @@
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93"; static const char sccsid[] = "@(#)res_init.c 8.1 (Berkeley) 6/7/93";
static const char rcsid[] = "$Id: res_init.c,v 1.9.2.5.4.5 2005/11/03 00:00:52 marka Exp $"; static const char rcsid[] = "$Id: res_init.c,v 1.9.2.5.4.6 2006/08/30 23:23:01 marka Exp $";
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__FBSDID("$FreeBSD$"); __FBSDID("$FreeBSD$");
@ -243,17 +243,10 @@ __res_vinit(res_state statp, int preinit) {
if (buf[0] == '+') if (buf[0] == '+')
buf[0] = '.'; buf[0] = '.';
cp = strchr(buf, '.'); cp = strchr(buf, '.');
if (cp == NULL) { cp = (cp == NULL) ? buf : (cp + 1);
if (strlcpy(statp->defdname, buf, if (strlen(cp) >= sizeof(statp->defdname))
sizeof(statp->defdname)) goto freedata;
>= sizeof(statp->defdname)) strcpy(statp->defdname, cp);
goto freedata;
} else {
if (strlcpy(statp->defdname, cp+1,
sizeof(statp->defdname))
>= sizeof(statp->defdname))
goto freedata;
}
} }
} }
#endif /* SOLARIS2 */ #endif /* SOLARIS2 */

View File

@ -70,7 +70,7 @@
#if defined(LIBC_SCCS) && !defined(lint) #if defined(LIBC_SCCS) && !defined(lint)
static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93"; static const char sccsid[] = "@(#)res_send.c 8.1 (Berkeley) 6/4/93";
static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.8 2006/03/08 04:13:31 marka Exp $"; static const char rcsid[] = "$Id: res_send.c,v 1.5.2.2.4.9 2006/10/16 23:00:50 marka Exp $";
#endif /* LIBC_SCCS and not lint */ #endif /* LIBC_SCCS and not lint */
#include <sys/cdefs.h> #include <sys/cdefs.h>
__FBSDID("$FreeBSD$"); __FBSDID("$FreeBSD$");
@ -313,7 +313,8 @@ res_nsend(res_state statp,
highestFD = sysconf(_SC_OPEN_MAX) - 1; highestFD = sysconf(_SC_OPEN_MAX) - 1;
#endif #endif
if (statp->nscount == 0) { /* No name servers or res_init() failure */
if (statp->nscount == 0 || EXT(statp).ext == NULL) {
errno = ESRCH; errno = ESRCH;
return (-1); return (-1);
} }