693. [bug] An empty lwres statement in named.conf caused
the server to crash while loading.
+ 692. [bug] Deal with systems that have getaddrinfo() but not
+ gai_strerror(). [RT #679]
+
691. [bug] Configuring per-view forwarders caused an assertion
failure. [RT #675, #734]
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: acconfig.h,v 1.31.2.1 2001/01/09 22:31:06 bwelling Exp $ */
+/* $Id: acconfig.h,v 1.31.2.2 2001/02/07 19:26:16 gson Exp $ */
/***
*** This file is not to be included by any public header files, because
/* define if struct addrinfo exists */
#undef HAVE_ADDRINFO
-/* define is getaddrinfo() exists */
+/* define if getaddrinfo() exists */
#undef HAVE_GETADDRINFO
+/* define if gai_strerror() exists */
+#undef HAVE_GAISTRERROR
+
/* define if pthread_setconcurrency() should be called to tell the
* OS how many threads we might want to run.
*/
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dighost.c,v 1.174.2.4 2001/01/12 20:39:06 bwelling Exp $ */
+/* $Id: dighost.c,v 1.174.2.5 2001/02/07 19:26:20 gson Exp $ */
/*
* Notice to programmers: Do not use this code as an example of how to
#include <netdb.h>
#include <string.h>
#include <limits.h>
-#if (!(defined(HAVE_ADDRINFO) && defined(HAVE_GETADDRINFO)))
-extern int h_errno;
-#endif
#include <dns/byaddr.h>
#include <dns/fixedname.h>
#include <dig/dig.h>
+#ifdef HAVE_ADDRINFO
+#ifdef HAVE_GETADDRINFO
+#ifdef HAVE_GAISTRERROR
+#define USE_GETADDRINFO
+#endif
+#endif
+#endif
+
+#ifndef USE_GETADDRINFO
+extern int h_errno;
+#endif
+
ISC_LIST(dig_lookup_t) lookup_list;
dig_serverlist_t server_list;
ISC_LIST(dig_searchlist_t) search_list;
get_address(char *host, in_port_t port, isc_sockaddr_t *sockaddr) {
struct in_addr in4;
struct in6_addr in6;
-#if defined(HAVE_ADDRINFO) && defined(HAVE_GETADDRINFO)
+#ifdef USE_GETADDRINFO
struct addrinfo *res = NULL;
int result;
#else
else if (inet_pton(AF_INET, host, &in4) == 1)
isc_sockaddr_fromin(sockaddr, &in4, port);
else {
-#if defined(HAVE_ADDRINFO) && defined(HAVE_GETADDRINFO)
+#ifdef USE_GETADDRINFO
debug ("before getaddrinfo()");
is_blocking = ISC_TRUE;
result = getaddrinfo(host, NULL, NULL, &res);
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsupdate.c,v 1.75.2.2 2001/01/22 23:15:09 gson Exp $ */
+/* $Id: nsupdate.c,v 1.75.2.3 2001/02/07 19:26:22 gson Exp $ */
#include <config.h>
#include <stdlib.h>
#include <unistd.h>
-#if (!(defined(HAVE_ADDRINFO) && defined(HAVE_GETADDRINFO)))
-extern int h_errno;
-#endif
-
#include <isc/app.h>
#include <isc/base64.h>
#include <isc/buffer.h>
#include <lwres/lwres.h>
#include <lwres/net.h>
+#ifdef HAVE_ADDRINFO
+#ifdef HAVE_GETADDRINFO
+#ifdef HAVE_GAISTRERROR
+#define USE_GETADDRINFO
+#endif
+#endif
+#endif
+
+#ifndef USE_GETADDRINFO
+extern int h_errno;
+#endif
+
#define MAXCMD (4 * 1024)
#define INITDATA (32 * 1024)
#define MAXDATA (64 * 1024)
get_address(char *host, in_port_t port, isc_sockaddr_t *sockaddr) {
struct in_addr in4;
struct in6_addr in6;
-#if defined(HAVE_ADDRINFO) && defined(HAVE_GETADDRINFO)
+#ifdef USE_GETADDRINFO
struct addrinfo *res = NULL;
int result;
#else
else if (inet_pton(AF_INET, host, &in4) == 1)
isc_sockaddr_fromin(sockaddr, &in4, port);
else {
-#if defined(HAVE_ADDRINFO) && defined(HAVE_GETADDRINFO)
+#ifdef USE_GETADDRINFO
result = getaddrinfo(host, NULL, NULL, &res);
if (result != 0) {
fatal("Couldn't find server '%s': %s",
/* config.h.in. Generated automatically from configure.in by autoheader. */
/*
- * Copyright (C) 1999, 2000 Internet Software Consortium.
+ * Copyright (C) 1999-2001 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
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: config.h.in,v 1.40 2000/12/23 02:45:43 tale Exp $ */
+/* $Id: config.h.in,v 1.40.2.1 2001/02/07 19:26:19 gson Exp $ */
/***
*** This file is not to be included by any public header files, because
/* define if struct addrinfo exists */
#undef HAVE_ADDRINFO
-/* define is getaddrinfo() exists */
+/* define if getaddrinfo() exists */
#undef HAVE_GETADDRINFO
+/* define if gai_strerror() exists */
+#undef HAVE_GAISTRERROR
+
/* define if pthread_setconcurrency() should be called to tell the
* OS how many threads we might want to run.
*/
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
-AC_REVISION($Revision: 1.205.2.3 $)
+AC_REVISION($Revision: 1.205.2.4 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
[ISC_LWRES_GETADDRINFOPROTO="#undef ISC_LWRES_GETADDRINFOPROTO"
AC_DEFINE(HAVE_GETADDRINFO)],
[ISC_LWRES_GETADDRINFOPROTO="#define ISC_LWRES_GETADDRINFOPROTO 1"])
+AC_CHECK_FUNC(gai_strerror, AC_DEFINE(HAVE_GAISTRERROR))
AC_SUBST(ISC_LWRES_GETIPNODEPROTO)
AC_SUBST(ISC_LWRES_GETADDRINFOPROTO)
AC_SUBST(ISC_LWRES_GETNAMEINFOPROTO)