summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorInternet Software Consortium, Inc <@isc.org>2007-09-07 14:15:29 -0600
committerLaMont Jones <lamont@debian.org>2007-09-07 14:15:29 -0600
commit03fac2586e8e45f171abef994f8468d007d7314f (patch)
tree0b515a594489732cbe0113bb43f11febda72daa2
parent328a9836e31f2a12d74576fff8d8abb45ca98941 (diff)
downloadbind9-03fac2586e8e45f171abef994f8468d007d7314f.tar.gz
9.3.0beta4
-rw-r--r--CHANGES50
-rw-r--r--bin/named/Makefile.in4
-rw-r--r--bin/named/query.c4
-rw-r--r--bin/named/server.c6
-rw-r--r--bin/named/unix/os.c4
-rw-r--r--bin/named/update.c21
-rw-r--r--bin/nsupdate/nsupdate.c11
-rw-r--r--bin/tests/system/dlv/clean.sh27
-rw-r--r--bin/tests/system/dlv/ns1/named.conf35
-rw-r--r--bin/tests/system/dlv/ns1/root.db24
-rw-r--r--bin/tests/system/dlv/ns1/rootservers.utld.db20
-rw-r--r--bin/tests/system/dlv/ns2/hints18
-rw-r--r--bin/tests/system/dlv/ns2/named.conf35
-rw-r--r--bin/tests/system/dlv/ns2/utld.db56
-rw-r--r--bin/tests/system/dlv/ns3/child.db.in22
-rw-r--r--bin/tests/system/dlv/ns3/dlv.db.in20
-rw-r--r--bin/tests/system/dlv/ns3/hints18
-rw-r--r--bin/tests/system/dlv/ns3/named.conf43
-rwxr-xr-xbin/tests/system/dlv/ns3/sign.sh174
-rw-r--r--bin/tests/system/dlv/ns4/child.db41
-rw-r--r--bin/tests/system/dlv/ns4/hints18
-rw-r--r--bin/tests/system/dlv/ns4/named.conf36
-rw-r--r--bin/tests/system/dlv/ns5/hints18
-rw-r--r--bin/tests/system/dlv/ns5/named.conf64
-rw-r--r--bin/tests/system/dlv/ns5/rndc.conf13
-rw-r--r--bin/tests/system/dlv/setup.sh21
-rw-r--r--bin/tests/system/dlv/tests.sh19
-rw-r--r--bin/tests/system/dnssec/ns2/example.db.in6
-rw-r--r--bin/tests/system/dnssec/ns2/named.conf8
-rw-r--r--bin/tests/system/dnssec/ns2/rfc2335.example.db103
-rw-r--r--bin/tests/system/dnssec/ns3/named.conf8
-rw-r--r--bin/tests/system/dnssec/tests.sh31
-rw-r--r--bin/win32/BINDInstall/BINDInstallDlg.cpp9
-rwxr-xr-xconfigure6
-rw-r--r--configure.in4
-rw-r--r--contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.3.0-patch64
-rw-r--r--contrib/queryperf/Makefile.in12
-rwxr-xr-xcontrib/queryperf/configure3471
-rw-r--r--contrib/queryperf/configure.in24
-rw-r--r--contrib/queryperf/missing/addrinfo.h100
-rw-r--r--contrib/queryperf/missing/getaddrinfo.c632
-rw-r--r--contrib/queryperf/missing/getnameinfo.c226
-rw-r--r--contrib/queryperf/queryperf.c392
-rw-r--r--doc/arm/Bv9ARM-book.xml7
-rw-r--r--doc/arm/Bv9ARM.ch06.html89
-rw-r--r--doc/arm/Bv9ARM.ch07.html8
-rw-r--r--doc/arm/Bv9ARM.ch08.html14
-rw-r--r--doc/arm/Bv9ARM.ch09.html108
-rw-r--r--doc/arm/Bv9ARM.html38
-rw-r--r--lib/bind/api2
-rw-r--r--lib/bind/irs/dns_ho.c54
-rw-r--r--lib/bind/irs/dns_nw.c9
-rw-r--r--lib/bind/irs/gen_gr.c74
-rw-r--r--lib/bind/irs/getaddrinfo.c6
-rw-r--r--lib/bind/irs/hesiod.c35
-rw-r--r--lib/bind/nameser/ns_name.c28
-rw-r--r--lib/bind9/api2
-rw-r--r--lib/bind9/check.c30
-rw-r--r--lib/bind9/getaddresses.c65
-rw-r--r--lib/dns/api2
-rw-r--r--lib/dns/include/dns/db.h12
-rw-r--r--lib/dns/include/dns/result.h5
-rw-r--r--lib/dns/include/dns/validator.h4
-rw-r--r--lib/dns/journal.c19
-rw-r--r--lib/dns/master.c5
-rw-r--r--lib/dns/masterdump.c14
-rw-r--r--lib/dns/message.c17
-rw-r--r--lib/dns/rbtdb.c175
-rw-r--r--lib/dns/resolver.c51
-rw-r--r--lib/dns/result.c5
-rw-r--r--lib/dns/validator.c264
-rw-r--r--lib/isc/api2
-rw-r--r--lib/isc/include/isc/result.h5
-rw-r--r--lib/isc/netaddr.c5
-rw-r--r--lib/isc/result.c5
-rw-r--r--lib/isc/sockaddr.c10
-rw-r--r--lib/isc/unix/ifiter_ioctl.c6
-rw-r--r--lib/isc/unix/os.c5
-rw-r--r--lib/isc/win32/socket.c415
-rw-r--r--lib/isccfg/api2
-rw-r--r--lib/isccfg/parser.c8
-rw-r--r--version4
82 files changed, 6110 insertions, 1417 deletions
diff --git a/CHANGES b/CHANGES
index 362cf17e..8ad0b6ba 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,4 +1,54 @@
+ --- 9.3.0beta4 released ---
+
+1640. [bug] win32: isc_socket_cancel(ISC_SOCKCANCEL_ACCEPT) was
+ incorrectly closing the socket. [RT #11291]
+
+1639. [func] Initial dlv system test.
+
+1638. [bug] "ixfr-from-differences" could generate a REQUIRE
+ failure if the journal open failed. [RT #11347]
+
+1637. [bug] Node reference leak on error in addnoqname().
+
+1636. [bug] The dump done callback could get ISC_R_SUCCESS even if
+ a error had occured. The database version no longer
+ matched the version of the database that was dumped.
+
+1635. [bug] Memory leak on error in query_addds().
+
+1634. [bug] named didn't supply a useful error message when it
+ detected duplicate views. [RT #11208]
+
+1633. [bug] named should return NOTIMP to update requests to a
+ slaves without a allow-update-forwarding acl specified.
+ [RT #11331]
+
+1632. [bug] nsupdate failed to send prerequisite only UPDATE
+ messages. [RT #11288]
+
+1631. [bug] dns_journal_compact() could sometimes corrupt the
+ journal. [RT #11124]
+
+1630. [contrib] queryperf: add support for IPv6 transport.
+
+1629. [func] dig now supports IPv6 scoped addresses with the
+ extended format in the local-server part. [RT #8753]
+
+1628. [bug] Typo in Compaq Trucluster support. [RT# 11264]
+
+1627. [bug] win32: sockets were not being closed when the
+ last external reference was removed. [RT# 11179]
+
+1626. [bug] --enable-getifaddrs was broken. [RT#11259]
+
+1625. [bug] named failed to load/transfer RFC2535 signed zones
+ which contained CNAMES. [RT# 11237]
+
+1606. [bug] DLV insecurity proof was failing.
+
+1605. [func] New dns_db_find() option DNS_DBFIND_COVERINGNSEC.
+
--- 9.3.0beta3 released ---
1624. [bug] zonemgr_putio() call should be locked. [RT# 11163]
diff --git a/bin/named/Makefile.in b/bin/named/Makefile.in
index 9e125c24..578fbac1 100644
--- a/bin/named/Makefile.in
+++ b/bin/named/Makefile.in
@@ -13,7 +13,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: Makefile.in,v 1.74.12.7 2004/03/08 04:04:18 marka Exp $
+# $Id: Makefile.in,v 1.74.12.8 2004/05/16 00:16:55 marka Exp $
srcdir = @srcdir@
VPATH = @srcdir@
@@ -126,6 +126,6 @@ installdirs:
$(SHELL) ${top_srcdir}/mkinstalldirs ${DESTDIR}${mandir}/man8
install:: named@EXEEXT@ lwresd@EXEEXT@ installdirs
- ${LIBTOO_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir}
+ ${LIBTOOL_MODE_INSTALL} ${INSTALL_PROGRAM} named@EXEEXT@ ${DESTDIR}${sbindir}
(cd ${DESTDIR}${sbindir}; rm -f lwresd@EXEEXT@; @LN@ named@EXEEXT@ lwresd@EXEEXT@)
for m in ${MANPAGES}; do ${INSTALL_DATA} ${srcdir}/$$m ${DESTDIR}${mandir}/man8; done
diff --git a/bin/named/query.c b/bin/named/query.c
index b86e4318..39170b3b 100644
--- a/bin/named/query.c
+++ b/bin/named/query.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: query.c,v 1.198.2.13.4.27 2004/04/15 02:10:38 marka Exp $ */
+/* $Id: query.c,v 1.198.2.13.4.28 2004/05/14 00:59:54 marka Exp $ */
#include <config.h>
@@ -1785,7 +1785,7 @@ query_addds(ns_client_t *client, dns_db_t *db, dns_dbnode_t *node) {
rdataset = query_newrdataset(client);
sigrdataset = query_newrdataset(client);
if (rdataset == NULL || sigrdataset == NULL)
- return;
+ goto cleanup;
/*
* Look for the DS record, which may or may not be present.
diff --git a/bin/named/server.c b/bin/named/server.c
index 7ab7ce41..9837a567 100644
--- a/bin/named/server.c
+++ b/bin/named/server.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: server.c,v 1.339.2.15.2.53 2004/04/20 14:12:08 marka Exp $ */
+/* $Id: server.c,v 1.339.2.15.2.54 2004/05/14 01:03:44 marka Exp $ */
#include <config.h>
@@ -2877,6 +2877,8 @@ shutdown_server(isc_task_t *task, isc_event_t *event) {
if (server->blackholeacl != NULL)
dns_acl_detach(&server->blackholeacl);
+ dns_db_detach(&server->in_roothints);
+
isc_task_endexclusive(server->task);
isc_task_detach(&server->task);
@@ -3028,8 +3030,6 @@ ns_server_destroy(ns_server_t **serverp) {
INSIST(ISC_LIST_EMPTY(server->viewlist));
- dns_db_detach(&server->in_roothints);
-
dns_aclenv_destroy(&server->aclenv);
isc_quota_destroy(&server->recursionquota);
diff --git a/bin/named/unix/os.c b/bin/named/unix/os.c
index 080f0c43..7df7f3b4 100644
--- a/bin/named/unix/os.c
+++ b/bin/named/unix/os.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: os.c,v 1.46.2.4.8.15 2004/04/15 05:34:57 marka Exp $ */
+/* $Id: os.c,v 1.46.2.4.8.16 2004/05/04 03:19:42 marka Exp $ */
#include <config.h>
#include <stdarg.h>
@@ -616,7 +616,7 @@ ns_os_shutdownmsg(char *command, isc_buffer_t *text) {
n = snprintf((char *)isc_buffer_used(text),
isc_buffer_availablelength(text),
- "pid: %d", pid);
+ "pid: %ld", (long)pid);
/* Only send a message if it is complete. */
if (n < isc_buffer_availablelength(text))
isc_buffer_add(text, n);
diff --git a/bin/named/update.c b/bin/named/update.c
index c979a7df..6b396cd0 100644
--- a/bin/named/update.c
+++ b/bin/named/update.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: update.c,v 1.88.2.5.2.17 2004/04/15 02:10:39 marka Exp $ */
+/* $Id: update.c,v 1.88.2.5.2.19 2004/05/12 06:38:46 marka Exp $ */
#include <config.h>
@@ -239,7 +239,7 @@ update_log(ns_client_t *client, dns_zone_t *zone,
static isc_result_t
checkupdateacl(ns_client_t *client, dns_acl_t *acl, const char *message,
- dns_name_t *zonename)
+ dns_name_t *zonename, isc_boolean_t slave)
{
char namebuf[DNS_NAME_FORMATSIZE];
char classbuf[DNS_RDATACLASS_FORMATSIZE];
@@ -247,6 +247,8 @@ checkupdateacl(ns_client_t *client, dns_acl_t *acl, const char *message,
const char *msg = "denied";
isc_result_t result;
+ if (slave && acl == NULL)
+ return (DNS_R_NOTIMP);
result = ns_client_checkaclsilent(client, acl, ISC_FALSE);
if (result == ISC_R_SUCCESS) {
@@ -850,7 +852,8 @@ temp_check(isc_mem_t *mctx, dns_diff_t *temp, dns_db_t *db,
this name and type */
*typep = type = t->rdata.type;
- if (type == dns_rdatatype_rrsig)
+ if (type == dns_rdatatype_rrsig ||
+ type == dns_rdatatype_sig)
covers = dns_rdata_covers(&t->rdata);
else
covers = 0;
@@ -2047,7 +2050,7 @@ ns_update_start(ns_client_t *client, isc_result_t sigresult) {
break;
case dns_zone_slave:
CHECK(checkupdateacl(client, dns_zone_getforwardacl(zone),
- "update forwarding", zonename));
+ "update forwarding", zonename, ISC_TRUE));
CHECK(send_forward_event(client, zone));
break;
default:
@@ -2256,9 +2259,10 @@ update_action(isc_task_t *task, isc_event_t *event) {
result = ISC_R_SUCCESS;
if (ssutable == NULL)
CHECK(checkupdateacl(client, dns_zone_getupdateacl(zone),
- "update", zonename));
+ "update", zonename, ISC_FALSE));
else if (client->signer == NULL)
- CHECK(checkupdateacl(client, NULL, "update", zonename));
+ CHECK(checkupdateacl(client, NULL, "update", zonename,
+ ISC_FALSE));
if (dns_zone_getupdatedisabled(zone))
FAILC(DNS_R_REFUSED, "dynamic update temporarily disabled");
@@ -2467,8 +2471,9 @@ update_action(isc_task_t *task, isc_event_t *event) {
ctx.ignore_add = ISC_FALSE;
dns_diff_init(mctx, &ctx.del_diff);
dns_diff_init(mctx, &ctx.add_diff);
- CHECK(foreach_rr(db, ver, name, rdata.type, covers,
- add_rr_prepare_action, &ctx));
+ CHECK(foreach_rr(db, ver, name, rdata.type,
+ covers, add_rr_prepare_action,
+ &ctx));
if (ctx.ignore_add) {
dns_diff_clear(&ctx.del_diff);
diff --git a/bin/nsupdate/nsupdate.c b/bin/nsupdate/nsupdate.c
index 655c115b..13e0aac3 100644
--- a/bin/nsupdate/nsupdate.c
+++ b/bin/nsupdate/nsupdate.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsupdate.c,v 1.103.2.15.2.14 2004/04/10 04:09:22 marka Exp $ */
+/* $Id: nsupdate.c,v 1.103.2.15.2.15 2004/05/12 04:47:16 marka Exp $ */
#include <config.h>
@@ -1847,12 +1847,17 @@ start_update(void) {
dns_request_t *request = NULL;
dns_message_t *soaquery = NULL;
dns_name_t *firstname;
+ dns_section_t section = DNS_SECTION_UPDATE;
ddebug("start_update()");
if (answer != NULL)
dns_message_destroy(&answer);
- result = dns_message_firstname(updatemsg, DNS_SECTION_UPDATE);
+ result = dns_message_firstname(updatemsg, section);
+ if (result == ISC_R_NOMORE) {
+ section = DNS_SECTION_PREREQUISITE;
+ result = dns_message_firstname(updatemsg, section);
+ }
if (result != ISC_R_SUCCESS) {
done_update();
return;
@@ -1879,7 +1884,7 @@ start_update(void) {
dns_rdataset_makequestion(rdataset, getzoneclass(), dns_rdatatype_soa);
firstname = NULL;
- dns_message_currentname(updatemsg, DNS_SECTION_UPDATE, &firstname);
+ dns_message_currentname(updatemsg, section, &firstname);
dns_name_init(name, NULL);
dns_name_clone(firstname, name);
diff --git a/bin/tests/system/dlv/clean.sh b/bin/tests/system/dlv/clean.sh
new file mode 100644
index 00000000..e4c9fc90
--- /dev/null
+++ b/bin/tests/system/dlv/clean.sh
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+#
+# 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.
+
+# $Id: clean.sh,v 1.2.4.1 2004/05/14 05:20:32 marka Exp $
+
+rm -f random.data
+rm -f ns*/named.run
+rm -f ns3/K*
+rm -f ns3/*.db
+rm -f ns3/*.signed
+rm -f ns3/dlvset-*
+rm -f ns3/dsset-*
+rm -f ns3/keyset-*
+rm -f ns3/trusted.conf ns5/trusted.conf
diff --git a/bin/tests/system/dlv/ns1/named.conf b/bin/tests/system/dlv/ns1/named.conf
new file mode 100644
index 00000000..7fdfe16a
--- /dev/null
+++ b/bin/tests/system/dlv/ns1/named.conf
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * 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.
+ */
+
+/* $Id: named.conf,v 1.2.4.1 2004/05/14 05:20:35 marka Exp $ */
+
+controls { /* empty */ };
+
+options {
+ query-source address 10.53.0.1;
+ notify-source 10.53.0.1;
+ transfer-source 10.53.0.1;
+ port 5300;
+ pid-file "named.pid";
+ listen-on { 10.53.0.1; };
+ listen-on-v6 { none; };
+ recursion no;
+ notify yes;
+ dnssec-enable no;
+};
+
+zone "." { type master; file "root.db"; };
+zone "rootservers.utld" { type master; file "rootservers.utld.db"; };
diff --git a/bin/tests/system/dlv/ns1/root.db b/bin/tests/system/dlv/ns1/root.db
new file mode 100644
index 00000000..38c8b6c9
--- /dev/null
+++ b/bin/tests/system/dlv/ns1/root.db
@@ -0,0 +1,24 @@
+; Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+;
+; 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.
+
+; $Id: root.db,v 1.2.4.1 2004/05/14 05:20:36 marka Exp $
+
+$TTL 120
+@ SOA ns.rootservers.utld hostmaster.ns.rootservers.utld (
+ 1 3600 1200 604800 60 )
+@ NS ns.rootservers.utld
+ns A 10.53.0.1
+;
+utld NS ns.utld
+ns.utld A 10.53.0.2
diff --git a/bin/tests/system/dlv/ns1/rootservers.utld.db b/bin/tests/system/dlv/ns1/rootservers.utld.db
new file mode 100644
index 00000000..6b76ee4b
--- /dev/null
+++ b/bin/tests/system/dlv/ns1/rootservers.utld.db
@@ -0,0 +1,20 @@
+; Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+;
+; 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.
+
+; $Id: rootservers.utld.db,v 1.2.4.1 2004/05/14 05:20:38 marka Exp $
+
+$TTL 120
+@ SOA ns hostmaster.ns 1 3600 1200 604800 60
+@ NS ns
+ns A 10.53.0.1
diff --git a/bin/tests/system/dlv/ns2/hints b/bin/tests/system/dlv/ns2/hints
new file mode 100644
index 00000000..f947c1c7
--- /dev/null
+++ b/bin/tests/system/dlv/ns2/hints
@@ -0,0 +1,18 @@
+; Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+;
+; 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.
+
+; $Id: hints,v 1.2.4.1 2004/05/14 05:20:39 marka Exp $
+
+. 0 NS ns.rootservers.utld.
+ns.rootservers.utld. 0 A 10.53.0.1
diff --git a/bin/tests/system/dlv/ns2/named.conf b/bin/tests/system/dlv/ns2/named.conf
new file mode 100644
index 00000000..f773d619
--- /dev/null
+++ b/bin/tests/system/dlv/ns2/named.conf
@@ -0,0 +1,35 @@
+/*
+ * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * 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.
+ */
+
+/* $Id: named.conf,v 1.2.4.1 2004/05/14 05:20:40 marka Exp $ */
+
+controls { /* empty */ };
+
+options {
+ query-source address 10.53.0.2;
+ notify-source 10.53.0.2;
+ transfer-source 10.53.0.2;
+ port 5300;
+ pid-file "named.pid";
+ listen-on { 10.53.0.2; };
+ listen-on-v6 { none; };
+ recursion no;
+ notify yes;
+ dnssec-enable no;
+};
+
+zone "." { type hint; file "hints"; };
+zone "utld" { type master; file "utld.db"; };
diff --git a/bin/tests/system/dlv/ns2/utld.db b/bin/tests/system/dlv/ns2/utld.db
new file mode 100644
index 00000000..6d6b1080
--- /dev/null
+++ b/bin/tests/system/dlv/ns2/utld.db
@@ -0,0 +1,56 @@
+; Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+;
+; 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.
+
+; $Id: utld.db,v 1.2.4.1 2004/05/14 05:20:41 marka Exp $
+
+$TTL 120
+@ SOA ns hostmaster.ns 1 3600 1200 604800 60
+@ NS ns
+ns A 10.53.0.2
+;
+rootservers NS ns.rootservers
+ns.rootservers A 10.53.0.1
+;
+dlv NS ns.dlv
+ns.dlv A 10.53.0.3
+;
+child1 NS ns.child1
+ns.child1 A 10.53.0.3
+;
+child2 NS ns.child2
+ns.child2 A 10.53.0.4
+;
+child3 NS ns.child3
+ns.child3 A 10.53.0.3
+;
+child4 NS ns.child4
+ns.child4 A 10.53.0.3
+;
+child5 NS ns.child5
+ns.child5 A 10.53.0.3
+;
+child6 NS ns.child6
+ns.child6 A 10.53.0.4
+;
+child7 NS ns.child7
+ns.child7 A 10.53.0.3
+;
+child8 NS ns.child8
+ns.child8 A 10.53.0.3
+;
+child9 NS ns.child9
+ns.child9 A 10.53.0.3
+;
+child10 NS ns.child10
+ns.child10 A 10.53.0.3
diff --git a/bin/tests/system/dlv/ns3/child.db.in b/bin/tests/system/dlv/ns3/child.db.in
new file mode 100644
index 00000000..910c21e6
--- /dev/null
+++ b/bin/tests/system/dlv/ns3/child.db.in
@@ -0,0 +1,22 @@
+; Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+;
+; 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.
+
+; $Id: child.db.in,v 1.2.4.1 2004/05/14 05:20:42 marka Exp $
+
+$TTL 120
+@ SOA ns hostmaster.ns 1 3600 1200 604800 60
+@ NS ns
+ns A 10.53.0.3
+foo TXT foo
+bar TXT bar
diff --git a/bin/tests/system/dlv/ns3/dlv.db.in b/bin/tests/system/dlv/ns3/dlv.db.in
new file mode 100644
index 00000000..5a9e6e15
--- /dev/null
+++ b/bin/tests/system/dlv/ns3/dlv.db.in
@@ -0,0 +1,20 @@
+; Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+;
+; 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.
+
+; $Id: dlv.db.in,v 1.2.4.1 2004/05/14 05:20:42 marka Exp $
+
+$TTL 120
+@ SOA ns hostmaster.ns 1 3600 1200 604800 60
+@ NS ns
+ns A 10.53.0.3
diff --git a/bin/tests/system/dlv/ns3/hints b/bin/tests/system/dlv/ns3/hints
new file mode 100644
index 00000000..165e65a9
--- /dev/null
+++ b/bin/tests/system/dlv/ns3/hints
@@ -0,0 +1,18 @@
+; Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+;
+; 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.
+
+; $Id: hints,v 1.2.4.1 2004/05/14 05:20:43 marka Exp $
+
+. 0 NS ns.rootservers.utld.
+ns.rootservers.utld. 0 A 10.53.0.1
diff --git a/bin/tests/system/dlv/ns3/named.conf b/bin/tests/system/dlv/ns3/named.conf
new file mode 100644
index 00000000..b66a6716
--- /dev/null
+++ b/bin/tests/system/dlv/ns3/named.conf
@@ -0,0 +1,43 @@
+/*
+ * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * 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.
+ */
+
+/* $Id: named.conf,v 1.2.4.1 2004/05/14 05:20:44 marka Exp $ */
+
+controls { /* empty */ };
+
+options {
+ query-source address 10.53.0.3;
+ notify-source 10.53.0.3;
+ transfer-source 10.53.0.3;
+ port 5300;
+ pid-file "named.pid";
+ listen-on { 10.53.0.3; };
+ listen-on-v6 { none; };
+ recursion no;
+ notify yes;
+ dnssec-enable yes;
+};
+
+zone "." { type hint; file "hints"; };
+zone "dlv.utld" { type master; file "dlv.signed"; };
+zone "child1.utld" { type master; file "child1.signed"; }; // dlv
+zone "child3.utld" { type master; file "child3.signed"; }; // dlv
+zone "child4.utld" { type master; file "child4.signed"; }; // dlv
+zone "child5.utld" { type master; file "child5.signed"; }; // dlv
+zone "child7.utld" { type master; file "child7.signed"; }; // no dlv
+zone "child8.utld" { type master; file "child8.signed"; }; // no dlv
+zone "child9.utld" { type master; file "child9.signed"; }; // dlv
+zone "child10.utld" { type master; file "child.db.in"; }; // dlv unsigned
diff --git a/bin/tests/system/dlv/ns3/sign.sh b/bin/tests/system/dlv/ns3/sign.sh
new file mode 100755
index 00000000..ef2ea1c7
--- /dev/null
+++ b/bin/tests/system/dlv/ns3/sign.sh
@@ -0,0 +1,174 @@
+#!/bin/sh
+#
+# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+#
+# 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.
+
+# $Id: sign.sh,v 1.2.4.1 2004/05/14 05:20:45 marka Exp $
+
+SYSTEMTESTTOP=../..
+. $SYSTEMTESTTOP/conf.sh
+
+RANDFILE=../random.data
+dlvsets=
+
+zone=child1.utld.
+infile=child.db.in
+zonefile=child1.utld.db
+outfile=child1.signed
+dlvzone=dlv.utld.
+dlvsets="$dlvsets dlvset-$zone"
+
+keyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
+keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null
+echo "I: signed $zone"
+
+
+zone=child3.utld.
+infile=child.db.in
+zonefile=child3.utld.db
+outfile=child3.signed
+dlvzone=dlv.utld.
+dlvsets="$dlvsets dlvset-$zone"
+
+keyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
+keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null
+echo "I: signed $zone"
+
+
+zone=child4.utld.
+infile=child.db.in
+zonefile=child4.utld.db
+outfile=child4.signed
+dlvzone=dlv.utld.
+dlvsets="$dlvsets dlvset-$zone"
+
+keyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
+keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null
+echo "I: signed $zone"
+
+
+zone=child5.utld.
+infile=child.db.in
+zonefile=child5.utld.db
+outfile=child5.signed
+dlvzone=dlv.utld.
+dlvsets="$dlvsets dlvset-$zone"
+
+keyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
+keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null
+echo "I: signed $zone"
+
+
+zone=child7.utld.
+infile=child.db.in
+zonefile=child7.utld.db
+outfile=child7.signed
+dlvzone=dlv.utld.
+
+keyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
+keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null
+echo "I: signed $zone"
+
+
+zone=child8.utld.
+infile=child.db.in
+zonefile=child8.utld.db
+outfile=child8.signed
+dlvzone=dlv.utld.
+
+keyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
+keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null
+echo "I: signed $zone"
+
+
+zone=child9.utld.
+infile=child.db.in
+zonefile=child9.utld.db
+outfile=child9.signed
+dlvzone=dlv.utld.
+dlvsets="$dlvsets dlvset-$zone"
+
+keyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
+keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null
+echo "I: signed $zone"
+
+zone=child10.utld.
+infile=child.db.in
+zonefile=child10.utld.db
+outfile=child10.signed
+dlvzone=dlv.utld.
+dlvsets="$dlvsets dlvset-$zone"
+
+keyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
+keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
+
+cat $infile $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -g -r $RANDFILE -l $dlvzone -o $zone -f $outfile $zonefile > /dev/null
+echo "I: signed $zone"
+
+
+zone=dlv.utld.
+infile=dlv.db.in
+zonefile=dlv.utld.db
+outfile=dlv.signed
+dlvzone=dlv.utld.
+
+keyname1=`$KEYGEN -r $RANDFILE -a DSA -b 768 -n zone $zone`
+keyname2=`$KEYGEN -f KSK -r $RANDFILE -a DSA -b 768 -n zone $zone`
+
+cat $infile $dlvsets $keyname1.key $keyname2.key >$zonefile
+
+$SIGNER -g -r $RANDFILE -o $zone -f $outfile $zonefile > /dev/null
+echo "I: signed $zone"
+
+
+cat $keyname2.key | $PERL -n -e '
+local ($dn, $class, $type, $flags, $proto, $alg, @rest) = split;
+local $key = join("", @rest);
+print <<EOF
+trusted-keys {
+ "$dn" $flags $proto $alg "$key";
+};
+EOF
+' > trusted.conf
+cp trusted.conf ../ns5
diff --git a/bin/tests/system/dlv/ns4/child.db b/bin/tests/system/dlv/ns4/child.db
new file mode 100644
index 00000000..dad79ba7
--- /dev/null
+++ b/bin/tests/system/dlv/ns4/child.db
@@ -0,0 +1,41 @@
+; Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+;
+; 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.
+
+; $Id: child.db,v 1.2.4.1 2004/05/14 05:20:46 marka Exp $
+
+$TTL 120
+@ SOA ns hostmaster.ns 1 3600 1200 604800 60
+@ NS ns
+ns A 10.53.0.3
+;
+rootservers NS ns.rootservers
+ns.rootservers A 10.53.0.1
+;
+child1 NS ns.child1
+ns.child1 A 10.53.0.3
+;
+child2 NS ns.child2
+ns.child2 A 10.53.0.4
+;
+child3 NS ns.child3
+ns.child3 A 10.53.0.3
+;
+child4 NS ns.child4
+ns.child4 A 10.53.0.3
+;
+child5 NS ns.child5
+ns.child5 A 10.53.0.3
+;
+child6 NS ns.child5
+ns.child6 A 10.53.0.4
diff --git a/bin/tests/system/dlv/ns4/hints b/bin/tests/system/dlv/ns4/hints
new file mode 100644
index 00000000..fd7ac94a
--- /dev/null
+++ b/bin/tests/system/dlv/ns4/hints
@@ -0,0 +1,18 @@
+; Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+;
+; 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.
+
+; $Id: hints,v 1.2.4.1 2004/05/14 05:20:47 marka Exp $
+
+. 0 NS ns.rootservers.utld.
+ns.rootservers.utld. 0 A 10.53.0.1
diff --git a/bin/tests/system/dlv/ns4/named.conf b/bin/tests/system/dlv/ns4/named.conf
new file mode 100644
index 00000000..0cb9eb71
--- /dev/null
+++ b/bin/tests/system/dlv/ns4/named.conf
@@ -0,0 +1,36 @@
+/*
+ * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * 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.
+ */
+
+/* $Id: named.conf,v 1.2.4.1 2004/05/14 05:20:47 marka Exp $ */
+
+controls { /* empty */ };
+
+options {
+ query-source address 10.53.0.4;
+ notify-source 10.53.0.4;
+ transfer-source 10.53.0.4;
+ port 5300;
+ pid-file "named.pid";
+ listen-on { 10.53.0.4; };
+ listen-on-v6 { none; };
+ recursion no;
+ notify yes;
+ dnssec-enable no;
+};
+
+zone "." { type hint; file "hints"; };
+zone "child2.utld" { type master; file "child.db"; };
+zone "child6.utld" { type master; file "child.db"; };
diff --git a/bin/tests/system/dlv/ns5/hints b/bin/tests/system/dlv/ns5/hints
new file mode 100644
index 00000000..2e839d37
--- /dev/null
+++ b/bin/tests/system/dlv/ns5/hints
@@ -0,0 +1,18 @@
+; Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+;
+; 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.
+
+; $Id: hints,v 1.2.4.1 2004/05/14 05:20:49 marka Exp $
+
+. 0 NS ns.rootservers.utld.
+ns.rootservers.utld. 0 A 10.53.0.1
diff --git a/bin/tests/system/dlv/ns5/named.conf b/bin/tests/system/dlv/ns5/named.conf
new file mode 100644
index 00000000..1d538184
--- /dev/null
+++ b/bin/tests/system/dlv/ns5/named.conf
@@ -0,0 +1,64 @@
+/*
+ * Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+ *
+ * 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.
+ */
+
+/* $Id: named.conf,v 1.2.4.1 2004/05/14 05:20:50 marka Exp $ */
+
+/*
+ * Choose a keyname that is unlikely to clash with any real key names.
+ * This allows it to be added to the system's rndc.conf with minimal
+ * likelyhood of collision.
+ *
+ * e.g.
+ * key "cc64b3d1db63fc88d7cb5d2f9f57d258" {
+ * algorithm hmac-md5;
+ * secret "34f88008d07deabbe65bd01f1d233d47";
+ * };
+ *
+ * server "10.53.0.5" {
+ * key cc64b3d1db63fc88d7cb5d2f9f57d258;
+ * port 5353;
+ * };
+ *
+ * rndc -s 10.53.0.5 <command>
+ */
+
+key "cc64b3d1db63fc88d7cb5d2f9f57d258" {
+ algorithm hmac-md5;
+ secret "34f88008d07deabbe65bd01f1d233d47";
+};
+
+controls {
+ inet 10.53.0.5 port 5353 allow { any; }
+ keys { cc64b3d1db63fc88d7cb5d2f9f57d258; };
+};
+
+include "trusted.conf";
+
+options {
+ query-source address 10.53.0.5;
+ notify-source 10.53.0.5;
+ transfer-source 10.53.0.5;
+ port 5300;
+ pid-file "named.pid";
+ listen-on { 10.53.0.5; };
+ listen-on-v6 { none; };
+ recursion yes;
+ notify yes;
+ dnssec-enable yes;
+ dnssec-lookaside "dlv.utld";
+};
+
+zone "." { type hint; file "hints"; };
diff --git a/bin/tests/system/dlv/ns5/rndc.conf b/bin/tests/system/dlv/ns5/rndc.conf
new file mode 100644
index 00000000..d95417c4
--- /dev/null
+++ b/bin/tests/system/dlv/ns5/rndc.conf
@@ -0,0 +1,13 @@
+/*
+ * Copyright.
+ */
+
+key "cc64b3d1db63fc88d7cb5d2f9f57d258" {
+ algorithm hmac-md5;
+ secret "34f88008d07deabbe65bd01f1d233d47";
+};
+
+options {
+ default-server 10.53.0.5;
+ default-port 5353;
+};
diff --git a/bin/tests/system/dlv/setup.sh b/bin/tests/system/dlv/setup.sh
new file mode 100644
index 00000000..bc6740e3
--- /dev/null
+++ b/bin/tests/system/dlv/setup.sh
@@ -0,0 +1,21 @@
+#!/bin/sh
+#
+# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+#
+# 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.
+
+# $Id: setup.sh,v 1.2.4.1 2004/05/14 05:20:33 marka Exp $
+
+../../genrandom 400 random.data
+
+(cd ns3 && sh -e sign.sh)
diff --git a/bin/tests/system/dlv/tests.sh b/bin/tests/system/dlv/tests.sh
new file mode 100644
index 00000000..68e83e10
--- /dev/null
+++ b/bin/tests/system/dlv/tests.sh
@@ -0,0 +1,19 @@
+#!/bin/sh
+#
+# Copyright (C) 2004 Internet Systems Consortium, Inc. ("ISC")
+#
+# 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.
+
+# $Id: tests.sh,v 1.2.4.1 2004/05/14 05:20:34 marka Exp $
+
+exit 0
diff --git a/bin/tests/system/dnssec/ns2/example.db.in b/bin/tests/system/dnssec/ns2/example.db.in
index 8c4ad89b..80254b1a 100644
--- a/bin/tests/system/dnssec/ns2/example.db.in
+++ b/bin/tests/system/dnssec/ns2/example.db.in
@@ -13,7 +13,7 @@
; OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
; PERFORMANCE OF THIS SOFTWARE.
-; $Id: example.db.in,v 1.8.12.4 2004/04/15 23:56:23 marka Exp $
+; $Id: example.db.in,v 1.8.12.5 2004/05/05 01:32:15 marka Exp $
$TTL 300 ; 5 minutes
@ IN SOA mname1. . (
@@ -70,6 +70,10 @@ dynamic A 10.53.0.3
mustbesecure NS ns.mustbesecure
ns.mustbesecure A 10.53.0.3
+; A rfc2535 signed zone w/ CNAME
+rfc2535 NS ns.rfc2535
+ns.rfc2535 A 10.53.0.3
+
z A 10.0.0.26
keyless NS ns.keyless
diff --git a/bin/tests/system/dnssec/ns2/named.conf b/bin/tests/system/dnssec/ns2/named.conf
index cb25f8bf..359a579d 100644
--- a/bin/tests/system/dnssec/ns2/named.conf
+++ b/bin/tests/system/dnssec/ns2/named.conf
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: named.conf,v 1.17.12.5 2004/03/10 02:55:54 marka Exp $ */
+/* $Id: named.conf,v 1.17.12.6 2004/05/05 01:32:15 marka Exp $ */
// NS2
@@ -62,4 +62,10 @@ zone "insecure.secure.example" {
allow-update { any; };
};
+zone "rfc2335.example" {
+ type master;
+ file "rfc2335.example.db";
+};
+
+
include "trusted.conf";
diff --git a/bin/tests/system/dnssec/ns2/rfc2335.example.db b/bin/tests/system/dnssec/ns2/rfc2335.example.db
new file mode 100644
index 00000000..b8b477ea
--- /dev/null
+++ b/bin/tests/system/dnssec/ns2/rfc2335.example.db
@@ -0,0 +1,103 @@
+; File written on Fri Apr 30 12:19:15 2004
+; dnssec_signzone version 9.2.4rc3
+rfc2335.example. 300 IN SOA mname1. . (
+ 2000042407 ; serial
+ 20 ; refresh (20 seconds)
+ 20 ; retry (20 seconds)
+ 1814400 ; expire (3 weeks)
+ 3600 ; minimum (1 hour)
+ )
+ 300 SIG SOA 1 2 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ nGPJKIzF7X/hMJbZURRz59UeEi/6HRxCn9Er
+ GqSnpw0Ea9Yx5Axu6sLKnF7jXlkZ6NHMCIpJ
+ +Lv+FDHXTs/dQg== )
+ 300 NS ns.rfc2335.example.
+ 300 SIG NS 1 2 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ Q234AL9dJYMvxdWG33lpww6AJ3GplKp+ace7
+ MUaj0oqDdkx4DtJF2XaP2xcqq7kTOObdQ8ES
+ vVxNThqOx7LFzg== )
+ 300 KEY 256 3 1 (
+ AQPZhzXIabI8y5ihWUw7F0WxN2MabnYWkOcV
+ Fn11NgaGSdjBSYPRMMwMCasD5N2KYPRUP83W
+ y8mj+ofcoW1FurcZ
+ ) ; key id = 47799
+ 300 NXT a.rfc2335.example. NS SOA SIG KEY NXT
+ 300 SIG NXT 1 2 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ Y587mqNy6pBEfbsU6+weM2XRSqLwLwRT9Sl7
+ oNuOK9kV3TR4R2M54m2S0MgJCXbRAwU+fF8Q
+ UbZkSTVe2N8Nyg== )
+a.rfc2335.example. 300 IN A 10.0.0.1
+ 300 SIG A 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ FnfWrcw5ire8ut25504zti5l///BdDMUAkJZ
+ UCLFiTW4lBGMcq1pqz64zltDZXCgJ3xUeQ2i
+ nRt19/ZxO6Z1KA== )
+ 300 NXT b.rfc2335.example. A SIG NXT
+ 300 SIG NXT 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ R6SpC3ndMVg4u/eZaaUsXSuMHV/hZXeaM/Op
+ bJLAe3KxMiOHfb6XgLy7wflAiC1xt6A9bWpy
+ kTc5T5gfic33kA== )
+b.rfc2335.example. 300 IN A 10.0.0.2
+ 300 SIG A 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ zjRsYXMGyhDI6ipDtu8YXC9XPN+3hGamzzxL
+ 8uPE/LPo+x19MNdbzEgWzlajAf1/mkSGr2jN
+ BDMVBA5NMKpwAA== )
+ 300 NXT d.rfc2335.example. A SIG NXT
+ 300 SIG NXT 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ aV87iZCYsC5Tqop827Zzb18TNqopGt0QynkR
+ gIF/lIHqZasNFRfaS1/nTnXdDKD8JS5IqxKb
+ oTJr5zswDAtCEw== )
+d.rfc2335.example. 300 IN A 10.0.0.4
+ 300 SIG A 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ NsKyvhUYZxTbOTBX4YwxTxevI5iGBpULKwmt
+ +D4l00ME4XRygOVmiqVDTT9dF1EgjDxOdfMT
+ hSjtCh5M1b2f6g== )
+ 300 NXT ns.rfc2335.example. A SIG NXT
+ 300 SIG NXT 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ OGqlvSDZIZdHYigh4UAFzXfPze7vcQfgj7sN
+ +cAeoh4BL1gpa00DqANCxowNCYluDk3ZCDwt
+ UHZEJa8ZjNvv4g== )
+ns.rfc2335.example. 300 IN A 10.53.0.3
+ 300 SIG A 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ T6ZGeUWflLTku8jO23x/TeAPeUl8t0I18FCh
+ qHUZaHomLQasQ2jlZQn6cLpFd2uFJkBNxZ0G
+ I39aG7G1bObXdA== )
+ 300 NXT x.rfc2335.example. A SIG NXT
+ 300 SIG NXT 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ l46mrf3/Ii5iRm3AiDjYeMg4ZXBgitHxXA2y
+ e/NhKpkxRRpCs7UQ94wT/RiSCjjK49E5FBe6
+ 5bRxtWq0GI7zlg== )
+x.rfc2335.example. 300 IN CNAME a.rfc2335.example.
+ 300 SIG CNAME 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ L3IOluq+kboBd2gR2Mu54uJKCUzfmyHRiWKl
+ kfx+vuFr0I8mEHQRmJtouxNDrBzmzGp5vybK
+ SdabLWw0n6uQEA== )
+ 300 NXT z.rfc2335.example. CNAME SIG NXT
+ 300 SIG NXT 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ CBKoJSkZzdpwiON7JS4yPFY5VVeBjfT19x/O
+ vx+5UK1JZUNKhTXWWgW1er+JlLzNf4Ot40+l
+ z9HUTyaeS0eWyw== )
+z.rfc2335.example. 300 IN A 10.0.0.26
+ 300 SIG A 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ ccqjVHnehvVwlNNd4+7n/GzGlRjj+ul0gCT3
+ X3950LTccxHsOFyjNNm8v/Ho/aurSYdqXEjY
+ jwmjC6elwkzB7A== )
+ 300 NXT rfc2335.example. A SIG NXT
+ 300 SIG NXT 1 3 300 20040530021915 (
+ 20040430021915 47799 rfc2335.example.
+ W42WoFyd9erysv8HjKo+CpHIH1x6+pAKwCDO
+ /hHnkEpQI3brewxl7cWOPYeA92Ns80Ody/ui
+ m2E28A5gnmWqPw== )
diff --git a/bin/tests/system/dnssec/ns3/named.conf b/bin/tests/system/dnssec/ns3/named.conf
index a7f6c53d..96150349 100644
--- a/bin/tests/system/dnssec/ns3/named.conf
+++ b/bin/tests/system/dnssec/ns3/named.conf
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: named.conf,v 1.18.12.6 2004/04/15 23:56:26 marka Exp $ */
+/* $Id: named.conf,v 1.18.12.7 2004/05/05 01:32:16 marka Exp $ */
// NS3
@@ -79,4 +79,10 @@ zone "mustbesecure.example" {
file "mustbesecure.example.db";
};
+zone "rfc2335.example" {
+ type slave;
+ masters { 10.53.0.2; };
+ file "rfc2335.example.bk";
+};
+
include "trusted.conf";
diff --git a/bin/tests/system/dnssec/tests.sh b/bin/tests/system/dnssec/tests.sh
index 951c1567..eabce2fc 100644
--- a/bin/tests/system/dnssec/tests.sh
+++ b/bin/tests/system/dnssec/tests.sh
@@ -15,7 +15,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
-# $Id: tests.sh,v 1.33.12.4 2004/03/10 02:55:53 marka Exp $
+# $Id: tests.sh,v 1.33.12.6 2004/05/18 03:06:24 marka Exp $
SYSTEMTESTTOP=..
. $SYSTEMTESTTOP/conf.sh
@@ -441,11 +441,32 @@ n=`expr $n + 1`
if [ $ret != 0 ]; then echo "I:failed"; fi
status=`expr $status + $ret`
-echo "I:checking dnssec-lookaside-validation works ($n)"
+#echo "I:checking dnssec-lookaside-validation works ($n)"
+#ret=0
+#$DIG $DIGOPTS private.secure.example. SOA @10.53.0.6 \
+# > dig.out.ns6.test$n || ret=1
+#grep "flags:.*ad.*QUERY" dig.out.ns6.test$n > /dev/null || ret=1
+#n=`expr $n + 1`
+#if [ $ret != 0 ]; then echo "I:failed"; fi
+#status=`expr $status + $ret`
+
+echo "I:checking that we can load a rfc2535 signed zone ($n)"
ret=0
-$DIG $DIGOPTS private.secure.example. SOA @10.53.0.6 \
- > dig.out.ns6.test$n || ret=1
-grep "flags:.*ad.*QUERY" dig.out.ns6.test$n > /dev/null || ret=1
+$DIG $DIGOPTS rfc2535.example. SOA @10.53.0.2 \
+ > dig.out.ns2.test$n || ret=1
+grep "status: NOERROR" dig.out.ns2.test$n > /dev/null || ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
+
+echo "I:checking that we can transfer a rfc2535 signed zone ($n)"
+ret=0
+$DIG $DIGOPTS rfc2535.example. SOA @10.53.0.3 \
+ > dig.out.ns3.test$n || ret=1
+grep "status: NOERROR" dig.out.ns3.test$n > /dev/null || ret=1
+n=`expr $n + 1`
+if [ $ret != 0 ]; then echo "I:failed"; fi
+status=`expr $status + $ret`
# Run a minimal update test if possible. This is really just
# a regression test for RT #2399; more tests should be added.
diff --git a/bin/win32/BINDInstall/BINDInstallDlg.cpp b/bin/win32/BINDInstall/BINDInstallDlg.cpp
index 124b22d4..a9c7e68f 100644
--- a/bin/win32/BINDInstall/BINDInstallDlg.cpp
+++ b/bin/win32/BINDInstall/BINDInstallDlg.cpp
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: BINDInstallDlg.cpp,v 1.6.2.6.2.7 2004/04/19 06:39:55 marka Exp $ */
+/* $Id: BINDInstallDlg.cpp,v 1.6.2.6.2.10 2004/05/18 01:20:04 marka Exp $ */
/*
* Copyright (c) 1999-2000 by Nortel Networks Corporation
@@ -113,7 +113,10 @@ const FileData installFiles[] =
{"msvcrt.dll", FileData::WinSystem, FileData::Critical, TRUE},
# endif
#endif
-#if _MSC_VER > 1200
+#if _MSC_VER >= 1310
+ {"mfc71.dll", FileData::WinSystem, FileData::Critical, TRUE},
+ {"msvcr71.dll", FileData::WinSystem, FileData::Critical, TRUE},
+#elif _MSC_VER > 1200
{"mfc70.dll", FileData::WinSystem, FileData::Critical, TRUE},
{"msvcr70.dll", FileData::WinSystem, FileData::Critical, TRUE},
#endif
@@ -134,8 +137,6 @@ const FileData installFiles[] =
{"nslookup.exe", FileData::BinDir, FileData::Normal, FALSE},
{"rndc-confgen.exe", FileData::BinDir, FileData::Normal, FALSE},
{"dnssec-keygen.exe", FileData::BinDir, FileData::Normal, FALSE},
- {"dnssec-makekeyset.exe", FileData::BinDir, FileData::Normal, FALSE},
- {"dnssec-signkey.exe", FileData::BinDir, FileData::Normal, FALSE},
{"dnssec-signzone.exe", FileData::BinDir, FileData::Normal, FALSE},
{"named-checkconf.exe", FileData::BinDir, FileData::Normal, FALSE},
{"named-checkzone.exe", FileData::BinDir, FileData::Normal, FALSE},
diff --git a/configure b/configure
index e4673815..f9ce827f 100755
--- a/configure
+++ b/configure
@@ -14,7 +14,7 @@
# OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR
# PERFORMANCE OF THIS SOFTWARE.
#
-# $Id: configure,v 1.284.2.19.2.19 2004/03/14 00:00:31 marka Exp $
+# $Id: configure,v 1.284.2.19.2.20 2004/05/03 10:49:33 marka Exp $
#
# Portions Copyright (C) 1996-2001 Nominum, Inc.
#
@@ -29,7 +29,7 @@
# 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.
-# From configure.in Revision: 1.294.2.23.2.23 .
+# From configure.in Revision: 1.294.2.23.2.24 .
# Guess values for system-dependent variables and create Makefiles.
# Generated by GNU Autoconf 2.59.
#
@@ -24603,7 +24603,7 @@ case $host in
# project handles the AF_INET6 case correctly. We need to avoid
# using the former but prefer the latter unless overridden by
# --enable-getifaddrs=glibc.
- if $use_getifaddrs = glibc
+ if test $use_getifaddrs = glibc
then
echo "$as_me:$LINENO: checking for getifaddrs" >&5
echo $ECHO_N "checking for getifaddrs... $ECHO_C" >&6
diff --git a/configure.in b/configure.in
index 188875f9..7cbfe610 100644
--- a/configure.in
+++ b/configure.in
@@ -18,7 +18,7 @@ AC_DIVERT_PUSH(1)dnl
esyscmd([sed "s/^/# /" COPYRIGHT])dnl
AC_DIVERT_POP()dnl
-AC_REVISION($Revision: 1.294.2.23.2.23 $)
+AC_REVISION($Revision: 1.294.2.23.2.24 $)
AC_INIT(lib/dns/name.c)
AC_PREREQ(2.13)
@@ -1567,7 +1567,7 @@ case $host in
# project handles the AF_INET6 case correctly. We need to avoid
# using the former but prefer the latter unless overridden by
# --enable-getifaddrs=glibc.
- if $use_getifaddrs = glibc
+ if test $use_getifaddrs = glibc
then
AC_CHECK_FUNC(getifaddrs, AC_DEFINE(HAVE_GETIFADDRS))
else
diff --git a/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.3.0-patch b/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.3.0-patch
index 7f6f97eb..e95b1577 100644
--- a/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.3.0-patch
+++ b/contrib/idn/idnkit-1.0-src/patch/bind9/bind-9.3.0-patch
@@ -17,8 +17,8 @@ and install.
Index: README.idnkit
---- /dev/null Thu Apr 29 13:00:41 2004
-+++ README.idnkit Thu Apr 29 12:56:35 2004
+--- /dev/null Mon May 17 23:13:53 2004
++++ README.idnkit Mon May 17 20:30:40 2004
@@ -0,0 +1,113 @@
+
+ BIND-9 IDN patch
@@ -139,7 +139,7 @@ RCS file: /proj/cvs/prod/bind9/config.h.in,v
retrieving revision 1.47.2.3.2.9
diff -U2 -r1.47.2.3.2.9 config.h.in
--- config.h.in 14 Mar 2004 23:55:14 -0000 1.47.2.3.2.9
-+++ config.h.in 29 Apr 2004 03:01:39 -0000
++++ config.h.in 17 May 2004 13:17:58 -0000
@@ -17,5 +17,5 @@
*/
@@ -163,25 +163,25 @@ diff -U2 -r1.47.2.3.2.9 config.h.in
+
/* Define to 1 if you have the <stdint.h> header file. */
#undef HAVE_STDINT_H
-@@ -234,4 +240,7 @@
+@@ -233,4 +239,7 @@
+ /* Define to 1 if you can safely include both <sys/time.h> and <time.h>. */
#undef TIME_WITH_SYS_TIME
-
++
+/* define if idnkit support is to be included. */
+#undef WITH_IDN
-+
+
/* Define to 1 if your processor stores words with the most significant byte
- first (like Motorola and SPARC, unlike Intel and VAX). */
Index: configure
===================================================================
RCS file: /proj/cvs/prod/bind9/configure,v
-retrieving revision 1.284.2.19.2.19
-diff -U2 -r1.284.2.19.2.19 configure
---- configure 14 Mar 2004 00:00:31 -0000 1.284.2.19.2.19
-+++ configure 29 Apr 2004 03:02:43 -0000
+retrieving revision 1.284.2.19.2.20
+diff -U2 -r1.284.2.19.2.20 configure
+--- configure 3 May 2004 10:49:33 -0000 1.284.2.19.2.20
++++ configure 17 May 2004 13:19:02 -0000
@@ -15,5 +15,5 @@
# PERFORMANCE OF THIS SOFTWARE.
#
--# $Id: configure,v 1.284.2.19.2.19 2004/03/14 00:00:31 marka Exp $
+-# $Id: configure,v 1.284.2.19.2.20 2004/05/03 10:49:33 marka Exp $
+# $Id: COPYRIGHT,v 1.6.2.2.8.2 2004/03/08 04:04:12 marka Exp $
#
# Portions Copyright (C) 1996-2001 Nominum, Inc.
@@ -741,10 +741,10 @@ diff -U2 -r1.284.2.19.2.19 configure
Index: configure.in
===================================================================
RCS file: /proj/cvs/prod/bind9/configure.in,v
-retrieving revision 1.294.2.23.2.23
-diff -U2 -r1.294.2.23.2.23 configure.in
---- configure.in 13 Mar 2004 23:59:10 -0000 1.294.2.23.2.23
-+++ configure.in 29 Apr 2004 03:02:47 -0000
+retrieving revision 1.294.2.23.2.24
+diff -U2 -r1.294.2.23.2.24 configure.in
+--- configure.in 3 May 2004 10:47:32 -0000 1.294.2.23.2.24
++++ configure.in 17 May 2004 13:19:07 -0000
@@ -1994,4 +1994,80 @@
#
@@ -832,7 +832,7 @@ RCS file: /proj/cvs/prod/bind9/bin/dig/Makefile.in,v
retrieving revision 1.25.12.10
diff -U2 -r1.25.12.10 Makefile.in
--- bin/dig/Makefile.in 13 Apr 2004 05:47:32 -0000 1.25.12.10
-+++ bin/dig/Makefile.in 29 Apr 2004 03:02:48 -0000
++++ bin/dig/Makefile.in 17 May 2004 13:19:07 -0000
@@ -46,5 +46,5 @@
LIBS = ${LWRESLIBS} ${DNSLIBS} ${BIND9LIBS} ${ISCLIBS} \
@@ -846,7 +846,7 @@ RCS file: /proj/cvs/prod/bind9/bin/dig/dig.1,v
retrieving revision 1.14.2.4.2.5
diff -U2 -r1.14.2.4.2.5 dig.1
--- bin/dig/dig.1 13 Apr 2004 04:11:03 -0000 1.14.2.4.2.5
-+++ bin/dig/dig.1 29 Apr 2004 03:02:49 -0000
++++ bin/dig/dig.1 17 May 2004 13:19:08 -0000
@@ -385,4 +385,15 @@
will not print the initial query when it looks up the NS records for
isc.org.
@@ -869,7 +869,7 @@ RCS file: /proj/cvs/prod/bind9/bin/dig/dig.docbook,v
retrieving revision 1.4.2.7.4.8
diff -U2 -r1.4.2.7.4.8 dig.docbook
--- bin/dig/dig.docbook 13 Apr 2004 03:00:05 -0000 1.4.2.7.4.8
-+++ bin/dig/dig.docbook 29 Apr 2004 03:02:51 -0000
++++ bin/dig/dig.docbook 17 May 2004 13:19:09 -0000
@@ -575,4 +575,19 @@
<refsect1>
@@ -896,7 +896,7 @@ RCS file: /proj/cvs/prod/bind9/bin/dig/dighost.c,v
retrieving revision 1.221.2.19.2.11
diff -U2 -r1.221.2.19.2.11 dighost.c
--- bin/dig/dighost.c 13 Apr 2004 03:00:06 -0000 1.221.2.19.2.11
-+++ bin/dig/dighost.c 29 Apr 2004 03:03:00 -0000
++++ bin/dig/dighost.c 17 May 2004 13:19:19 -0000
@@ -42,4 +42,15 @@
#endif
@@ -1028,9 +1028,10 @@ diff -U2 -r1.221.2.19.2.11 dighost.c
+#endif
}
if (result != ISC_R_SUCCESS) {
-@@ -3154,4 +3239,102 @@
+@@ -3153,4 +3238,102 @@
+ isc_mem_destroy(&mctx);
}
-
++
+#ifdef WITH_IDN
+static void
+initialize_idn(void) {
@@ -1128,16 +1129,15 @@ diff -U2 -r1.221.2.19.2.11 dighost.c
+}
+
+#endif /* WITH_IDN */
-+
-
+
Index: bin/dig/host.1
===================================================================
RCS file: /proj/cvs/prod/bind9/bin/dig/host.1,v
retrieving revision 1.11.2.1.4.4
diff -U2 -r1.11.2.1.4.4 host.1
--- bin/dig/host.1 13 Apr 2004 04:11:03 -0000 1.11.2.1.4.4
-+++ bin/dig/host.1 29 Apr 2004 03:03:01 -0000
++++ bin/dig/host.1 17 May 2004 13:19:20 -0000
@@ -128,4 +128,15 @@
will be set to the number of seconds given by the hardware's maximum
value for an integer quantity.
@@ -1160,7 +1160,7 @@ RCS file: /proj/cvs/prod/bind9/bin/dig/host.docbook,v
retrieving revision 1.2.2.2.4.5
diff -U2 -r1.2.2.2.4.5 host.docbook
--- bin/dig/host.docbook 13 Apr 2004 01:26:26 -0000 1.2.2.2.4.5
-+++ bin/dig/host.docbook 29 Apr 2004 03:03:02 -0000
++++ bin/dig/host.docbook 17 May 2004 13:19:21 -0000
@@ -192,4 +192,19 @@
<refsect1>
@@ -1187,7 +1187,7 @@ RCS file: /proj/cvs/prod/bind9/lib/dns/name.c,v
retrieving revision 1.127.2.7.2.10
diff -U2 -r1.127.2.7.2.10 name.c
--- lib/dns/name.c 19 Apr 2004 21:55:38 -0000 1.127.2.7.2.10
-+++ lib/dns/name.c 29 Apr 2004 03:03:05 -0000
++++ lib/dns/name.c 17 May 2004 13:19:24 -0000
@@ -180,4 +180,11 @@
LIBDNS_EXTERNAL_DATA dns_name_t *dns_wildcardname = &wild;
@@ -1233,7 +1233,7 @@ RCS file: /proj/cvs/prod/bind9/lib/dns/include/dns/name.h,v
retrieving revision 1.95.2.3.2.8
diff -U2 -r1.95.2.3.2.8 name.h
--- lib/dns/include/dns/name.h 16 Mar 2004 12:57:17 -0000 1.95.2.3.2.8
-+++ lib/dns/include/dns/name.h 29 Apr 2004 03:03:07 -0000
++++ lib/dns/include/dns/name.h 17 May 2004 13:19:27 -0000
@@ -156,4 +156,15 @@
#define DNS_NAME_MAXWIRE 255
@@ -1250,9 +1250,10 @@ diff -U2 -r1.95.2.3.2.8 name.h
+
/***
*** Initialization
-@@ -1113,4 +1124,12 @@
+@@ -1112,4 +1123,12 @@
+ *
*/
-
++
+#ifdef WITH_IDN
+void
+dns_name_settotextfilter(dns_name_totextfilter_t proc);
@@ -1260,6 +1261,5 @@ diff -U2 -r1.95.2.3.2.8 name.h
+ * Call 'proc' at the end of dns_name_totext.
+ */
+#endif /* WITH_IDN */
-+
+
#define DNS_NAME_FORMATSIZE (DNS_NAME_MAXTEXT + 1)
- /*
diff --git a/contrib/queryperf/Makefile.in b/contrib/queryperf/Makefile.in
index 2ed19a47..5e49e49c 100644
--- a/contrib/queryperf/Makefile.in
+++ b/contrib/queryperf/Makefile.in
@@ -1,15 +1,23 @@
# Copyright (C) 2000, 2001 Nominum, Inc. All Rights Reserved.
CC = @CC@
+LIBOBJS = @LIBOBJS@
LIBS = @LIBS@
DEFS = @DEFS@
-queryperf: queryperf.o
- $(CC) $(CFLAGS) $(DEFS) queryperf.o $(LIBS) -lm -o queryperf
+queryperf: queryperf.o $(LIBOBJS)
+ $(CC) $(CFLAGS) $(DEFS) queryperf.o $(LIBOBJS) $(LIBS) -lm -o queryperf
queryperf.o: queryperf.c
$(CC) $(CFLAGS) $(DEFS) -c queryperf.c
+# under missing subdir
+getaddrinfo.o: ./missing/getaddrinfo.c
+ $(CC) $(CFLAGS) -c ./missing/$*.c
+
+getnameinfo.o: ./missing/getnameinfo.c
+ $(CC) $(CFLAGS) -c ./missing/$*.c
+
clean:
rm -f *.o queryperf
diff --git a/contrib/queryperf/configure b/contrib/queryperf/configure
index fb750cb1..89f56978 100755
--- a/contrib/queryperf/configure
+++ b/contrib/queryperf/configure
@@ -1,26 +1,273 @@
#! /bin/sh
-
# Guess values for system-dependent variables and create Makefiles.
-# Generated automatically using autoconf version 2.13
-# Copyright (C) 1992, 93, 94, 95, 96 Free Software Foundation, Inc.
+# Generated by GNU Autoconf 2.53.
#
+# Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+# Free Software Foundation, Inc.
# This configure script is free software; the Free Software Foundation
# gives unlimited permission to copy, distribute and modify it.
-# Defaults:
-ac_help=
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
+
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
+
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
+ { $as_unset LANG || test "${LANG+set}" != set; } ||
+ { LANG=C; export LANG; }
+(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
+ { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
+ { LC_ALL=C; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
+ { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
+ { LC_TIME=C; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
+ { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
+ { LC_CTYPE=C; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
+ { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
+ { LANGUAGE=C; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
+ { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
+ { LC_COLLATE=C; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
+ { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
+ { LC_NUMERIC=C; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
+ { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
+ { LC_MESSAGES=C; export LC_MESSAGES; }
+
+
+# Name of the executable.
+as_me=`(basename "$0") 2>/dev/null ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conftest.sh
+ echo "exit 0" >>conftest.sh
+ chmod +x conftest.sh
+ if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
+ else
+ PATH_SEPARATOR=:
+ fi
+ rm -f conftest.sh
+fi
+
+
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
+ esac
+
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
+
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
+ else
+ as_ln_s='ln -s'
+ fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
+
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+
+
+# Name of the host.
+# hostname on some systems (SVR3.2, Linux) returns a bogus exit status,
+# so uname gets run too.
+ac_hostname=`(hostname || uname -n) 2>/dev/null | sed 1q`
+
+exec 6>&1
+
+#
+# Initializations.
+#
ac_default_prefix=/usr/local
-# Any additions from configure.in:
+cross_compiling=no
+subdirs=
+MFLAGS=
+MAKEFLAGS=
+SHELL=${CONFIG_SHELL-/bin/sh}
+
+# Maximum number of lines to put in a shell here document.
+# This variable seems obsolete. It should probably be removed, and
+# only ac_max_sed_lines should be used.
+: ${ac_max_here_lines=38}
+
+# Identity of this package.
+PACKAGE_NAME=
+PACKAGE_TARNAME=
+PACKAGE_VERSION=
+PACKAGE_STRING=
+PACKAGE_BUGREPORT=
+
+ac_unique_file="queryperf.c"
# Initialize some variables set by options.
+ac_init_help=
+ac_init_version=false
# The variables have the same names as the options, with
# dashes changed to underlines.
-build=NONE
-cache_file=./config.cache
+cache_file=/dev/null
exec_prefix=NONE
-host=NONE
no_create=
-nonopt=NONE
no_recursion=
prefix=NONE
program_prefix=NONE
@@ -29,10 +276,15 @@ program_transform_name=s,x,x,
silent=
site=
srcdir=
-target=NONE
verbose=
x_includes=NONE
x_libraries=NONE
+
+# Installation directory options.
+# These are left unexpanded so users can "make install exec_prefix=/foo"
+# and all the variables that are supposed to be based on exec_prefix
+# by default will actually change.
+# Use braces instead of parens because sh, perl, etc. also accept them.
bindir='${exec_prefix}/bin'
sbindir='${exec_prefix}/sbin'
libexecdir='${exec_prefix}/libexec'
@@ -46,17 +298,9 @@ oldincludedir='/usr/include'
infodir='${prefix}/info'
mandir='${prefix}/man'
-# Initialize some other variables.
-subdirs=
-MFLAGS= MAKEFLAGS=
-SHELL=${CONFIG_SHELL-/bin/sh}
-# Maximum number of lines to put in a shell here document.
-ac_max_here_lines=12
-
ac_prev=
for ac_option
do
-
# If the previous option needs an argument, assign it.
if test -n "$ac_prev"; then
eval "$ac_prev=\$ac_option"
@@ -64,59 +308,59 @@ do
continue
fi
- case "$ac_option" in
- -*=*) ac_optarg=`echo "$ac_option" | sed 's/[-_a-zA-Z0-9]*=//'` ;;
- *) ac_optarg= ;;
- esac
+ ac_optarg=`expr "x$ac_option" : 'x[^=]*=\(.*\)'`
# Accept the important Cygnus configure options, so we can diagnose typos.
- case "$ac_option" in
+ case $ac_option in
-bindir | --bindir | --bindi | --bind | --bin | --bi)
ac_prev=bindir ;;
-bindir=* | --bindir=* | --bindi=* | --bind=* | --bin=* | --bi=*)
- bindir="$ac_optarg" ;;
+ bindir=$ac_optarg ;;
-build | --build | --buil | --bui | --bu)
- ac_prev=build ;;
+ ac_prev=build_alias ;;
-build=* | --build=* | --buil=* | --bui=* | --bu=*)
- build="$ac_optarg" ;;
+ build_alias=$ac_optarg ;;
-cache-file | --cache-file | --cache-fil | --cache-fi \
| --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
ac_prev=cache_file ;;
-cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
| --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* | --c=*)
- cache_file="$ac_optarg" ;;
+ cache_file=$ac_optarg ;;
+
+ --config-cache | -C)
+ cache_file=config.cache ;;
-datadir | --datadir | --datadi | --datad | --data | --dat | --da)
ac_prev=datadir ;;
-datadir=* | --datadir=* | --datadi=* | --datad=* | --data=* | --dat=* \
| --da=*)
- datadir="$ac_optarg" ;;
+ datadir=$ac_optarg ;;
-disable-* | --disable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*disable-//'`
+ ac_feature=`expr "x$ac_option" : 'x-*disable-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- eval "enable_${ac_feature}=no" ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ eval "enable_$ac_feature=no" ;;
-enable-* | --enable-*)
- ac_feature=`echo $ac_option|sed -e 's/-*enable-//' -e 's/=.*//'`
+ ac_feature=`expr "x$ac_option" : 'x-*enable-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_feature| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_feature: invalid feature name" 1>&2; exit 1; }
- fi
- ac_feature=`echo $ac_feature| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ expr "x$ac_feature" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid feature name: $ac_feature" >&2
+ { (exit 1); exit 1; }; }
+ ac_feature=`echo $ac_feature | sed 's/-/_/g'`
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "enable_${ac_feature}='$ac_optarg'" ;;
+ eval "enable_$ac_feature='$ac_optarg'" ;;
-exec-prefix | --exec_prefix | --exec-prefix | --exec-prefi \
| --exec-pref | --exec-pre | --exec-pr | --exec-p | --exec- \
@@ -125,95 +369,47 @@ do
-exec-prefix=* | --exec_prefix=* | --exec-prefix=* | --exec-prefi=* \
| --exec-pref=* | --exec-pre=* | --exec-pr=* | --exec-p=* | --exec-=* \
| --exec=* | --exe=* | --ex=*)
- exec_prefix="$ac_optarg" ;;
+ exec_prefix=$ac_optarg ;;
-gas | --gas | --ga | --g)
# Obsolete; use --with-gas.
with_gas=yes ;;
- -help | --help | --hel | --he)
- # Omit some internal or obsolete options to make the list less imposing.
- # This message is too long to be a string in the A/UX 3.1 sh.
- cat << EOF
-Usage: configure [options] [host]
-Options: [defaults in brackets after descriptions]
-Configuration:
- --cache-file=FILE cache test results in FILE
- --help print this message
- --no-create do not create output files
- --quiet, --silent do not print \`checking...' messages
- --version print the version of autoconf that created configure
-Directory and file names:
- --prefix=PREFIX install architecture-independent files in PREFIX
- [$ac_default_prefix]
- --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
- [same as prefix]
- --bindir=DIR user executables in DIR [EPREFIX/bin]
- --sbindir=DIR system admin executables in DIR [EPREFIX/sbin]
- --libexecdir=DIR program executables in DIR [EPREFIX/libexec]
- --datadir=DIR read-only architecture-independent data in DIR
- [PREFIX/share]
- --sysconfdir=DIR read-only single-machine data in DIR [PREFIX/etc]
- --sharedstatedir=DIR modifiable architecture-independent data in DIR
- [PREFIX/com]
- --localstatedir=DIR modifiable single-machine data in DIR [PREFIX/var]
- --libdir=DIR object code libraries in DIR [EPREFIX/lib]
- --includedir=DIR C header files in DIR [PREFIX/include]
- --oldincludedir=DIR C header files for non-gcc in DIR [/usr/include]
- --infodir=DIR info documentation in DIR [PREFIX/info]
- --mandir=DIR man documentation in DIR [PREFIX/man]
- --srcdir=DIR find the sources in DIR [configure dir or ..]
- --program-prefix=PREFIX prepend PREFIX to installed program names
- --program-suffix=SUFFIX append SUFFIX to installed program names
- --program-transform-name=PROGRAM
- run sed PROGRAM on installed program names
-EOF
- cat << EOF
-Host type:
- --build=BUILD configure for building on BUILD [BUILD=HOST]
- --host=HOST configure for HOST [guessed]
- --target=TARGET configure for TARGET [TARGET=HOST]
-Features and packages:
- --disable-FEATURE do not include FEATURE (same as --enable-FEATURE=no)
- --enable-FEATURE[=ARG] include FEATURE [ARG=yes]
- --with-PACKAGE[=ARG] use PACKAGE [ARG=yes]
- --without-PACKAGE do not use PACKAGE (same as --with-PACKAGE=no)
- --x-includes=DIR X include files are in DIR
- --x-libraries=DIR X library files are in DIR
-EOF
- if test -n "$ac_help"; then
- echo "--enable and --with options recognized:$ac_help"
- fi
- exit 0 ;;
+ -help | --help | --hel | --he | -h)
+ ac_init_help=long ;;
+ -help=r* | --help=r* | --hel=r* | --he=r* | -hr*)
+ ac_init_help=recursive ;;
+ -help=s* | --help=s* | --hel=s* | --he=s* | -hs*)
+ ac_init_help=short ;;
-host | --host | --hos | --ho)
- ac_prev=host ;;
+ ac_prev=host_alias ;;
-host=* | --host=* | --hos=* | --ho=*)
- host="$ac_optarg" ;;
+ host_alias=$ac_optarg ;;
-includedir | --includedir | --includedi | --included | --include \
| --includ | --inclu | --incl | --inc)
ac_prev=includedir ;;
-includedir=* | --includedir=* | --includedi=* | --included=* | --include=* \
| --includ=* | --inclu=* | --incl=* | --inc=*)
- includedir="$ac_optarg" ;;
+ includedir=$ac_optarg ;;
-infodir | --infodir | --infodi | --infod | --info | --inf)
ac_prev=infodir ;;
-infodir=* | --infodir=* | --infodi=* | --infod=* | --info=* | --inf=*)
- infodir="$ac_optarg" ;;
+ infodir=$ac_optarg ;;
-libdir | --libdir | --libdi | --libd)
ac_prev=libdir ;;
-libdir=* | --libdir=* | --libdi=* | --libd=*)
- libdir="$ac_optarg" ;;
+ libdir=$ac_optarg ;;
-libexecdir | --libexecdir | --libexecdi | --libexecd | --libexec \
| --libexe | --libex | --libe)
ac_prev=libexecdir ;;
-libexecdir=* | --libexecdir=* | --libexecdi=* | --libexecd=* | --libexec=* \
| --libexe=* | --libex=* | --libe=*)
- libexecdir="$ac_optarg" ;;
+ libexecdir=$ac_optarg ;;
-localstatedir | --localstatedir | --localstatedi | --localstated \
| --localstate | --localstat | --localsta | --localst \
@@ -222,19 +418,19 @@ EOF
-localstatedir=* | --localstatedir=* | --localstatedi=* | --localstated=* \
| --localstate=* | --localstat=* | --localsta=* | --localst=* \
| --locals=* | --local=* | --loca=* | --loc=* | --lo=*)
- localstatedir="$ac_optarg" ;;
+ localstatedir=$ac_optarg ;;
-mandir | --mandir | --mandi | --mand | --man | --ma | --m)
ac_prev=mandir ;;
-mandir=* | --mandir=* | --mandi=* | --mand=* | --man=* | --ma=* | --m=*)
- mandir="$ac_optarg" ;;
+ mandir=$ac_optarg ;;
-nfp | --nfp | --nf)
# Obsolete; use --without-fp.
with_fp=no ;;
-no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c)
+ | --no-cr | --no-c | -n)
no_create=yes ;;
-no-recursion | --no-recursion | --no-recursio | --no-recursi \
@@ -248,26 +444,26 @@ EOF
-oldincludedir=* | --oldincludedir=* | --oldincludedi=* | --oldincluded=* \
| --oldinclude=* | --oldinclud=* | --oldinclu=* | --oldincl=* | --oldinc=* \
| --oldin=* | --oldi=* | --old=* | --ol=* | --o=*)
- oldincludedir="$ac_optarg" ;;
+ oldincludedir=$ac_optarg ;;
-prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
ac_prev=prefix ;;
-prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
- prefix="$ac_optarg" ;;
+ prefix=$ac_optarg ;;
-program-prefix | --program-prefix | --program-prefi | --program-pref \
| --program-pre | --program-pr | --program-p)
ac_prev=program_prefix ;;
-program-prefix=* | --program-prefix=* | --program-prefi=* \
| --program-pref=* | --program-pre=* | --program-pr=* | --program-p=*)
- program_prefix="$ac_optarg" ;;
+ program_prefix=$ac_optarg ;;
-program-suffix | --program-suffix | --program-suffi | --program-suff \
| --program-suf | --program-su | --program-s)
ac_prev=program_suffix ;;
-program-suffix=* | --program-suffix=* | --program-suffi=* \
| --program-suff=* | --program-suf=* | --program-su=* | --program-s=*)
- program_suffix="$ac_optarg" ;;
+ program_suffix=$ac_optarg ;;
-program-transform-name | --program-transform-name \
| --program-transform-nam | --program-transform-na \
@@ -284,7 +480,7 @@ EOF
| --program-transfo=* | --program-transf=* \
| --program-trans=* | --program-tran=* \
| --progr-tra=* | --program-tr=* | --program-t=*)
- program_transform_name="$ac_optarg" ;;
+ program_transform_name=$ac_optarg ;;
-q | -quiet | --quiet | --quie | --qui | --qu | --q \
| -silent | --silent | --silen | --sile | --sil)
@@ -294,7 +490,7 @@ EOF
ac_prev=sbindir ;;
-sbindir=* | --sbindir=* | --sbindi=* | --sbind=* | --sbin=* \
| --sbi=* | --sb=*)
- sbindir="$ac_optarg" ;;
+ sbindir=$ac_optarg ;;
-sharedstatedir | --sharedstatedir | --sharedstatedi \
| --sharedstated | --sharedstate | --sharedstat | --sharedsta \
@@ -305,58 +501,57 @@ EOF
| --sharedstated=* | --sharedstate=* | --sharedstat=* | --sharedsta=* \
| --sharedst=* | --shareds=* | --shared=* | --share=* | --shar=* \
| --sha=* | --sh=*)
- sharedstatedir="$ac_optarg" ;;
+ sharedstatedir=$ac_optarg ;;
-site | --site | --sit)
ac_prev=site ;;
-site=* | --site=* | --sit=*)
- site="$ac_optarg" ;;
+ site=$ac_optarg ;;
-srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
ac_prev=srcdir ;;
-srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
- srcdir="$ac_optarg" ;;
+ srcdir=$ac_optarg ;;
-sysconfdir | --sysconfdir | --sysconfdi | --sysconfd | --sysconf \
| --syscon | --sysco | --sysc | --sys | --sy)
ac_prev=sysconfdir ;;
-sysconfdir=* | --sysconfdir=* | --sysconfdi=* | --sysconfd=* | --sysconf=* \
| --syscon=* | --sysco=* | --sysc=* | --sys=* | --sy=*)
- sysconfdir="$ac_optarg" ;;
+ sysconfdir=$ac_optarg ;;
-target | --target | --targe | --targ | --tar | --ta | --t)
- ac_prev=target ;;
+ ac_prev=target_alias ;;
-target=* | --target=* | --targe=* | --targ=* | --tar=* | --ta=* | --t=*)
- target="$ac_optarg" ;;
+ target_alias=$ac_optarg ;;
-v | -verbose | --verbose | --verbos | --verbo | --verb)
verbose=yes ;;
- -version | --version | --versio | --versi | --vers)
- echo "configure generated by autoconf version 2.13"
- exit 0 ;;
+ -version | --version | --versio | --versi | --vers | -V)
+ ac_init_version=: ;;
-with-* | --with-*)
- ac_package=`echo $ac_option|sed -e 's/-*with-//' -e 's/=.*//'`
+ ac_package=`expr "x$ac_option" : 'x-*with-\([^=]*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-_a-zA-Z0-9]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
ac_package=`echo $ac_package| sed 's/-/_/g'`
- case "$ac_option" in
- *=*) ;;
+ case $ac_option in
+ *=*) ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`;;
*) ac_optarg=yes ;;
esac
- eval "with_${ac_package}='$ac_optarg'" ;;
+ eval "with_$ac_package='$ac_optarg'" ;;
-without-* | --without-*)
- ac_package=`echo $ac_option|sed -e 's/-*without-//'`
+ ac_package=`expr "x$ac_option" : 'x-*without-\(.*\)'`
# Reject names that are not valid shell variable names.
- if test -n "`echo $ac_package| sed 's/[-a-zA-Z0-9_]//g'`"; then
- { echo "configure: error: $ac_package: invalid package name" 1>&2; exit 1; }
- fi
- ac_package=`echo $ac_package| sed 's/-/_/g'`
- eval "with_${ac_package}=no" ;;
+ expr "x$ac_package" : ".*[^-_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid package name: $ac_package" >&2
+ { (exit 1); exit 1; }; }
+ ac_package=`echo $ac_package | sed 's/-/_/g'`
+ eval "with_$ac_package=no" ;;
--x)
# Obsolete; use --with-x.
@@ -367,99 +562,110 @@ EOF
ac_prev=x_includes ;;
-x-includes=* | --x-includes=* | --x-include=* | --x-includ=* | --x-inclu=* \
| --x-incl=* | --x-inc=* | --x-in=* | --x-i=*)
- x_includes="$ac_optarg" ;;
+ x_includes=$ac_optarg ;;
-x-libraries | --x-libraries | --x-librarie | --x-librari \
| --x-librar | --x-libra | --x-libr | --x-lib | --x-li | --x-l)
ac_prev=x_libraries ;;
-x-libraries=* | --x-libraries=* | --x-librarie=* | --x-librari=* \
| --x-librar=* | --x-libra=* | --x-libr=* | --x-lib=* | --x-li=* | --x-l=*)
- x_libraries="$ac_optarg" ;;
+ x_libraries=$ac_optarg ;;
- -*) { echo "configure: error: $ac_option: invalid option; use --help to show usage" 1>&2; exit 1; }
+ -*) { echo "$as_me: error: unrecognized option: $ac_option
+Try \`$0 --help' for more information." >&2
+ { (exit 1); exit 1; }; }
;;
+ *=*)
+ ac_envvar=`expr "x$ac_option" : 'x\([^=]*\)='`
+ # Reject names that are not valid shell variable names.
+ expr "x$ac_envvar" : ".*[^_$as_cr_alnum]" >/dev/null &&
+ { echo "$as_me: error: invalid variable name: $ac_envvar" >&2
+ { (exit 1); exit 1; }; }
+ ac_optarg=`echo "$ac_optarg" | sed "s/'/'\\\\\\\\''/g"`
+ eval "$ac_envvar='$ac_optarg'"
+ export $ac_envvar ;;
+
*)
- if test -n "`echo $ac_option| sed 's/[-a-z0-9.]//g'`"; then
- echo "configure: warning: $ac_option: invalid host type" 1>&2
- fi
- if test "x$nonopt" != xNONE; then
- { echo "configure: error: can only configure for one host and one target at a time" 1>&2; exit 1; }
- fi
- nonopt="$ac_option"
+ # FIXME: should be removed in autoconf 3.0.
+ echo "$as_me: WARNING: you should use --build, --host, --target" >&2
+ expr "x$ac_option" : ".*[^-._$as_cr_alnum]" >/dev/null &&
+ echo "$as_me: WARNING: invalid host type: $ac_option" >&2
+ : ${build_alias=$ac_option} ${host_alias=$ac_option} ${target_alias=$ac_option}
;;
esac
done
if test -n "$ac_prev"; then
- { echo "configure: error: missing argument to --`echo $ac_prev | sed 's/_/-/g'`" 1>&2; exit 1; }
+ ac_option=--`echo $ac_prev | sed 's/_/-/g'`
+ { echo "$as_me: error: missing argument to $ac_option" >&2
+ { (exit 1); exit 1; }; }
fi
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
-# File descriptor usage:
-# 0 standard input
-# 1 file creation
-# 2 errors and warnings
-# 3 some systems may open it to /dev/tty
-# 4 used on the Kubota Titan
-# 6 checking for... messages and results
-# 5 compiler messages saved in config.log
-if test "$silent" = yes; then
- exec 6>/dev/null
-else
- exec 6>&1
-fi
-exec 5>./config.log
-
-echo "\
-This file contains any messages produced by compilers while
-running configure, to aid debugging if configure makes a mistake.
-" 1>&5
+# Be sure to have absolute paths.
+for ac_var in exec_prefix prefix
+do
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* | NONE | '' ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
+ esac
+done
-# Strip out --no-create and --no-recursion so they do not pile up.
-# Also quote any args containing shell metacharacters.
-ac_configure_args=
-for ac_arg
+# Be sure to have absolute paths.
+for ac_var in bindir sbindir libexecdir datadir sysconfdir sharedstatedir \
+ localstatedir libdir includedir oldincludedir infodir mandir
do
- case "$ac_arg" in
- -no-create | --no-create | --no-creat | --no-crea | --no-cre \
- | --no-cr | --no-c) ;;
- -no-recursion | --no-recursion | --no-recursio | --no-recursi \
- | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r) ;;
- *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?]*)
- ac_configure_args="$ac_configure_args '$ac_arg'" ;;
- *) ac_configure_args="$ac_configure_args $ac_arg" ;;
+ eval ac_val=$`echo $ac_var`
+ case $ac_val in
+ [\\/$]* | ?:[\\/]* ) ;;
+ *) { echo "$as_me: error: expected an absolute directory name for --$ac_var: $ac_val" >&2
+ { (exit 1); exit 1; }; };;
esac
done
-# NLS nuisances.
-# Only set these to C if already set. These must not be set unconditionally
-# because not all systems understand e.g. LANG=C (notably SCO).
-# Fixing LC_MESSAGES prevents Solaris sh from translating var values in `set'!
-# Non-C LC_CTYPE values break the ctype check.
-if test "${LANG+set}" = set; then LANG=C; export LANG; fi
-if test "${LC_ALL+set}" = set; then LC_ALL=C; export LC_ALL; fi
-if test "${LC_MESSAGES+set}" = set; then LC_MESSAGES=C; export LC_MESSAGES; fi
-if test "${LC_CTYPE+set}" = set; then LC_CTYPE=C; export LC_CTYPE; fi
+# There might be people who depend on the old broken behavior: `$host'
+# used to hold the argument of --host etc.
+# FIXME: To remove some day.
+build=$build_alias
+host=$host_alias
+target=$target_alias
+
+# FIXME: To remove some day.
+if test "x$host_alias" != x; then
+ if test "x$build_alias" = x; then
+ cross_compiling=maybe
+ echo "$as_me: WARNING: If you wanted to set the --build type, don't use --host.
+ If a cross compiler is detected then cross compile mode will be used." >&2
+ elif test "x$build_alias" != "x$host_alias"; then
+ cross_compiling=yes
+ fi
+fi
-# confdefs.h avoids OS command line length limits that DEFS can exceed.
-rm -rf conftest* confdefs.h
-# AIX cpp loses on an empty file, so make sure it contains at least a newline.
-echo > confdefs.h
+ac_tool_prefix=
+test -n "$host_alias" && ac_tool_prefix=$host_alias-
+
+test "$silent" = yes && exec 6>/dev/null
-# A filename unique to this package, relative to the directory that
-# configure is in, which we can look for to find out if srcdir is correct.
-ac_unique_file=queryperf.c
# Find the source files, if location was not specified.
if test -z "$srcdir"; then
ac_srcdir_defaulted=yes
# Try the directory containing this script, then its parent.
- ac_prog=$0
- ac_confdir=`echo $ac_prog|sed 's%/[^/][^/]*$%%'`
- test "x$ac_confdir" = "x$ac_prog" && ac_confdir=.
+ ac_confdir=`(dirname "$0") 2>/dev/null ||
+$as_expr X"$0" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$0" : 'X\(//\)[^/]' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$0" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
srcdir=$ac_confdir
if test ! -r $srcdir/$ac_unique_file; then
srcdir=..
@@ -469,13 +675,357 @@ else
fi
if test ! -r $srcdir/$ac_unique_file; then
if test "$ac_srcdir_defaulted" = yes; then
- { echo "configure: error: can not find sources in $ac_confdir or .." 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $ac_confdir or .." >&2
+ { (exit 1); exit 1; }; }
else
- { echo "configure: error: can not find sources in $srcdir" 1>&2; exit 1; }
+ { echo "$as_me: error: cannot find sources ($ac_unique_file) in $srcdir" >&2
+ { (exit 1); exit 1; }; }
fi
fi
-srcdir=`echo "${srcdir}" | sed 's%\([^/]\)/*$%\1%'`
+srcdir=`echo "$srcdir" | sed 's%\([^\\/]\)[\\/]*$%\1%'`
+ac_env_build_alias_set=${build_alias+set}
+ac_env_build_alias_value=$build_alias
+ac_cv_env_build_alias_set=${build_alias+set}
+ac_cv_env_build_alias_value=$build_alias
+ac_env_host_alias_set=${host_alias+set}
+ac_env_host_alias_value=$host_alias
+ac_cv_env_host_alias_set=${host_alias+set}
+ac_cv_env_host_alias_value=$host_alias
+ac_env_target_alias_set=${target_alias+set}
+ac_env_target_alias_value=$target_alias
+ac_cv_env_target_alias_set=${target_alias+set}
+ac_cv_env_target_alias_value=$target_alias
+ac_env_CC_set=${CC+set}
+ac_env_CC_value=$CC
+ac_cv_env_CC_set=${CC+set}
+ac_cv_env_CC_value=$CC
+ac_env_CFLAGS_set=${CFLAGS+set}
+ac_env_CFLAGS_value=$CFLAGS
+ac_cv_env_CFLAGS_set=${CFLAGS+set}
+ac_cv_env_CFLAGS_value=$CFLAGS
+ac_env_LDFLAGS_set=${LDFLAGS+set}
+ac_env_LDFLAGS_value=$LDFLAGS
+ac_cv_env_LDFLAGS_set=${LDFLAGS+set}
+ac_cv_env_LDFLAGS_value=$LDFLAGS
+ac_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_env_CPPFLAGS_value=$CPPFLAGS
+ac_cv_env_CPPFLAGS_set=${CPPFLAGS+set}
+ac_cv_env_CPPFLAGS_value=$CPPFLAGS
+
+#
+# Report the --help message.
+#
+if test "$ac_init_help" = "long"; then
+ # Omit some internal or obsolete options to make the list less imposing.
+ # This message is too long to be a string in the A/UX 3.1 sh.
+ cat <<_ACEOF
+\`configure' configures this package to adapt to many kinds of systems.
+
+Usage: $0 [OPTION]... [VAR=VALUE]...
+
+To assign environment variables (e.g., CC, CFLAGS...), specify them as
+VAR=VALUE. See below for descriptions of some of the useful variables.
+
+Defaults for the options are specified in brackets.
+
+Configuration:
+ -h, --help display this help and exit
+ --help=short display options specific to this package
+ --help=recursive display the short help of all the included packages
+ -V, --version display version information and exit
+ -q, --quiet, --silent do not print \`checking...' messages
+ --cache-file=FILE cache test results in FILE [disabled]
+ -C, --config-cache alias for \`--cache-file=config.cache'
+ -n, --no-create do not create output files
+ --srcdir=DIR find the sources in DIR [configure dir or \`..']
+
+_ACEOF
+
+ cat <<_ACEOF
+Installation directories:
+ --prefix=PREFIX install architecture-independent files in PREFIX
+ [$ac_default_prefix]
+ --exec-prefix=EPREFIX install architecture-dependent files in EPREFIX
+ [PREFIX]
+
+By default, \`make install' will install all the files in
+\`$ac_default_prefix/bin', \`$ac_default_prefix/lib' etc. You can specify
+an installation prefix other than \`$ac_default_prefix' using \`--prefix',
+for instance \`--prefix=\$HOME'.
+
+For better control, use the options below.
+
+Fine tuning of the installation directories:
+ --bindir=DIR user executables [EPREFIX/bin]
+ --sbindir=DIR system admin executables [EPREFIX/sbin]
+ --libexecdir=DIR program executables [EPREFIX/libexec]
+ --datadir=DIR read-only architecture-independent data [PREFIX/share]
+ --sysconfdir=DIR read-only single-machine data [PREFIX/etc]
+ --sharedstatedir=DIR modifiable architecture-independent data [PREFIX/com]
+ --localstatedir=DIR modifiable single-machine data [PREFIX/var]
+ --libdir=DIR object code libraries [EPREFIX/lib]
+ --includedir=DIR C header files [PREFIX/include]
+ --oldincludedir=DIR C header files for non-gcc [/usr/include]
+ --infodir=DIR info documentation [PREFIX/info]
+ --mandir=DIR man documentation [PREFIX/man]
+_ACEOF
+
+ cat <<\_ACEOF
+_ACEOF
+fi
+
+if test -n "$ac_init_help"; then
+
+ cat <<\_ACEOF
+
+Some influential environment variables:
+ CC C compiler command
+ CFLAGS C compiler flags
+ LDFLAGS linker flags, e.g. -L<lib dir> if you have libraries in a
+ nonstandard directory <lib dir>
+ CPPFLAGS C/C++ preprocessor flags, e.g. -I<include dir> if you have
+ headers in a nonstandard directory <include dir>
+
+Use these variables to override the choices made by `configure' or to help
+it to find libraries and programs with nonstandard names/locations.
+
+_ACEOF
+fi
+
+if test "$ac_init_help" = "recursive"; then
+ # If there are subdirs, report their specific --help.
+ ac_popdir=`pwd`
+ for ac_dir in : $ac_subdirs_all; do test "x$ac_dir" = x: && continue
+ test -d $ac_dir || continue
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+ cd $ac_dir
+ # Check for guested configure; otherwise get Cygnus style configure.
+ if test -f $ac_srcdir/configure.gnu; then
+ echo
+ $SHELL $ac_srcdir/configure.gnu --help=recursive
+ elif test -f $ac_srcdir/configure; then
+ echo
+ $SHELL $ac_srcdir/configure --help=recursive
+ elif test -f $ac_srcdir/configure.ac ||
+ test -f $ac_srcdir/configure.in; then
+ echo
+ $ac_configure --help
+ else
+ echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2
+ fi
+ cd $ac_popdir
+ done
+fi
+
+test -n "$ac_init_help" && exit 0
+if $ac_init_version; then
+ cat <<\_ACEOF
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001, 2002
+Free Software Foundation, Inc.
+This configure script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it.
+_ACEOF
+ exit 0
+fi
+exec 5>config.log
+cat >&5 <<_ACEOF
+This file contains any messages produced by compilers while
+running configure, to aid debugging if configure makes a mistake.
+
+It was created by $as_me, which was
+generated by GNU Autoconf 2.53. Invocation command line was
+
+ $ $0 $@
+
+_ACEOF
+{
+cat <<_ASUNAME
+## --------- ##
+## Platform. ##
+## --------- ##
+
+hostname = `(hostname || uname -n) 2>/dev/null | sed 1q`
+uname -m = `(uname -m) 2>/dev/null || echo unknown`
+uname -r = `(uname -r) 2>/dev/null || echo unknown`
+uname -s = `(uname -s) 2>/dev/null || echo unknown`
+uname -v = `(uname -v) 2>/dev/null || echo unknown`
+
+/usr/bin/uname -p = `(/usr/bin/uname -p) 2>/dev/null || echo unknown`
+/bin/uname -X = `(/bin/uname -X) 2>/dev/null || echo unknown`
+
+/bin/arch = `(/bin/arch) 2>/dev/null || echo unknown`
+/usr/bin/arch -k = `(/usr/bin/arch -k) 2>/dev/null || echo unknown`
+/usr/convex/getsysinfo = `(/usr/convex/getsysinfo) 2>/dev/null || echo unknown`
+hostinfo = `(hostinfo) 2>/dev/null || echo unknown`
+/bin/machine = `(/bin/machine) 2>/dev/null || echo unknown`
+/usr/bin/oslevel = `(/usr/bin/oslevel) 2>/dev/null || echo unknown`
+/bin/universe = `(/bin/universe) 2>/dev/null || echo unknown`
+
+_ASUNAME
+
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ echo "PATH: $as_dir"
+done
+
+} >&5
+
+cat >&5 <<_ACEOF
+
+
+## ----------- ##
+## Core tests. ##
+## ----------- ##
+_ACEOF
+
+
+# Keep a trace of the command line.
+# Strip out --no-create and --no-recursion so they do not pile up.
+# Also quote any args containing shell meta-characters.
+ac_configure_args=
+ac_sep=
+for ac_arg
+do
+ case $ac_arg in
+ -no-create | --no-create | --no-creat | --no-crea | --no-cre \
+ | --no-cr | --no-c | -n ) continue ;;
+ -no-recursion | --no-recursion | --no-recursio | --no-recursi \
+ | --no-recurs | --no-recur | --no-recu | --no-rec | --no-re | --no-r)
+ continue ;;
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=`echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args$ac_sep'$ac_arg'"
+ ac_sep=" " ;;
+ esac
+ # Get rid of the leading space.
+done
+
+# When interrupted or exit'd, cleanup temporary files, and complete
+# config.log. We remove comments because anyway the quotes in there
+# would cause problems or look ugly.
+# WARNING: Be sure not to use single quotes in there, as some shells,
+# such as our DU 5.0 friend, will then `close' the trap.
+trap 'exit_status=$?
+ # Save into config.log some information that might help in debugging.
+ {
+ echo
+ cat <<\_ASBOX
+## ---------------- ##
+## Cache variables. ##
+## ---------------- ##
+_ASBOX
+ echo
+ # The following way of writing the cache mishandles newlines in values,
+{
+ (set) 2>&1 |
+ case `(ac_space='"'"' '"'"'; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ sed -n \
+ "s/'"'"'/'"'"'\\\\'"'"''"'"'/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='"'"'\\2'"'"'/p"
+ ;;
+ *)
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+}
+ echo
+ if test -s confdefs.h; then
+ cat <<\_ASBOX
+## ----------- ##
+## confdefs.h. ##
+## ----------- ##
+_ASBOX
+ echo
+ sed "/^$/d" confdefs.h
+ echo
+ fi
+ test "$ac_signal" != 0 &&
+ echo "$as_me: caught signal $ac_signal"
+ echo "$as_me: exit $exit_status"
+ } >&5
+ rm -f core core.* *.core &&
+ rm -rf conftest* confdefs* conf$$* $ac_clean_files &&
+ exit $exit_status
+ ' 0
+for ac_signal in 1 2 13 15; do
+ trap 'ac_signal='$ac_signal'; { (exit 1); exit 1; }' $ac_signal
+done
+ac_signal=0
+
+# confdefs.h avoids OS command line length limits that DEFS can exceed.
+rm -rf conftest* confdefs.h
+# AIX cpp loses on an empty file, so make sure it contains at least a newline.
+echo >confdefs.h
+
+# Predefined preprocessor variables.
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_NAME "$PACKAGE_NAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_TARNAME "$PACKAGE_TARNAME"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_VERSION "$PACKAGE_VERSION"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_STRING "$PACKAGE_STRING"
+_ACEOF
+
+
+cat >>confdefs.h <<_ACEOF
+#define PACKAGE_BUGREPORT "$PACKAGE_BUGREPORT"
+_ACEOF
+
+
+# Let the site file select an alternate cache file if it wants to.
# Prefer explicitly selected file to automatically selected ones.
if test -z "$CONFIG_SITE"; then
if test "x$prefix" != xNONE; then
@@ -486,252 +1036,729 @@ if test -z "$CONFIG_SITE"; then
fi
for ac_site_file in $CONFIG_SITE; do
if test -r "$ac_site_file"; then
- echo "loading site script $ac_site_file"
+ { echo "$as_me:$LINENO: loading site script $ac_site_file" >&5
+echo "$as_me: loading site script $ac_site_file" >&6;}
+ sed 's/^/| /' "$ac_site_file" >&5
. "$ac_site_file"
fi
done
if test -r "$cache_file"; then
- echo "loading cache $cache_file"
- . $cache_file
+ # Some versions of bash will fail to source /dev/null (special
+ # files actually), so we avoid doing that.
+ if test -f "$cache_file"; then
+ { echo "$as_me:$LINENO: loading cache $cache_file" >&5
+echo "$as_me: loading cache $cache_file" >&6;}
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) . $cache_file;;
+ *) . ./$cache_file;;
+ esac
+ fi
else
- echo "creating cache $cache_file"
- > $cache_file
+ { echo "$as_me:$LINENO: creating cache $cache_file" >&5
+echo "$as_me: creating cache $cache_file" >&6;}
+ >$cache_file
+fi
+
+# Check that the precious variables saved in the cache have kept the same
+# value.
+ac_cache_corrupted=false
+for ac_var in `(set) 2>&1 |
+ sed -n 's/^ac_env_\([a-zA-Z_0-9]*\)_set=.*/\1/p'`; do
+ eval ac_old_set=\$ac_cv_env_${ac_var}_set
+ eval ac_new_set=\$ac_env_${ac_var}_set
+ eval ac_old_val="\$ac_cv_env_${ac_var}_value"
+ eval ac_new_val="\$ac_env_${ac_var}_value"
+ case $ac_old_set,$ac_new_set in
+ set,)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was set to \`$ac_old_val' in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,set)
+ { echo "$as_me:$LINENO: error: \`$ac_var' was not set in the previous run" >&5
+echo "$as_me: error: \`$ac_var' was not set in the previous run" >&2;}
+ ac_cache_corrupted=: ;;
+ ,);;
+ *)
+ if test "x$ac_old_val" != "x$ac_new_val"; then
+ { echo "$as_me:$LINENO: error: \`$ac_var' has changed since the previous run:" >&5
+echo "$as_me: error: \`$ac_var' has changed since the previous run:" >&2;}
+ { echo "$as_me:$LINENO: former value: $ac_old_val" >&5
+echo "$as_me: former value: $ac_old_val" >&2;}
+ { echo "$as_me:$LINENO: current value: $ac_new_val" >&5
+echo "$as_me: current value: $ac_new_val" >&2;}
+ ac_cache_corrupted=:
+ fi;;
+ esac
+ # Pass precious variables to config.status.
+ if test "$ac_new_set" = set; then
+ case $ac_new_val in
+ *" "*|*" "*|*[\[\]\~\#\$\^\&\*\(\)\{\}\\\|\;\<\>\?\"\']*)
+ ac_arg=$ac_var=`echo "$ac_new_val" | sed "s/'/'\\\\\\\\''/g"` ;;
+ *) ac_arg=$ac_var=$ac_new_val ;;
+ esac
+ case " $ac_configure_args " in
+ *" '$ac_arg' "*) ;; # Avoid dups. Use of quotes ensures accuracy.
+ *) ac_configure_args="$ac_configure_args '$ac_arg'" ;;
+ esac
+ fi
+done
+if $ac_cache_corrupted; then
+ { echo "$as_me:$LINENO: error: changes in the environment can compromise the build" >&5
+echo "$as_me: error: changes in the environment can compromise the build" >&2;}
+ { { echo "$as_me:$LINENO: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&5
+echo "$as_me: error: run \`make distclean' and/or \`rm $cache_file' and start over" >&2;}
+ { (exit 1); exit 1; }; }
fi
ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-ac_exeext=
-ac_objext=o
-if (echo "testing\c"; echo 1,2,3) | grep c >/dev/null; then
- # Stardent Vistra SVR4 grep lacks -e, says ghazi@caip.rutgers.edu.
- if (echo -n testing; echo 1,2,3) | sed s/-n/xn/ | grep xn >/dev/null; then
- ac_n= ac_c='
-' ac_t=' '
- else
- ac_n=-n ac_c= ac_t=
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
+if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}gcc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$CC"; then
+ ac_cv_prog_CC="$CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
+done
+done
+
+fi
+fi
+CC=$ac_cv_prog_CC
+if test -n "$CC"; then
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- ac_n= ac_c='\c' ac_t=
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "gcc", so it can be a program name with args.
+set dummy gcc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="gcc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
-
-# Extract the first word of "gcc", so it can be a program name with args.
-set dummy gcc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:531: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ # Extract the first word of "${ac_tool_prefix}cc", so it can be a program name with args.
+set dummy ${ac_tool_prefix}cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="gcc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="${ac_tool_prefix}cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
+fi
+if test -z "$ac_cv_prog_CC"; then
+ ac_ct_CC=$CC
+ # Extract the first word of "cc", so it can be a program name with args.
+set dummy cc; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
+fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ CC=$ac_ct_CC
+else
+ CC="$ac_cv_prog_CC"
+fi
+
+fi
if test -z "$CC"; then
# Extract the first word of "cc", so it can be a program name with args.
set dummy cc; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:561: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
ac_prog_rejected=no
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- if test "$ac_dir/$ac_word" = "/usr/ucb/cc"; then
- ac_prog_rejected=yes
- continue
- fi
- ac_cv_prog_CC="cc"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ if test "$as_dir/$ac_word$ac_exec_ext" = "/usr/ucb/cc"; then
+ ac_prog_rejected=yes
+ continue
+ fi
+ ac_cv_prog_CC="cc"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
if test $ac_prog_rejected = yes; then
# We found a bogon in the path, so make sure we never use it.
set dummy $ac_cv_prog_CC
shift
- if test $# -gt 0; then
+ if test $# != 0; then
# We chose a different compiler from the bogus one.
# However, it has the same basename, so the bogon will be chosen
# first if we set CC to just the basename; use the full file name.
shift
- set dummy "$ac_dir/$ac_word" "$@"
+ set dummy "$as_dir/$ac_word" ${1+"$@"}
shift
ac_cv_prog_CC="$@"
fi
fi
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- if test -z "$CC"; then
- case "`uname -s`" in
- *win32* | *WIN32*)
- # Extract the first word of "cl", so it can be a program name with args.
-set dummy cl; ac_word=$2
-echo $ac_n "checking for $ac_word""... $ac_c" 1>&6
-echo "configure:612: checking for $ac_word" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_CC'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+if test -z "$CC"; then
+ if test -n "$ac_tool_prefix"; then
+ for ac_prog in cl
+ do
+ # Extract the first word of "$ac_tool_prefix$ac_prog", so it can be a program name with args.
+set dummy $ac_tool_prefix$ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
if test -n "$CC"; then
ac_cv_prog_CC="$CC" # Let the user override the test.
else
- IFS="${IFS= }"; ac_save_ifs="$IFS"; IFS=":"
- ac_dummy="$PATH"
- for ac_dir in $ac_dummy; do
- test -z "$ac_dir" && ac_dir=.
- if test -f $ac_dir/$ac_word; then
- ac_cv_prog_CC="cl"
- break
- fi
- done
- IFS="$ac_save_ifs"
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_CC="$ac_tool_prefix$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
+ fi
+done
+done
+
fi
fi
-CC="$ac_cv_prog_CC"
+CC=$ac_cv_prog_CC
if test -n "$CC"; then
- echo "$ac_t""$CC" 1>&6
+ echo "$as_me:$LINENO: result: $CC" >&5
+echo "${ECHO_T}$CC" >&6
else
- echo "$ac_t""no" 1>&6
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
fi
- ;;
- esac
+
+ test -n "$CC" && break
+ done
+fi
+if test -z "$CC"; then
+ ac_ct_CC=$CC
+ for ac_prog in cl
+do
+ # Extract the first word of "$ac_prog", so it can be a program name with args.
+set dummy $ac_prog; ac_word=$2
+echo "$as_me:$LINENO: checking for $ac_word" >&5
+echo $ECHO_N "checking for $ac_word... $ECHO_C" >&6
+if test "${ac_cv_prog_ac_ct_CC+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ if test -n "$ac_ct_CC"; then
+ ac_cv_prog_ac_ct_CC="$ac_ct_CC" # Let the user override the test.
+else
+as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for ac_exec_ext in '' $ac_executable_extensions; do
+ if $as_executable_p "$as_dir/$ac_word$ac_exec_ext"; then
+ ac_cv_prog_ac_ct_CC="$ac_prog"
+ echo "$as_me:$LINENO: found $as_dir/$ac_word$ac_exec_ext" >&5
+ break 2
fi
- test -z "$CC" && { echo "configure: error: no acceptable cc found in \$PATH" 1>&2; exit 1; }
+done
+done
+
fi
+fi
+ac_ct_CC=$ac_cv_prog_ac_ct_CC
+if test -n "$ac_ct_CC"; then
+ echo "$as_me:$LINENO: result: $ac_ct_CC" >&5
+echo "${ECHO_T}$ac_ct_CC" >&6
+else
+ echo "$as_me:$LINENO: result: no" >&5
+echo "${ECHO_T}no" >&6
+fi
+
+ test -n "$ac_ct_CC" && break
+done
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works""... $ac_c" 1>&6
-echo "configure:644: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) works" >&5
+ CC=$ac_ct_CC
+fi
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
+fi
-cat > conftest.$ac_ext << EOF
-#line 655 "configure"
+test -z "$CC" && { { echo "$as_me:$LINENO: error: no acceptable C compiler found in \$PATH" >&5
+echo "$as_me: error: no acceptable C compiler found in \$PATH" >&2;}
+ { (exit 1); exit 1; }; }
+
+# Provide some information about the compiler.
+echo "$as_me:$LINENO:" \
+ "checking for C compiler version" >&5
+ac_compiler=`set X $ac_compile; echo $2`
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler --version </dev/null >&5\"") >&5
+ (eval $ac_compiler --version </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -v </dev/null >&5\"") >&5
+ (eval $ac_compiler -v </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+{ (eval echo "$as_me:$LINENO: \"$ac_compiler -V </dev/null >&5\"") >&5
+ (eval $ac_compiler -V </dev/null >&5) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }
+
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
#include "confdefs.h"
-main(){return(0);}
-EOF
-if { (eval echo configure:660: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- ac_cv_prog_cc_works=yes
- # If we can't run a trivial program, we are probably using a cross compiler.
- if (./conftest; exit) 2>/dev/null; then
- ac_cv_prog_cc_cross=no
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files a.out a.exe"
+# Try to create an executable without -o first, disregard a.out.
+# It will help us diagnose broken compilers, and finding out an intuition
+# of exeext.
+echo "$as_me:$LINENO: checking for C compiler default output" >&5
+echo $ECHO_N "checking for C compiler default output... $ECHO_C" >&6
+ac_link_default=`echo "$ac_link" | sed 's/ -o *conftest[^ ]*//'`
+if { (eval echo "$as_me:$LINENO: \"$ac_link_default\"") >&5
+ (eval $ac_link_default) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # Find the output, starting from the most likely. This scheme is
+# not robust to junk in `.', hence go to wildcards (a.*) only as a last
+# resort.
+
+# Be careful to initialize this variable, since it used to be cached.
+# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
+ac_cv_exeext=
+for ac_file in `ls a_out.exe a.exe conftest.exe 2>/dev/null;
+ ls a.out conftest 2>/dev/null;
+ ls a.* conftest.* 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
+ a.out ) # We found the default executable, but exeext='' is most
+ # certainly right.
+ break;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ # FIXME: I believe we export ac_cv_exeext for Libtool --akim.
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:$LINENO: error: C compiler cannot create executables" >&5
+echo "$as_me: error: C compiler cannot create executables" >&2;}
+ { (exit 77); exit 77; }; }
+fi
+
+ac_exeext=$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_file" >&5
+echo "${ECHO_T}$ac_file" >&6
+
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether the C compiler works" >&5
+echo $ECHO_N "checking whether the C compiler works... $ECHO_C" >&6
+# FIXME: These cross compiler hacks should be removed for Autoconf 3.0
+# If not cross compiling, check that we can run a simple program.
+if test "$cross_compiling" != yes; then
+ if { ac_try='./$ac_file'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ cross_compiling=no
else
- ac_cv_prog_cc_cross=yes
+ if test "$cross_compiling" = maybe; then
+ cross_compiling=yes
+ else
+ { { echo "$as_me:$LINENO: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&5
+echo "$as_me: error: cannot run C compiled programs.
+If you meant to cross compile, use \`--host'." >&2;}
+ { (exit 1); exit 1; }; }
+ fi
fi
+fi
+echo "$as_me:$LINENO: result: yes" >&5
+echo "${ECHO_T}yes" >&6
+
+rm -f a.out a.exe conftest$ac_cv_exeext
+ac_clean_files=$ac_clean_files_save
+# Check the compiler produces executables we can run. If not, either
+# the compiler is broken, or we cross compile.
+echo "$as_me:$LINENO: checking whether we are cross compiling" >&5
+echo $ECHO_N "checking whether we are cross compiling... $ECHO_C" >&6
+echo "$as_me:$LINENO: result: $cross_compiling" >&5
+echo "${ECHO_T}$cross_compiling" >&6
+
+echo "$as_me:$LINENO: checking for suffix of executables" >&5
+echo $ECHO_N "checking for suffix of executables... $ECHO_C" >&6
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ # If both `conftest.exe' and `conftest' are `present' (well, observable)
+# catch `conftest.exe'. For instance with Cygwin, `ls conftest' will
+# work properly (i.e., refer to `conftest.exe'), while it won't with
+# `rm'.
+for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *.* ) ac_cv_exeext=`expr "$ac_file" : '[^.]*\(\..*\)'`
+ export ac_cv_exeext
+ break;;
+ * ) break;;
+ esac
+done
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- ac_cv_prog_cc_works=no
+ { { echo "$as_me:$LINENO: error: cannot compute suffix of executables: cannot compile and link" >&5
+echo "$as_me: error: cannot compute suffix of executables: cannot compile and link" >&2;}
+ { (exit 1); exit 1; }; }
fi
-rm -fr conftest*
-ac_ext=c
-# CFLAGS is not in ac_cpp because -g, -O, etc. are not valid cpp options.
-ac_cpp='$CPP $CPPFLAGS'
-ac_compile='${CC-cc} -c $CFLAGS $CPPFLAGS conftest.$ac_ext 1>&5'
-ac_link='${CC-cc} -o conftest${ac_exeext} $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS 1>&5'
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo "$ac_t""$ac_cv_prog_cc_works" 1>&6
-if test $ac_cv_prog_cc_works = no; then
- { echo "configure: error: installation or configuration problem: C compiler cannot create executables." 1>&2; exit 1; }
-fi
-echo $ac_n "checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler""... $ac_c" 1>&6
-echo "configure:686: checking whether the C compiler ($CC $CFLAGS $LDFLAGS) is a cross-compiler" >&5
-echo "$ac_t""$ac_cv_prog_cc_cross" 1>&6
-cross_compiling=$ac_cv_prog_cc_cross
-
-echo $ac_n "checking whether we are using GNU C""... $ac_c" 1>&6
-echo "configure:691: checking whether we are using GNU C" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_gcc'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- cat > conftest.c <<EOF
-#ifdef __GNUC__
- yes;
+
+rm -f conftest$ac_cv_exeext
+echo "$as_me:$LINENO: result: $ac_cv_exeext" >&5
+echo "${ECHO_T}$ac_cv_exeext" >&6
+
+rm -f conftest.$ac_ext
+EXEEXT=$ac_cv_exeext
+ac_exeext=$EXEEXT
+echo "$as_me:$LINENO: checking for suffix of object files" >&5
+echo $ECHO_N "checking for suffix of object files... $ECHO_C" >&6
+if test "${ac_cv_objext+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
#endif
-EOF
-if { ac_try='${CC-cc} -E conftest.c'; { (eval echo configure:700: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } | egrep yes >/dev/null 2>&1; then
- ac_cv_prog_gcc=yes
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.o conftest.obj
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; then
+ for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
+ case $ac_file in
+ *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+ *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
+ break;;
+ esac
+done
else
- ac_cv_prog_gcc=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+{ { echo "$as_me:$LINENO: error: cannot compute suffix of object files: cannot compile" >&5
+echo "$as_me: error: cannot compute suffix of object files: cannot compile" >&2;}
+ { (exit 1); exit 1; }; }
fi
+
+rm -f conftest.$ac_cv_objext conftest.$ac_ext
fi
+echo "$as_me:$LINENO: result: $ac_cv_objext" >&5
+echo "${ECHO_T}$ac_cv_objext" >&6
+OBJEXT=$ac_cv_objext
+ac_objext=$OBJEXT
+echo "$as_me:$LINENO: checking whether we are using the GNU C compiler" >&5
+echo $ECHO_N "checking whether we are using the GNU C compiler... $ECHO_C" >&6
+if test "${ac_cv_c_compiler_gnu+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
-echo "$ac_t""$ac_cv_prog_gcc" 1>&6
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+#ifndef __GNUC__
+ choke me
+#endif
-if test $ac_cv_prog_gcc = yes; then
- GCC=yes
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_compiler_gnu=yes
else
- GCC=
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_compiler_gnu=no
fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_cv_c_compiler_gnu=$ac_compiler_gnu
-ac_test_CFLAGS="${CFLAGS+set}"
-ac_save_CFLAGS="$CFLAGS"
-CFLAGS=
-echo $ac_n "checking whether ${CC-cc} accepts -g""... $ac_c" 1>&6
-echo "configure:719: checking whether ${CC-cc} accepts -g" >&5
-if eval "test \"`echo '$''{'ac_cv_prog_cc_g'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+fi
+echo "$as_me:$LINENO: result: $ac_cv_c_compiler_gnu" >&5
+echo "${ECHO_T}$ac_cv_c_compiler_gnu" >&6
+GCC=`test $ac_compiler_gnu = yes && echo yes`
+ac_test_CFLAGS=${CFLAGS+set}
+ac_save_CFLAGS=$CFLAGS
+CFLAGS="-g"
+echo "$as_me:$LINENO: checking whether $CC accepts -g" >&5
+echo $ECHO_N "checking whether $CC accepts -g... $ECHO_C" >&6
+if test "${ac_cv_prog_cc_g+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- echo 'void f(){}' > conftest.c
-if test -z "`${CC-cc} -g -c conftest.c 2>&1`"; then
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_prog_cc_g=yes
else
- ac_cv_prog_cc_g=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_prog_cc_g=no
fi
-rm -f conftest*
-
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_prog_cc_g" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_prog_cc_g" >&5
+echo "${ECHO_T}$ac_cv_prog_cc_g" >&6
if test "$ac_test_CFLAGS" = set; then
- CFLAGS="$ac_save_CFLAGS"
+ CFLAGS=$ac_save_CFLAGS
elif test $ac_cv_prog_cc_g = yes; then
if test "$GCC" = yes; then
CFLAGS="-g -O2"
@@ -745,452 +1772,1512 @@ else
CFLAGS=
fi
fi
+# Some people use a C++ compiler to compile C. Since we use `exit',
+# in C++ we need to declare it. In case someone uses the same compiler
+# for both compiling C and C++ we need to have the C++ compiler decide
+# the declaration of exit, since it's the most demanding environment.
+cat >conftest.$ac_ext <<_ACEOF
+#ifndef __cplusplus
+ choke me
+#endif
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ for ac_declaration in \
+ ''\
+ '#include <stdlib.h>' \
+ 'extern "C" void std::exit (int) throw (); using std::exit;' \
+ 'extern "C" void std::exit (int); using std::exit;' \
+ 'extern "C" void exit (int) throw ();' \
+ 'extern "C" void exit (int);' \
+ 'void exit (int);'
+do
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <stdlib.h>
+$ac_declaration
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ :
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+continue
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+$ac_declaration
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+exit (42);
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ break
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+done
+rm -f conftest*
+if test -n "$ac_declaration"; then
+ echo '#ifdef __cplusplus' >>confdefs.h
+ echo $ac_declaration >>confdefs.h
+ echo '#endif' >>confdefs.h
+fi
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ac_ext=c
+ac_cpp='$CPP $CPPFLAGS'
+ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'
+ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'
+ac_compiler_gnu=$ac_cv_c_compiler_gnu
-echo $ac_n "checking for library containing res_mkquery""... $ac_c" 1>&6
-echo "configure:755: checking for library containing res_mkquery" >&5
-if eval "test \"`echo '$''{'ac_cv_search_res_mkquery'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+
+
+echo "$as_me:$LINENO: checking for library containing res_mkquery" >&5
+echo $ECHO_N "checking for library containing res_mkquery... $ECHO_C" >&6
+if test "${ac_cv_search_res_mkquery+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_func_search_save_LIBS="$LIBS"
-ac_cv_search_res_mkquery="no"
-cat > conftest.$ac_ext <<EOF
-#line 762 "configure"
+ ac_func_search_save_LIBS=$LIBS
+ac_cv_search_res_mkquery=no
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char res_mkquery();
-
-int main() {
-res_mkquery()
-; return 0; }
-EOF
-if { (eval echo configure:773: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
+ builtin and then its argument prototype would still apply. */
+char res_mkquery ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+res_mkquery ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_search_res_mkquery="none required"
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
-test "$ac_cv_search_res_mkquery" = "no" && for i in resolv bind; do
-LIBS="-l$i $ac_func_search_save_LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 784 "configure"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+if test "$ac_cv_search_res_mkquery" = no; then
+ for ac_lib in resolv bind; do
+ LIBS="-l$ac_lib $ac_func_search_save_LIBS"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char res_mkquery();
-
-int main() {
-res_mkquery()
-; return 0; }
-EOF
-if { (eval echo configure:795: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- ac_cv_search_res_mkquery="-l$i"
+ builtin and then its argument prototype would still apply. */
+char res_mkquery ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+res_mkquery ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_search_res_mkquery="-l$ac_lib"
break
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
fi
-rm -f conftest*
-done
-LIBS="$ac_func_search_save_LIBS"
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+ done
fi
-
-echo "$ac_t""$ac_cv_search_res_mkquery" 1>&6
-if test "$ac_cv_search_res_mkquery" != "no"; then
+LIBS=$ac_func_search_save_LIBS
+fi
+echo "$as_me:$LINENO: result: $ac_cv_search_res_mkquery" >&5
+echo "${ECHO_T}$ac_cv_search_res_mkquery" >&6
+if test "$ac_cv_search_res_mkquery" != no; then
test "$ac_cv_search_res_mkquery" = "none required" || LIBS="$ac_cv_search_res_mkquery $LIBS"
-
-else :
-
-fi;
-echo $ac_n "checking for socket in -lsocket""... $ac_c" 1>&6
-echo "configure:816: checking for socket in -lsocket" >&5
-ac_lib_var=`echo socket'_'socket | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
-else
- ac_save_LIBS="$LIBS"
+
+fi
+
+
+echo "$as_me:$LINENO: checking for socket in -lsocket" >&5
+echo $ECHO_N "checking for socket in -lsocket... $ECHO_C" >&6
+if test "${ac_cv_lib_socket_socket+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lsocket $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 824 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char socket();
-
-int main() {
-socket()
-; return 0; }
-EOF
-if { (eval echo configure:835: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ builtin and then its argument prototype would still apply. */
+char socket ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+socket ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_socket_socket=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_socket_socket=no
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo socket | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+echo "$as_me:$LINENO: result: $ac_cv_lib_socket_socket" >&5
+echo "${ECHO_T}$ac_cv_lib_socket_socket" >&6
+if test $ac_cv_lib_socket_socket = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBSOCKET 1
+_ACEOF
LIBS="-lsocket $LIBS"
-else
- echo "$ac_t""no" 1>&6
fi
-echo $ac_n "checking for inet_ntoa in -lnsl""... $ac_c" 1>&6
-echo "configure:863: checking for inet_ntoa in -lnsl" >&5
-ac_lib_var=`echo nsl'_'inet_ntoa | sed 'y%./+-%__p_%'`
-if eval "test \"`echo '$''{'ac_cv_lib_$ac_lib_var'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:$LINENO: checking for inet_ntoa in -lnsl" >&5
+echo $ECHO_N "checking for inet_ntoa in -lnsl... $ECHO_C" >&6
+if test "${ac_cv_lib_nsl_inet_ntoa+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
- ac_save_LIBS="$LIBS"
+ ac_check_lib_save_LIBS=$LIBS
LIBS="-lnsl $LIBS"
-cat > conftest.$ac_ext <<EOF
-#line 871 "configure"
+cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
#include "confdefs.h"
+
/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
/* We use char because int might match the return type of a gcc2
- builtin and then its argument prototype would still apply. */
-char inet_ntoa();
-
-int main() {
-inet_ntoa()
-; return 0; }
-EOF
-if { (eval echo configure:882: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=yes"
-else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- eval "ac_cv_lib_$ac_lib_var=no"
+ builtin and then its argument prototype would still apply. */
+char inet_ntoa ();
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+inet_ntoa ();
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_lib_nsl_inet_ntoa=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_lib_nsl_inet_ntoa=no
fi
-rm -f conftest*
-LIBS="$ac_save_LIBS"
-
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+LIBS=$ac_check_lib_save_LIBS
fi
-if eval "test \"`echo '$ac_cv_lib_'$ac_lib_var`\" = yes"; then
- echo "$ac_t""yes" 1>&6
- ac_tr_lib=HAVE_LIB`echo nsl | sed -e 's/[^a-zA-Z0-9_]/_/g' \
- -e 'y/abcdefghijklmnopqrstuvwxyz/ABCDEFGHIJKLMNOPQRSTUVWXYZ/'`
- cat >> confdefs.h <<EOF
-#define $ac_tr_lib 1
-EOF
+echo "$as_me:$LINENO: result: $ac_cv_lib_nsl_inet_ntoa" >&5
+echo "${ECHO_T}$ac_cv_lib_nsl_inet_ntoa" >&6
+if test $ac_cv_lib_nsl_inet_ntoa = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define HAVE_LIBNSL 1
+_ACEOF
LIBS="-lnsl $LIBS"
+fi
+
+
+for ac_func in gethostbyname2
+do
+as_ac_var=`echo "ac_cv_func_$ac_func" | $as_tr_sh`
+echo "$as_me:$LINENO: checking for $ac_func" >&5
+echo $ECHO_N "checking for $ac_func... $ECHO_C" >&6
+if eval "test \"\${$as_ac_var+set}\" = set"; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char $ac_func (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char $ac_func ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_$ac_func) || defined (__stub___$ac_func)
+choke me
+#else
+f = $ac_func;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ eval "$as_ac_var=yes"
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+eval "$as_ac_var=no"
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: `eval echo '${'$as_ac_var'}'`" >&5
+echo "${ECHO_T}`eval echo '${'$as_ac_var'}'`" >&6
+if test `eval echo '${'$as_ac_var'}'` = yes; then
+ cat >>confdefs.h <<_ACEOF
+#define `echo "HAVE_$ac_func" | $as_tr_cpp` 1
+_ACEOF
+
+fi
+done
+
+echo "$as_me:$LINENO: checking for getaddrinfo" >&5
+echo $ECHO_N "checking for getaddrinfo... $ECHO_C" >&6
+if test "${ac_cv_func_getaddrinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getaddrinfo (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getaddrinfo ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_getaddrinfo) || defined (__stub___getaddrinfo)
+choke me
+#else
+f = getaddrinfo;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_getaddrinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_getaddrinfo=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getaddrinfo" >&5
+echo "${ECHO_T}$ac_cv_func_getaddrinfo" >&6
+if test $ac_cv_func_getaddrinfo = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETADDRINFO 1
+_ACEOF
+
+else
+ LIBOBJS="$LIBOBJS getaddrinfo.$ac_objext"
+fi
+
+echo "$as_me:$LINENO: checking for getnameinfo" >&5
+echo $ECHO_N "checking for getnameinfo... $ECHO_C" >&6
+if test "${ac_cv_func_getnameinfo+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+/* System header to define __stub macros and hopefully few prototypes,
+ which can conflict with char getnameinfo (); below. */
+#include <assert.h>
+/* Override any gcc2 internal prototype to avoid an error. */
+#ifdef __cplusplus
+extern "C"
+#endif
+/* We use char because int might match the return type of a gcc2
+ builtin and then its argument prototype would still apply. */
+char getnameinfo ();
+char (*f) ();
+
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+/* The GNU C library defines this for functions which it implements
+ to always fail with ENOSYS. Some functions are actually named
+ something starting with __ and the normal name is an alias. */
+#if defined (__stub_getnameinfo) || defined (__stub___getnameinfo)
+choke me
+#else
+f = getnameinfo;
+#endif
+
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext conftest$ac_exeext
+if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5
+ (eval $ac_link) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest$ac_exeext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_func_getnameinfo=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_func_getnameinfo=no
+fi
+rm -f conftest.$ac_objext conftest$ac_exeext conftest.$ac_ext
+fi
+echo "$as_me:$LINENO: result: $ac_cv_func_getnameinfo" >&5
+echo "${ECHO_T}$ac_cv_func_getnameinfo" >&6
+if test $ac_cv_func_getnameinfo = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_GETNAMEINFO 1
+_ACEOF
+
else
- echo "$ac_t""no" 1>&6
+ LIBOBJS="$LIBOBJS getnameinfo.$ac_objext"
fi
-echo $ac_n "checking for socklen_t""... $ac_c" 1>&6
-echo "configure:910: checking for socklen_t" >&5
-if eval "test \"`echo '$''{'ac_cv_type_socklen_t'+set}'`\" = set"; then
- echo $ac_n "(cached) $ac_c" 1>&6
+
+echo "$as_me:$LINENO: checking for socklen_t" >&5
+echo $ECHO_N "checking for socklen_t... $ECHO_C" >&6
+if test "${ac_cv_type_socklen_t+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
else
-
- cat > conftest.$ac_ext <<EOF
-#line 916 "configure"
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
#include "confdefs.h"
#include <sys/types.h>
#include <sys/socket.h>
-int main() {
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
socklen_t len = 42; return len;
-; return 0; }
-EOF
-if { (eval echo configure:924: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; }; then
- rm -rf conftest*
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
ac_cv_type_socklen_t=yes
else
- echo "configure: failed program was:" >&5
- cat conftest.$ac_ext >&5
- rm -rf conftest*
- ac_cv_type_socklen_t=no
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_type_socklen_t=no
fi
-rm -f conftest*
+rm -f conftest.$ac_objext conftest.$ac_ext
fi
-
-echo "$ac_t""$ac_cv_type_socklen_t" 1>&6
+echo "$as_me:$LINENO: result: $ac_cv_type_socklen_t" >&5
+echo "${ECHO_T}$ac_cv_type_socklen_t" >&6
if test $ac_cv_type_socklen_t != yes; then
- cat >> confdefs.h <<\EOF
+ cat >>confdefs.h <<\_ACEOF
#define socklen_t int
-EOF
+_ACEOF
+
+ fi
+
+echo "$as_me:$LINENO: checking for sa_len" >&5
+echo $ECHO_N "checking for sa_len... $ECHO_C" >&6
+if test "${ac_cv_sa_len+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+#include "confdefs.h"
+#include <sys/types.h>
+ #include <sys/socket.h>
+#ifdef F77_DUMMY_MAIN
+# ifdef __cplusplus
+ extern "C"
+# endif
+ int F77_DUMMY_MAIN() { return 1; }
+#endif
+int
+main ()
+{
+struct sockaddr sa; sa.sa_len = 0;
+ ;
+ return 0;
+}
+_ACEOF
+rm -f conftest.$ac_objext
+if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
+ (eval $ac_compile) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); } &&
+ { ac_try='test -s conftest.$ac_objext'
+ { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
+ (eval $ac_try) 2>&5
+ ac_status=$?
+ echo "$as_me:$LINENO: \$? = $ac_status" >&5
+ (exit $ac_status); }; }; then
+ ac_cv_sa_len=yes
+else
+ echo "$as_me: failed program was:" >&5
+cat conftest.$ac_ext >&5
+ac_cv_sa_len=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+
+fi
+echo "$as_me:$LINENO: result: $ac_cv_sa_len" >&5
+echo "${ECHO_T}$ac_cv_sa_len" >&6
+ if test $ac_cv_sa_len = yes; then
+ cat >>confdefs.h <<\_ACEOF
+#define HAVE_SA_LEN 1
+_ACEOF
fi
-trap '' 1 2 15
-cat > confcache <<\EOF
+ac_config_files="$ac_config_files Makefile"
+cat >confcache <<\_ACEOF
# This file is a shell script that caches the results of configure
# tests run on this system so they can be shared between configure
-# scripts and configure runs. It is not useful on other systems.
-# If it contains results you don't want to keep, you may remove or edit it.
+# scripts and configure runs, see configure's option --config-cache.
+# It is not useful on other systems. If it contains results you don't
+# want to keep, you may remove or edit it.
#
-# By default, configure uses ./config.cache as the cache file,
-# creating it if it does not exist already. You can give configure
-# the --cache-file=FILE option to use a different cache file; that is
-# what configure does when it calls configure scripts in
-# subdirectories, so they share the cache.
-# Giving --cache-file=/dev/null disables caching, for debugging configure.
-# config.status only pays attention to the cache file if you give it the
-# --recheck option to rerun configure.
+# config.status only pays attention to the cache file if you give it
+# the --recheck option to rerun configure.
#
-EOF
+# `ac_cv_env_foo' variables (set or unset) will be overriden when
+# loading this file, other *unset* `ac_cv_foo' will be assigned the
+# following values.
+
+_ACEOF
+
# The following way of writing the cache mishandles newlines in values,
# but we know of no workaround that is simple, portable, and efficient.
# So, don't put newlines in cache variables' values.
# Ultrix sh set writes to stderr and can't be redirected directly,
# and sets the high bit in the cache file unless we assign to the vars.
-(set) 2>&1 |
- case `(ac_space=' '; set | grep ac_space) 2>&1` in
- *ac_space=\ *)
- # `set' does not quote correctly, so add quotes (double-quote substitution
- # turns \\\\ into \\, and sed turns \\ into \).
- sed -n \
- -e "s/'/'\\\\''/g" \
- -e "s/^\\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\\)=\\(.*\\)/\\1=\${\\1='\\2'}/p"
- ;;
- *)
- # `set' quotes correctly as required by POSIX, so do not add quotes.
- sed -n -e 's/^\([a-zA-Z0-9_]*_cv_[a-zA-Z0-9_]*\)=\(.*\)/\1=${\1=\2}/p'
- ;;
- esac >> confcache
-if cmp -s $cache_file confcache; then
- :
-else
+{
+ (set) 2>&1 |
+ case `(ac_space=' '; set | grep ac_space) 2>&1` in
+ *ac_space=\ *)
+ # `set' does not quote correctly, so add quotes (double-quote
+ # substitution turns \\\\ into \\, and sed turns \\ into \).
+ sed -n \
+ "s/'/'\\\\''/g;
+ s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1='\\2'/p"
+ ;;
+ *)
+ # `set' quotes correctly as required by POSIX, so do not add quotes.
+ sed -n \
+ "s/^\\([_$as_cr_alnum]*_cv_[_$as_cr_alnum]*\\)=\\(.*\\)/\\1=\\2/p"
+ ;;
+ esac;
+} |
+ sed '
+ t clear
+ : clear
+ s/^\([^=]*\)=\(.*[{}].*\)$/test "${\1+set}" = set || &/
+ t end
+ /^ac_cv_env/!s/^\([^=]*\)=\(.*\)$/\1=${\1=\2}/
+ : end' >>confcache
+if cmp -s $cache_file confcache; then :; else
if test -w $cache_file; then
- echo "updating cache $cache_file"
- cat confcache > $cache_file
+ test "x$cache_file" != "x/dev/null" && echo "updating cache $cache_file"
+ cat confcache >$cache_file
else
echo "not updating unwritable cache $cache_file"
fi
fi
rm -f confcache
-trap 'rm -fr conftest* confdefs* core core.* *.core $ac_clean_files; exit 1' 1 2 15
-
test "x$prefix" = xNONE && prefix=$ac_default_prefix
# Let make expand exec_prefix.
test "x$exec_prefix" = xNONE && exec_prefix='${prefix}'
-# Any assignment to VPATH causes Sun make to only execute
-# the first set of double-colon rules, so remove it if not needed.
-# If there is a colon in the path, we need to keep it.
+# VPATH may cause trouble with some makes, so we remove $(srcdir),
+# ${srcdir} and @srcdir@ from VPATH if srcdir is ".", strip leading and
+# trailing colons and then remove the whole line if VPATH becomes empty
+# (actually we leave an empty line to preserve line numbers).
if test "x$srcdir" = x.; then
- ac_vpsub='/^[ ]*VPATH[ ]*=[^:]*$/d'
+ ac_vpsub='/^[ ]*VPATH[ ]*=/{
+s/:*\$(srcdir):*/:/;
+s/:*\${srcdir}:*/:/;
+s/:*@srcdir@:*/:/;
+s/^\([^=]*=[ ]*\):*/\1/;
+s/:*$//;
+s/^[^=]*=[ ]*$//;
+}'
fi
-trap 'rm -f $CONFIG_STATUS conftest*; exit 1' 1 2 15
-
# Transform confdefs.h into DEFS.
# Protect against shell expansion while executing Makefile rules.
# Protect against Makefile macro expansion.
-cat > conftest.defs <<\EOF
-s%#define \([A-Za-z_][A-Za-z0-9_]*\) *\(.*\)%-D\1=\2%g
-s%[ `~#$^&*(){}\\|;'"<>?]%\\&%g
-s%\[%\\&%g
-s%\]%\\&%g
-s%\$%$$%g
-EOF
-DEFS=`sed -f conftest.defs confdefs.h | tr '\012' ' '`
-rm -f conftest.defs
-
-
-# Without the "./", some shells look in PATH for config.status.
-: ${CONFIG_STATUS=./config.status}
+#
+# If the first sed substitution is executed (which looks for macros that
+# take arguments), then we branch to the quote section. Otherwise,
+# look for a macro that doesn't take arguments.
+cat >confdef2opt.sed <<\_ACEOF
+t clear
+: clear
+s,^[ ]*#[ ]*define[ ][ ]*\([^ (][^ (]*([^)]*)\)[ ]*\(.*\),-D\1=\2,g
+t quote
+s,^[ ]*#[ ]*define[ ][ ]*\([^ ][^ ]*\)[ ]*\(.*\),-D\1=\2,g
+t quote
+d
+: quote
+s,[ `~#$^&*(){}\\|;'"<>?],\\&,g
+s,\[,\\&,g
+s,\],\\&,g
+s,\$,$$,g
+p
+_ACEOF
+# We use echo to avoid assuming a particular line-breaking character.
+# The extra dot is to prevent the shell from consuming trailing
+# line-breaks from the sub-command output. A line-break within
+# single-quotes doesn't work because, if this script is created in a
+# platform that uses two characters for line-breaks (e.g., DOS), tr
+# would break.
+ac_LF_and_DOT=`echo; echo .`
+DEFS=`sed -n -f confdef2opt.sed confdefs.h | tr "$ac_LF_and_DOT" ' .'`
+rm -f confdef2opt.sed
-echo creating $CONFIG_STATUS
-rm -f $CONFIG_STATUS
-cat > $CONFIG_STATUS <<EOF
-#! /bin/sh
-# Generated automatically by configure.
+
+
+: ${CONFIG_STATUS=./config.status}
+ac_clean_files_save=$ac_clean_files
+ac_clean_files="$ac_clean_files $CONFIG_STATUS"
+{ echo "$as_me:$LINENO: creating $CONFIG_STATUS" >&5
+echo "$as_me: creating $CONFIG_STATUS" >&6;}
+cat >$CONFIG_STATUS <<_ACEOF
+#! $SHELL
+# Generated by $as_me.
# Run this file to recreate the current configuration.
-# This directory was configured as follows,
-# on host `(hostname || uname -n) 2>/dev/null | sed 1q`:
-#
-# $0 $ac_configure_args
-#
# Compiler output produced by configure, useful for debugging
-# configure, is in ./config.log if it exists.
+# configure, is in config.log if it exists.
-ac_cs_usage="Usage: $CONFIG_STATUS [--recheck] [--version] [--help]"
-for ac_option
-do
- case "\$ac_option" in
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- echo "running \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion"
- exec \${CONFIG_SHELL-/bin/sh} $0 $ac_configure_args --no-create --no-recursion ;;
- -version | --version | --versio | --versi | --vers | --ver | --ve | --v)
- echo "$CONFIG_STATUS generated by autoconf version 2.13"
- exit 0 ;;
- -help | --help | --hel | --he | --h)
- echo "\$ac_cs_usage"; exit 0 ;;
- *) echo "\$ac_cs_usage"; exit 1 ;;
- esac
-done
+debug=false
+SHELL=\${CONFIG_SHELL-$SHELL}
+_ACEOF
-ac_given_srcdir=$srcdir
+cat >>$CONFIG_STATUS <<\_ACEOF
-trap 'rm -fr `echo "Makefile" | sed "s/:[^ ]*//g"` conftest*; exit 1' 1 2 15
-EOF
-cat >> $CONFIG_STATUS <<EOF
+## --------------------- ##
+## M4sh Initialization. ##
+## --------------------- ##
-# Protect against being on the right side of a sed subst in config.status.
-sed 's/%@/@@/; s/@%/@@/; s/%g\$/@g/; /@g\$/s/[\\\\&%]/\\\\&/g;
- s/@@/%@/; s/@@/@%/; s/@g\$/%g/' > conftest.subs <<\\CEOF
-$ac_vpsub
-$extrasub
-s%@SHELL@%$SHELL%g
-s%@CFLAGS@%$CFLAGS%g
-s%@CPPFLAGS@%$CPPFLAGS%g
-s%@CXXFLAGS@%$CXXFLAGS%g
-s%@FFLAGS@%$FFLAGS%g
-s%@DEFS@%$DEFS%g
-s%@LDFLAGS@%$LDFLAGS%g
-s%@LIBS@%$LIBS%g
-s%@exec_prefix@%$exec_prefix%g
-s%@prefix@%$prefix%g
-s%@program_transform_name@%$program_transform_name%g
-s%@bindir@%$bindir%g
-s%@sbindir@%$sbindir%g
-s%@libexecdir@%$libexecdir%g
-s%@datadir@%$datadir%g
-s%@sysconfdir@%$sysconfdir%g
-s%@sharedstatedir@%$sharedstatedir%g
-s%@localstatedir@%$localstatedir%g
-s%@libdir@%$libdir%g
-s%@includedir@%$includedir%g
-s%@oldincludedir@%$oldincludedir%g
-s%@infodir@%$infodir%g
-s%@mandir@%$mandir%g
-s%@CC@%$CC%g
+# Be Bourne compatible
+if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
+ emulate sh
+ NULLCMD=:
+elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
+ set -o posix
+fi
-CEOF
-EOF
-
-cat >> $CONFIG_STATUS <<\EOF
-
-# Split the substitutions into bite-sized pieces for seds with
-# small command number limits, like on Digital OSF/1 and HP-UX.
-ac_max_sed_cmds=90 # Maximum number of lines to put in a sed script.
-ac_file=1 # Number of current file.
-ac_beg=1 # First line for current file.
-ac_end=$ac_max_sed_cmds # Line after last line for current file.
-ac_more_lines=:
-ac_sed_cmds=""
-while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" conftest.subs > conftest.s$ac_file
- else
- sed "${ac_end}q" conftest.subs > conftest.s$ac_file
- fi
- if test ! -s conftest.s$ac_file; then
- ac_more_lines=false
- rm -f conftest.s$ac_file
+# NLS nuisances.
+# Support unset when possible.
+if (FOO=FOO; unset FOO) >/dev/null 2>&1; then
+ as_unset=unset
+else
+ as_unset=false
+fi
+
+(set +x; test -n "`(LANG=C; export LANG) 2>&1`") &&
+ { $as_unset LANG || test "${LANG+set}" != set; } ||
+ { LANG=C; export LANG; }
+(set +x; test -n "`(LC_ALL=C; export LC_ALL) 2>&1`") &&
+ { $as_unset LC_ALL || test "${LC_ALL+set}" != set; } ||
+ { LC_ALL=C; export LC_ALL; }
+(set +x; test -n "`(LC_TIME=C; export LC_TIME) 2>&1`") &&
+ { $as_unset LC_TIME || test "${LC_TIME+set}" != set; } ||
+ { LC_TIME=C; export LC_TIME; }
+(set +x; test -n "`(LC_CTYPE=C; export LC_CTYPE) 2>&1`") &&
+ { $as_unset LC_CTYPE || test "${LC_CTYPE+set}" != set; } ||
+ { LC_CTYPE=C; export LC_CTYPE; }
+(set +x; test -n "`(LANGUAGE=C; export LANGUAGE) 2>&1`") &&
+ { $as_unset LANGUAGE || test "${LANGUAGE+set}" != set; } ||
+ { LANGUAGE=C; export LANGUAGE; }
+(set +x; test -n "`(LC_COLLATE=C; export LC_COLLATE) 2>&1`") &&
+ { $as_unset LC_COLLATE || test "${LC_COLLATE+set}" != set; } ||
+ { LC_COLLATE=C; export LC_COLLATE; }
+(set +x; test -n "`(LC_NUMERIC=C; export LC_NUMERIC) 2>&1`") &&
+ { $as_unset LC_NUMERIC || test "${LC_NUMERIC+set}" != set; } ||
+ { LC_NUMERIC=C; export LC_NUMERIC; }
+(set +x; test -n "`(LC_MESSAGES=C; export LC_MESSAGES) 2>&1`") &&
+ { $as_unset LC_MESSAGES || test "${LC_MESSAGES+set}" != set; } ||
+ { LC_MESSAGES=C; export LC_MESSAGES; }
+
+
+# Name of the executable.
+as_me=`(basename "$0") 2>/dev/null ||
+$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
+ X"$0" : 'X\(//\)$' \| \
+ X"$0" : 'X\(/\)$' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X/"$0" |
+ sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
+ /^X\/\(\/\/\)$/{ s//\1/; q; }
+ /^X\/\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+
+# PATH needs CR, and LINENO needs CR and PATH.
+# Avoid depending upon Character Ranges.
+as_cr_letters='abcdefghijklmnopqrstuvwxyz'
+as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
+as_cr_Letters=$as_cr_letters$as_cr_LETTERS
+as_cr_digits='0123456789'
+as_cr_alnum=$as_cr_Letters$as_cr_digits
+
+# The user is always right.
+if test "${PATH_SEPARATOR+set}" != set; then
+ echo "#! /bin/sh" >conftest.sh
+ echo "exit 0" >>conftest.sh
+ chmod +x conftest.sh
+ if (PATH=".;."; conftest.sh) >/dev/null 2>&1; then
+ PATH_SEPARATOR=';'
else
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f conftest.s$ac_file"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f conftest.s$ac_file"
- fi
- ac_file=`expr $ac_file + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_cmds`
+ PATH_SEPARATOR=:
fi
-done
-if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
+ rm -f conftest.sh
fi
-EOF
-cat >> $CONFIG_STATUS <<EOF
-CONFIG_FILES=\${CONFIG_FILES-"Makefile"}
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-for ac_file in .. $CONFIG_FILES; do if test "x$ac_file" != x..; then
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case "$ac_file" in
- *:*) ac_file_in=`echo "$ac_file"|sed 's%[^:]*:%%'`
- ac_file=`echo "$ac_file"|sed 's%:.*%%'` ;;
- *) ac_file_in="${ac_file}.in" ;;
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" || {
+ # Find who we are. Look in the path if we contain no path at all
+ # relative or not.
+ case $0 in
+ *[\\/]* ) as_myself=$0 ;;
+ *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in $PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
+done
+
+ ;;
+ esac
+ # We did not find ourselves, most probably we were run as `sh COMMAND'
+ # in which case we are not to be found in the path.
+ if test "x$as_myself" = x; then
+ as_myself=$0
+ fi
+ if test ! -f "$as_myself"; then
+ { { echo "$as_me:$LINENO: error: cannot find myself; rerun with an absolute path" >&5
+echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
+ { (exit 1); exit 1; }; }
+ fi
+ case $CONFIG_SHELL in
+ '')
+ as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
+for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
+do
+ IFS=$as_save_IFS
+ test -z "$as_dir" && as_dir=.
+ for as_base in sh bash ksh sh5; do
+ case $as_dir in
+ /*)
+ if ("$as_dir/$as_base" -c '
+ as_lineno_1=$LINENO
+ as_lineno_2=$LINENO
+ as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
+ test "x$as_lineno_1" != "x$as_lineno_2" &&
+ test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
+ CONFIG_SHELL=$as_dir/$as_base
+ export CONFIG_SHELL
+ exec "$CONFIG_SHELL" "$0" ${1+"$@"}
+ fi;;
+ esac
+ done
+done
+;;
esac
- # Adjust a relative srcdir, top_srcdir, and INSTALL for subdirectories.
+ # Create $as_me.lineno as a copy of $as_myself, but with $LINENO
+ # uniformly replaced by the line number. The first 'sed' inserts a
+ # line-number line before each line; the second 'sed' does the real
+ # work. The second script uses 'N' to pair each line-number line
+ # with the numbered line, and appends trailing '-' during
+ # substitution so that $LINENO is not a special case at line end.
+ # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
+ # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
+ sed '=' <$as_myself |
+ sed '
+ N
+ s,$,-,
+ : loop
+ s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
+ t loop
+ s,-$,,
+ s,^['$as_cr_digits']*\n,,
+ ' >$as_me.lineno &&
+ chmod +x $as_me.lineno ||
+ { { echo "$as_me:$LINENO: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
+echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
+ { (exit 1); exit 1; }; }
+
+ # Don't try to exec as it changes $[0], causing all sort of problems
+ # (the dirname of $[0] is not the place where we might find the
+ # original and so on. Autoconf is especially sensible to this).
+ . ./$as_me.lineno
+ # Exit status is that of the last command.
+ exit
+}
+
+
+case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
+ *c*,-n*) ECHO_N= ECHO_C='
+' ECHO_T=' ' ;;
+ *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
+ *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
+esac
+
+if expr a : '\(a\)' >/dev/null 2>&1; then
+ as_expr=expr
+else
+ as_expr=false
+fi
- # Remove last slash and all that follows it. Not all systems have dirname.
- ac_dir=`echo $ac_file|sed 's%/[^/][^/]*$%%'`
- if test "$ac_dir" != "$ac_file" && test "$ac_dir" != .; then
- # The file is in a subdirectory.
- test ! -d "$ac_dir" && mkdir "$ac_dir"
- ac_dir_suffix="/`echo $ac_dir|sed 's%^\./%%'`"
- # A "../" for each directory in $ac_dir_suffix.
- ac_dots=`echo $ac_dir_suffix|sed 's%/[^/]*%../%g'`
+rm -f conf$$ conf$$.exe conf$$.file
+echo >conf$$.file
+if ln -s conf$$.file conf$$ 2>/dev/null; then
+ # We could just check for DJGPP; but this test a) works b) is more generic
+ # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
+ if test -f conf$$.exe; then
+ # Don't use ln at all; we don't have any links
+ as_ln_s='cp -p'
else
- ac_dir_suffix= ac_dots=
+ as_ln_s='ln -s'
fi
+elif ln conf$$.file conf$$ 2>/dev/null; then
+ as_ln_s=ln
+else
+ as_ln_s='cp -p'
+fi
+rm -f conf$$ conf$$.exe conf$$.file
- case "$ac_given_srcdir" in
- .) srcdir=.
- if test -z "$ac_dots"; then top_srcdir=.
- else top_srcdir=`echo $ac_dots|sed 's%/$%%'`; fi ;;
- /*) srcdir="$ac_given_srcdir$ac_dir_suffix"; top_srcdir="$ac_given_srcdir" ;;
- *) # Relative path.
- srcdir="$ac_dots$ac_given_srcdir$ac_dir_suffix"
- top_srcdir="$ac_dots$ac_given_srcdir" ;;
+as_executable_p="test -f"
+
+# Sed expression to map a string onto a valid CPP name.
+as_tr_cpp="sed y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g"
+
+# Sed expression to map a string onto a valid variable name.
+as_tr_sh="sed y%*+%pp%;s%[^_$as_cr_alnum]%_%g"
+
+
+# IFS
+# We need space, tab and new line, in precisely that order.
+as_nl='
+'
+IFS=" $as_nl"
+
+# CDPATH.
+$as_unset CDPATH || test "${CDPATH+set}" != set || { CDPATH=$PATH_SEPARATOR; export CDPATH; }
+
+exec 6>&1
+
+# Open the log real soon, to keep \$[0] and so on meaningful, and to
+# report actual input values of CONFIG_FILES etc. instead of their
+# values after options handling. Logging --version etc. is OK.
+exec 5>>config.log
+{
+ echo
+ sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
+## Running $as_me. ##
+_ASBOX
+} >&5
+cat >&5 <<_CSEOF
+
+This file was extended by $as_me, which was
+generated by GNU Autoconf 2.53. Invocation command line was
+
+ CONFIG_FILES = $CONFIG_FILES
+ CONFIG_HEADERS = $CONFIG_HEADERS
+ CONFIG_LINKS = $CONFIG_LINKS
+ CONFIG_COMMANDS = $CONFIG_COMMANDS
+ $ $0 $@
+
+_CSEOF
+echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
+echo >&5
+_ACEOF
+
+# Files that config.status was made for.
+if test -n "$ac_config_files"; then
+ echo "config_files=\"$ac_config_files\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_headers"; then
+ echo "config_headers=\"$ac_config_headers\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_links"; then
+ echo "config_links=\"$ac_config_links\"" >>$CONFIG_STATUS
+fi
+
+if test -n "$ac_config_commands"; then
+ echo "config_commands=\"$ac_config_commands\"" >>$CONFIG_STATUS
+fi
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+ac_cs_usage="\
+\`$as_me' instantiates files from templates according to the
+current configuration.
+
+Usage: $0 [OPTIONS] [FILE]...
+
+ -h, --help print this help, then exit
+ -V, --version print version number, then exit
+ -d, --debug don't remove temporary files
+ --recheck update $as_me by reconfiguring in the same conditions
+ --file=FILE[:TEMPLATE]
+ instantiate the configuration file FILE
+
+Configuration files:
+$config_files
+
+Report bugs to <bug-autoconf@gnu.org>."
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+ac_cs_version="\\
+config.status
+configured by $0, generated by GNU Autoconf 2.53,
+ with options \\"`echo "$ac_configure_args" | sed 's/[\\""\`\$]/\\\\&/g'`\\"
+
+Copyright 1992, 1993, 1994, 1995, 1996, 1998, 1999, 2000, 2001
+Free Software Foundation, Inc.
+This config.status script is free software; the Free Software Foundation
+gives unlimited permission to copy, distribute and modify it."
+srcdir=$srcdir
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+# If no file are specified by the user, then we need to provide default
+# value. By we need to know if files were specified by the user.
+ac_need_defaults=:
+while test $# != 0
+do
+ case $1 in
+ --*=*)
+ ac_option=`expr "x$1" : 'x\([^=]*\)='`
+ ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
+ shift
+ set dummy "$ac_option" "$ac_optarg" ${1+"$@"}
+ shift
+ ;;
+ -*);;
+ *) # This is not an option, so the user has probably given explicit
+ # arguments.
+ ac_need_defaults=false;;
esac
+ case $1 in
+ # Handling of the options.
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
+ echo "running $SHELL $0 " $ac_configure_args " --no-create --no-recursion"
+ exec $SHELL $0 $ac_configure_args --no-create --no-recursion ;;
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+ --version | --vers* | -V )
+ echo "$ac_cs_version"; exit 0 ;;
+ --he | --h)
+ # Conflict between --help and --header
+ { { echo "$as_me:$LINENO: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: ambiguous option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; };;
+ --help | --hel | -h )
+ echo "$ac_cs_usage"; exit 0 ;;
+ --debug | --d* | -d )
+ debug=: ;;
+ --file | --fil | --fi | --f )
+ shift
+ CONFIG_FILES="$CONFIG_FILES $1"
+ ac_need_defaults=false;;
+ --header | --heade | --head | --hea )
+ shift
+ CONFIG_HEADERS="$CONFIG_HEADERS $1"
+ ac_need_defaults=false;;
+
+ # This is an error.
+ -*) { { echo "$as_me:$LINENO: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&5
+echo "$as_me: error: unrecognized option: $1
+Try \`$0 --help' for more information." >&2;}
+ { (exit 1); exit 1; }; } ;;
+
+ *) ac_config_targets="$ac_config_targets $1" ;;
- echo creating "$ac_file"
- rm -f "$ac_file"
- configure_input="Generated automatically from `echo $ac_file_in|sed 's%.*/%%'` by configure."
- case "$ac_file" in
- *Makefile*) ac_comsub="1i\\
-# $configure_input" ;;
- *) ac_comsub= ;;
esac
+ shift
+done
+
+_ACEOF
- ac_file_inputs=`echo $ac_file_in|sed -e "s%^%$ac_given_srcdir/%" -e "s%:% $ac_given_srcdir/%g"`
- sed -e "$ac_comsub
-s%@configure_input@%$configure_input%g
-s%@srcdir@%$srcdir%g
-s%@top_srcdir@%$top_srcdir%g
-" $ac_file_inputs | (eval "$ac_sed_cmds") > $ac_file
-fi; done
-rm -f conftest.s*
-EOF
-cat >> $CONFIG_STATUS <<EOF
-EOF
-cat >> $CONFIG_STATUS <<\EOF
-exit 0
-EOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_config_target in $ac_config_targets
+do
+ case "$ac_config_target" in
+ # Handling of arguments.
+ "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile" ;;
+ *) { { echo "$as_me:$LINENO: error: invalid argument: $ac_config_target" >&5
+echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
+ { (exit 1); exit 1; }; };;
+ esac
+done
+
+# If the user did not use the arguments to specify the items to instantiate,
+# then the envvar interface is used. Set only those that are not.
+# We use the long form for the default assignment because of an extremely
+# bizarre bug on SunOS 4.1.3.
+if $ac_need_defaults; then
+ test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
+fi
+
+# Create a temporary directory, and hook for its removal unless debugging.
+$debug ||
+{
+ trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
+ trap '{ (exit 1); exit 1; }' 1 2 13 15
+}
+
+# Create a (secure) tmp directory for tmp files.
+: ${TMPDIR=/tmp}
+{
+ tmp=`(umask 077 && mktemp -d -q "$TMPDIR/csXXXXXX") 2>/dev/null` &&
+ test -n "$tmp" && test -d "$tmp"
+} ||
+{
+ tmp=$TMPDIR/cs$$-$RANDOM
+ (umask 077 && mkdir $tmp)
+} ||
+{
+ echo "$me: cannot create a temporary directory in $TMPDIR" >&2
+ { (exit 1); exit 1; }
+}
+
+_ACEOF
+
+cat >>$CONFIG_STATUS <<_ACEOF
+
+#
+# CONFIG_FILES section.
+#
+
+# No need to generate the scripts if there are no CONFIG_FILES.
+# This happens for instance when ./config.status config.h
+if test -n "\$CONFIG_FILES"; then
+ # Protect against being on the right side of a sed subst in config.status.
+ sed 's/,@/@@/; s/@,/@@/; s/,;t t\$/@;t t/; /@;t t\$/s/[\\\\&,]/\\\\&/g;
+ s/@@/,@/; s/@@/@,/; s/@;t t\$/,;t t/' >\$tmp/subs.sed <<\\CEOF
+s,@SHELL@,$SHELL,;t t
+s,@PATH_SEPARATOR@,$PATH_SEPARATOR,;t t
+s,@PACKAGE_NAME@,$PACKAGE_NAME,;t t
+s,@PACKAGE_TARNAME@,$PACKAGE_TARNAME,;t t
+s,@PACKAGE_VERSION@,$PACKAGE_VERSION,;t t
+s,@PACKAGE_STRING@,$PACKAGE_STRING,;t t
+s,@PACKAGE_BUGREPORT@,$PACKAGE_BUGREPORT,;t t
+s,@exec_prefix@,$exec_prefix,;t t
+s,@prefix@,$prefix,;t t
+s,@program_transform_name@,$program_transform_name,;t t
+s,@bindir@,$bindir,;t t
+s,@sbindir@,$sbindir,;t t
+s,@libexecdir@,$libexecdir,;t t
+s,@datadir@,$datadir,;t t
+s,@sysconfdir@,$sysconfdir,;t t
+s,@sharedstatedir@,$sharedstatedir,;t t
+s,@localstatedir@,$localstatedir,;t t
+s,@libdir@,$libdir,;t t
+s,@includedir@,$includedir,;t t
+s,@oldincludedir@,$oldincludedir,;t t
+s,@infodir@,$infodir,;t t
+s,@mandir@,$mandir,;t t
+s,@build_alias@,$build_alias,;t t
+s,@host_alias@,$host_alias,;t t
+s,@target_alias@,$target_alias,;t t
+s,@DEFS@,$DEFS,;t t
+s,@ECHO_C@,$ECHO_C,;t t
+s,@ECHO_N@,$ECHO_N,;t t
+s,@ECHO_T@,$ECHO_T,;t t
+s,@LIBS@,$LIBS,;t t
+s,@CC@,$CC,;t t
+s,@CFLAGS@,$CFLAGS,;t t
+s,@LDFLAGS@,$LDFLAGS,;t t
+s,@CPPFLAGS@,$CPPFLAGS,;t t
+s,@ac_ct_CC@,$ac_ct_CC,;t t
+s,@EXEEXT@,$EXEEXT,;t t
+s,@OBJEXT@,$OBJEXT,;t t
+s,@LIBOBJS@,$LIBOBJS,;t t
+CEOF
+
+_ACEOF
+
+ cat >>$CONFIG_STATUS <<\_ACEOF
+ # Split the substitutions into bite-sized pieces for seds with
+ # small command number limits, like on Digital OSF/1 and HP-UX.
+ ac_max_sed_lines=48
+ ac_sed_frag=1 # Number of current file.
+ ac_beg=1 # First line for current file.
+ ac_end=$ac_max_sed_lines # Line after last line for current file.
+ ac_more_lines=:
+ ac_sed_cmds=
+ while $ac_more_lines; do
+ if test $ac_beg -gt 1; then
+ sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ else
+ sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
+ fi
+ if test ! -s $tmp/subs.frag; then
+ ac_more_lines=false
+ else
+ # The purpose of the label and of the branching condition is to
+ # speed up the sed processing (if there are no `@' at all, there
+ # is no need to browse any of the substitutions).
+ # These are the two extra sed commands mentioned above.
+ (echo ':t
+ /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
+ else
+ ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
+ fi
+ ac_sed_frag=`expr $ac_sed_frag + 1`
+ ac_beg=$ac_end
+ ac_end=`expr $ac_end + $ac_max_sed_lines`
+ fi
+ done
+ if test -z "$ac_sed_cmds"; then
+ ac_sed_cmds=cat
+ fi
+fi # test -n "$CONFIG_FILES"
+
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
+ # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
+ case $ac_file in
+ - | *:- | *:-:* ) # input from stdin
+ cat >$tmp/stdin
+ ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
+ ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
+ * ) ac_file_in=$ac_file.in ;;
+ esac
+
+ # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
+ ac_dir=`(dirname "$ac_file") 2>/dev/null ||
+$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
+ X"$ac_file" : 'X\(//\)[^/]' \| \
+ X"$ac_file" : 'X\(//\)$' \| \
+ X"$ac_file" : 'X\(/\)' \| \
+ . : '\(.\)' 2>/dev/null ||
+echo X"$ac_file" |
+ sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
+ /^X\(\/\/\)[^/].*/{ s//\1/; q; }
+ /^X\(\/\/\)$/{ s//\1/; q; }
+ /^X\(\/\).*/{ s//\1/; q; }
+ s/.*/./; q'`
+ { case "$ac_dir" in
+ [\\/]* | ?:[\\/]* ) as_incr_dir=;;
+ *) as_incr_dir=.;;
+esac
+as_dummy="$ac_dir"
+for as_mkdir_dir in `IFS='/\\'; set X $as_dummy; shift; echo "$@"`; do
+ case $as_mkdir_dir in
+ # Skip DOS drivespec
+ ?:) as_incr_dir=$as_mkdir_dir ;;
+ *)
+ as_incr_dir=$as_incr_dir/$as_mkdir_dir
+ test -d "$as_incr_dir" ||
+ mkdir "$as_incr_dir" ||
+ { { echo "$as_me:$LINENO: error: cannot create \"$ac_dir\"" >&5
+echo "$as_me: error: cannot create \"$ac_dir\"" >&2;}
+ { (exit 1); exit 1; }; }
+ ;;
+ esac
+done; }
+
+ ac_builddir=.
+
+if test "$ac_dir" != .; then
+ ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
+ # A "../" for each directory in $ac_dir_suffix.
+ ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
+else
+ ac_dir_suffix= ac_top_builddir=
+fi
+
+case $srcdir in
+ .) # No --srcdir option. We are building in place.
+ ac_srcdir=.
+ if test -z "$ac_top_builddir"; then
+ ac_top_srcdir=.
+ else
+ ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
+ fi ;;
+ [\\/]* | ?:[\\/]* ) # Absolute path.
+ ac_srcdir=$srcdir$ac_dir_suffix;
+ ac_top_srcdir=$srcdir ;;
+ *) # Relative path.
+ ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
+ ac_top_srcdir=$ac_top_builddir$srcdir ;;
+esac
+# Don't blindly perform a `cd "$ac_dir"/$ac_foo && pwd` since $ac_foo can be
+# absolute.
+ac_abs_builddir=`cd "$ac_dir" && cd $ac_builddir && pwd`
+ac_abs_top_builddir=`cd "$ac_dir" && cd $ac_top_builddir && pwd`
+ac_abs_srcdir=`cd "$ac_dir" && cd $ac_srcdir && pwd`
+ac_abs_top_srcdir=`cd "$ac_dir" && cd $ac_top_srcdir && pwd`
+
+
+
+ if test x"$ac_file" != x-; then
+ { echo "$as_me:$LINENO: creating $ac_file" >&5
+echo "$as_me: creating $ac_file" >&6;}
+ rm -f "$ac_file"
+ fi
+ # Let's still pretend it is `configure' which instantiates (i.e., don't
+ # use $as_me), people would be surprised to read:
+ # /* config.h. Generated by config.status. */
+ if test x"$ac_file" = x-; then
+ configure_input=
+ else
+ configure_input="$ac_file. "
+ fi
+ configure_input=$configure_input"Generated from `echo $ac_file_in |
+ sed 's,.*/,,'` by configure."
+
+ # First look for the input files in the build tree, otherwise in the
+ # src tree.
+ ac_file_inputs=`IFS=:
+ for f in $ac_file_in; do
+ case $f in
+ -) echo $tmp/stdin ;;
+ [\\/$]*)
+ # Absolute (can't be DOS-style, as IFS=:)
+ test -f "$f" || { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ echo $f;;
+ *) # Relative
+ if test -f "$f"; then
+ # Build tree
+ echo $f
+ elif test -f "$srcdir/$f"; then
+ # Source tree
+ echo $srcdir/$f
+ else
+ # /dev/null tree
+ { { echo "$as_me:$LINENO: error: cannot find input file: $f" >&5
+echo "$as_me: error: cannot find input file: $f" >&2;}
+ { (exit 1); exit 1; }; }
+ fi;;
+ esac
+ done` || { (exit 1); exit 1; }
+_ACEOF
+cat >>$CONFIG_STATUS <<_ACEOF
+ sed "$ac_vpsub
+$extrasub
+_ACEOF
+cat >>$CONFIG_STATUS <<\_ACEOF
+:t
+/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
+s,@configure_input@,$configure_input,;t t
+s,@srcdir@,$ac_srcdir,;t t
+s,@abs_srcdir@,$ac_abs_srcdir,;t t
+s,@top_srcdir@,$ac_top_srcdir,;t t
+s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
+s,@builddir@,$ac_builddir,;t t
+s,@abs_builddir@,$ac_abs_builddir,;t t
+s,@top_builddir@,$ac_top_builddir,;t t
+s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
+" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
+ rm -f $tmp/stdin
+ if test x"$ac_file" != x-; then
+ mv $tmp/out $ac_file
+ else
+ cat $tmp/out
+ rm -f $tmp/out
+ fi
+
+done
+_ACEOF
+
+cat >>$CONFIG_STATUS <<\_ACEOF
+
+{ (exit 0); exit 0; }
+_ACEOF
chmod +x $CONFIG_STATUS
-rm -fr confdefs* $ac_clean_files
-test "$no_create" = yes || ${CONFIG_SHELL-/bin/sh} $CONFIG_STATUS || exit 1
+ac_clean_files=$ac_clean_files_save
+
+
+# configure is writing to config.log, and then calls config.status.
+# config.status does its own redirection, appending to config.log.
+# Unfortunately, on DOS this fails, as config.log is still kept open
+# by configure, so config.status won't be able to write to it; its
+# output is simply discarded. So we exec the FD to /dev/null,
+# effectively closing config.log, so it can be properly (re)opened and
+# appended to by config.status. When coming back to configure, we
+# need to make the FD available again.
+if test "$no_create" != yes; then
+ ac_cs_success=:
+ exec 5>/dev/null
+ $SHELL $CONFIG_STATUS || ac_cs_success=false
+ exec 5>>config.log
+ # Use ||, not &&, to avoid exiting from the if with $? = 1, which
+ # would make configure fail if this is the last instruction.
+ $ac_cs_success || { (exit 1); exit 1; }
+fi
diff --git a/contrib/queryperf/configure.in b/contrib/queryperf/configure.in
index 1b7737fa..efbd9462 100644
--- a/contrib/queryperf/configure.in
+++ b/contrib/queryperf/configure.in
@@ -36,9 +36,31 @@ AC_DEFUN(AC_TYPE_SOCKLEN_T,
fi
])
-AC_SEARCH_LIBS(res_mkquery, resolv bind);
+AC_DEFUN(AC_SA_LEN,
+[AC_CACHE_CHECK([for sa_len], ac_cv_sa_len,
+[
+ AC_TRY_COMPILE(
+ [#include <sys/types.h>
+ #include <sys/socket.h>],
+ [struct sockaddr sa; sa.sa_len = 0;],
+ ac_cv_sa_len=yes,
+ ac_cv_sa_len=no)
+])
+ if test $ac_cv_sa_len = yes; then
+ AC_DEFINE(HAVE_SA_LEN)
+ fi
+])
+
+AC_SEARCH_LIBS(res_mkquery, resolv bind)
AC_CHECK_LIB(socket, socket)
AC_CHECK_LIB(nsl, inet_ntoa)
+AC_CHECK_FUNCS(gethostbyname2)
+AC_CHECK_FUNC(getaddrinfo,
+ AC_DEFINE(HAVE_GETADDRINFO), AC_LIBOBJ(getaddrinfo))
+AC_CHECK_FUNC(getnameinfo,
+ AC_DEFINE(HAVE_GETNAMEINFO), AC_LIBOBJ(getnameinfo))
+
AC_TYPE_SOCKLEN_T
+AC_SA_LEN
AC_OUTPUT(Makefile)
diff --git a/contrib/queryperf/missing/addrinfo.h b/contrib/queryperf/missing/addrinfo.h
new file mode 100644
index 00000000..54a5e85b
--- /dev/null
+++ b/contrib/queryperf/missing/addrinfo.h
@@ -0,0 +1,100 @@
+/*
+ * Copyright (C) 1995, 1996, 1997, 1998, and 1999 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:
+ * 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.
+ * 3. 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
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT 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.
+ */
+
+#ifndef HAVE_GETADDRINFO
+
+/*
+ * Error return codes from getaddrinfo()
+ */
+#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 */
+#define EAI_FAIL 4 /* non-recoverable failure in name resolution */
+#define EAI_FAMILY 5 /* ai_family not supported */
+#define EAI_MEMORY 6 /* memory allocation failure */
+#define EAI_NODATA 7 /* no address associated with hostname */
+#define EAI_NONAME 8 /* hostname nor servname provided, or not known */
+#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
+
+/*
+ * Flag values for getaddrinfo()
+ */
+#define AI_PASSIVE 0x00000001 /* get address to use bind() */
+#define AI_CANONNAME 0x00000002 /* fill ai_canonname */
+#define AI_NUMERICHOST 0x00000004 /* prevent name resolution */
+/* valid flags for addrinfo */
+#define AI_MASK (AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST)
+
+#define AI_ALL 0x00000100 /* IPv6 and IPv4-mapped (with AI_V4MAPPED) */
+#define AI_V4MAPPED_CFG 0x00000200 /* accept IPv4-mapped if kernel supports */
+#define AI_ADDRCONFIG 0x00000400 /* only if any address is assigned */
+#define AI_V4MAPPED 0x00000800 /* accept IPv4-mapped IPv6 address */
+/* special recommended flags for getipnodebyname */
+#define AI_DEFAULT (AI_V4MAPPED_CFG | AI_ADDRCONFIG)
+
+/*
+ * Constants for getnameinfo()
+ */
+#define NI_MAXHOST 1025
+#define NI_MAXSERV 32
+
+/*
+ * Flag values for getnameinfo()
+ */
+#define NI_NOFQDN 0x00000001
+#define NI_NUMERICHOST 0x00000002
+#define NI_NAMEREQD 0x00000004
+#define NI_NUMERICSERV 0x00000008
+#define NI_DGRAM 0x00000010
+
+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 */
+ size_t ai_addrlen; /* length of ai_addr */
+ char *ai_canonname; /* canonical name for hostname */
+ struct sockaddr *ai_addr; /* binary address */
+ struct addrinfo *ai_next; /* next structure in linked list */
+};
+
+struct sockaddr_storage {
+ u_char __ss_len;
+ u_char __ss_family;
+ u_char fill[126];
+};
+
+extern void freehostent(struct hostent *);
+extern char *gai_strerror(int);
+#endif
diff --git a/contrib/queryperf/missing/getaddrinfo.c b/contrib/queryperf/missing/getaddrinfo.c
new file mode 100644
index 00000000..69eb748c
--- /dev/null
+++ b/contrib/queryperf/missing/getaddrinfo.c
@@ -0,0 +1,632 @@
+/*
+ * 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:
+ * 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.
+ * 3. 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
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT 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.
+ */
+
+#include <sys/types.h>
+#include <sys/param.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+#include <netdb.h>
+#include <resolv.h>
+#include <string.h>
+#include <stdlib.h>
+#include <stddef.h>
+#include <ctype.h>
+#include <unistd.h>
+
+#include "addrinfo.h"
+
+#define SUCCESS 0
+#define ANY 0
+#define YES 1
+#define NO 0
+
+static const char in_addrany[] = { 0, 0, 0, 0 };
+static const char in6_addrany[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
+};
+static const char in_loopback[] = { 127, 0, 0, 1 };
+static const char in6_loopback[] = {
+ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1
+};
+
+struct sockinet {
+ u_char si_len;
+ u_char si_family;
+ u_short si_port;
+};
+
+static struct afd {
+ int a_af;
+ int a_addrlen;
+ int a_socklen;
+ int a_off;
+ const char *a_addrany;
+ const char *a_loopback;
+} afdl [] = {
+#ifdef INET6
+#define N_INET6 0
+ {PF_INET6, sizeof(struct in6_addr),
+ sizeof(struct sockaddr_in6),
+ offsetof(struct sockaddr_in6, sin6_addr),
+ in6_addrany, in6_loopback},
+#define N_INET 1
+#else
+#define N_INET 0
+#endif
+ {PF_INET, sizeof(struct in_addr),
+ sizeof(struct sockaddr_in),
+ offsetof(struct sockaddr_in, sin_addr),
+ in_addrany, in_loopback},
+ {0, 0, 0, 0, NULL, NULL},
+};
+
+#ifdef INET6
+#define PTON_MAX 16
+#else
+#define PTON_MAX 4
+#endif
+
+
+static int get_name(const char *, struct afd *,
+ struct addrinfo **, char *, struct addrinfo *,
+ int);
+static int get_addr(const char *, int, struct addrinfo **,
+ struct addrinfo *, int);
+static int get_addr0(const char *, int, struct addrinfo **,
+ struct addrinfo *, int);
+static int str_isnumber(const char *);
+
+static char *ai_errlist[] = {
+ "Success",
+ "Address family for hostname not supported", /* EAI_ADDRFAMILY */
+ "Temporary failure in name resolution", /* EAI_AGAIN */
+ "Invalid value for ai_flags", /* EAI_BADFLAGS */
+ "Non-recoverable failure in name resolution", /* EAI_FAIL */
+ "ai_family not supported", /* EAI_FAMILY */
+ "Memory allocation failure", /* EAI_MEMORY */
+ "No address associated with hostname", /* EAI_NODATA */
+ "hostname nor servname provided, or not known",/* EAI_NONAME */
+ "servname not supported for ai_socktype", /* EAI_SERVICE */
+ "ai_socktype not supported", /* EAI_SOCKTYPE */
+ "System error returned in errno", /* EAI_SYSTEM */
+ "Invalid value for hints", /* EAI_BADHINTS */
+ "Resolved protocol is unknown", /* EAI_PROTOCOL */
+ "Unknown error", /* EAI_MAX */
+};
+
+#define GET_CANONNAME(ai, str) \
+if (pai->ai_flags & AI_CANONNAME) {\
+ if (((ai)->ai_canonname = (char *)malloc(strlen(str) + 1)) != NULL) {\
+ strcpy((ai)->ai_canonname, (str));\
+ } else {\
+ error = EAI_MEMORY;\
+ goto free;\
+ }\
+}
+
+#ifdef HAVE_SA_LEN
+#define SET_AILEN(ai,l) (ai)->ai_addr->sa_len = (ai)->ai_addrlen = (l)
+#else
+#define SET_AILEN(ai,l) (ai)->ai_addrlen = (l)
+#endif
+
+#define GET_AI(ai, afd, addr, port) {\
+ char *p;\
+ if (((ai) = (struct addrinfo *)malloc(sizeof(struct addrinfo) +\
+ ((afd)->a_socklen)))\
+ == NULL) {\
+ error = EAI_MEMORY;\
+ goto free;\
+ }\
+ memcpy(ai, pai, sizeof(struct addrinfo));\
+ (ai)->ai_addr = (struct sockaddr *)((ai) + 1);\
+ memset((ai)->ai_addr, 0, (afd)->a_socklen);\
+ SET_AILEN((ai), (afd)->a_socklen);\
+ (ai)->ai_addr->sa_family = (ai)->ai_family = (afd)->a_af;\
+ ((struct sockinet *)(ai)->ai_addr)->si_port = port;\
+ p = (char *)((ai)->ai_addr);\
+ memcpy(p + (afd)->a_off, (addr), (afd)->a_addrlen);\
+}
+
+#define ERR(err) { error = (err); goto bad; }
+
+char *
+gai_strerror(ecode)
+ int ecode;
+{
+ if (ecode < 0 || ecode > EAI_MAX)
+ ecode = EAI_MAX;
+ return ai_errlist[ecode];
+}
+
+void
+freeaddrinfo(ai)
+ struct addrinfo *ai;
+{
+ struct addrinfo *next;
+
+ do {
+ next = ai->ai_next;
+ if (ai->ai_canonname)
+ free(ai->ai_canonname);
+ /* no need to free(ai->ai_addr) */
+ free(ai);
+ } while ((ai = next) != NULL);
+}
+
+static int
+str_isnumber(p)
+ const char *p;
+{
+ char *q = (char *)p;
+ while (*q) {
+ if (! isdigit(*q))
+ return NO;
+ q++;
+ }
+ return YES;
+}
+
+int
+getaddrinfo(hostname, servname, hints, res)
+ const char *hostname, *servname;
+ const struct addrinfo *hints;
+ struct addrinfo **res;
+{
+ struct addrinfo sentinel;
+ struct addrinfo *top = NULL;
+ struct addrinfo *cur;
+ int i, error = 0;
+ char pton[PTON_MAX];
+ struct addrinfo ai;
+ struct addrinfo *pai;
+ u_short port;
+
+ /* initialize file static vars */
+ sentinel.ai_next = NULL;
+ cur = &sentinel;
+ pai = &ai;
+ pai->ai_flags = 0;
+ pai->ai_family = PF_UNSPEC;
+ pai->ai_socktype = ANY;
+ pai->ai_protocol = ANY;
+ pai->ai_addrlen = 0;
+ pai->ai_canonname = NULL;
+ pai->ai_addr = NULL;
+ pai->ai_next = NULL;
+ port = ANY;
+
+ if (hostname == NULL && servname == NULL)
+ return EAI_NONAME;
+ if (hints) {
+ /* error check for hints */
+ if (hints->ai_addrlen || hints->ai_canonname ||
+ hints->ai_addr || hints->ai_next)
+ ERR(EAI_BADHINTS); /* xxx */
+ if (hints->ai_flags & ~AI_MASK)
+ ERR(EAI_BADFLAGS);
+ switch (hints->ai_family) {
+ case PF_UNSPEC:
+ case PF_INET:
+#ifdef INET6
+ case PF_INET6:
+#endif
+ break;
+ default:
+ ERR(EAI_FAMILY);
+ }
+ memcpy(pai, hints, sizeof(*pai));
+ switch (pai->ai_socktype) {
+ case ANY:
+ switch (pai->ai_protocol) {
+ case ANY:
+ break;
+ case IPPROTO_UDP:
+ pai->ai_socktype = SOCK_DGRAM;
+ break;
+ case IPPROTO_TCP:
+ pai->ai_socktype = SOCK_STREAM;
+ break;
+ default:
+ pai->ai_socktype = SOCK_RAW;
+ break;
+ }
+ break;
+ case SOCK_RAW:
+ break;
+ case SOCK_DGRAM:
+ if (pai->ai_protocol != IPPROTO_UDP &&
+ pai->ai_protocol != ANY)
+ ERR(EAI_BADHINTS); /*xxx*/
+ pai->ai_protocol = IPPROTO_UDP;
+ break;
+ case SOCK_STREAM:
+ if (pai->ai_protocol != IPPROTO_TCP &&
+ pai->ai_protocol != ANY)
+ ERR(EAI_BADHINTS); /*xxx*/
+ pai->ai_protocol = IPPROTO_TCP;
+ break;
+ default:
+ ERR(EAI_SOCKTYPE);
+ break;
+ }
+ }
+
+ /*
+ * service port
+ */
+ if (servname) {
+ if (str_isnumber(servname)) {
+ if (pai->ai_socktype == ANY) {
+ /* caller accept *ANY* socktype */
+ pai->ai_socktype = SOCK_DGRAM;
+ pai->ai_protocol = IPPROTO_UDP;
+ }
+ port = htons(atoi(servname));
+ } else {
+ struct servent *sp;
+ char *proto;
+
+ proto = NULL;
+ switch (pai->ai_socktype) {
+ case ANY:
+ proto = NULL;
+ break;
+ case SOCK_DGRAM:
+ proto = "udp";
+ break;
+ case SOCK_STREAM:
+ proto = "tcp";
+ break;
+ default:
+ fprintf(stderr, "panic!\n");
+ break;
+ }
+ if ((sp = getservbyname(servname, proto)) == NULL)
+ ERR(EAI_SERVICE);
+ port = sp->s_port;
+ if (pai->ai_socktype == ANY) {
+ if (strcmp(sp->s_proto, "udp") == 0) {
+ pai->ai_socktype = SOCK_DGRAM;
+ pai->ai_protocol = IPPROTO_UDP;
+ } else if (strcmp(sp->s_proto, "tcp") == 0) {
+ pai->ai_socktype = SOCK_STREAM;
+ pai->ai_protocol = IPPROTO_TCP;
+ } else
+ ERR(EAI_PROTOCOL); /*xxx*/
+ }
+ }
+ }
+
+ /*
+ * hostname == NULL.
+ * passive socket -> anyaddr (0.0.0.0 or ::)
+ * non-passive socket -> localhost (127.0.0.1 or ::1)
+ */
+ if (hostname == NULL) {
+ struct afd *afd;
+ int s;
+
+ for (afd = &afdl[0]; afd->a_af; afd++) {
+ if (!(pai->ai_family == PF_UNSPEC
+ || pai->ai_family == afd->a_af)) {
+ continue;
+ }
+
+ /*
+ * filter out AFs that are not supported by the kernel
+ * XXX errno?
+ */
+ s = socket(afd->a_af, SOCK_DGRAM, 0);
+ if (s < 0)
+ continue;
+ close(s);
+
+ if (pai->ai_flags & AI_PASSIVE) {
+ GET_AI(cur->ai_next, afd, afd->a_addrany, port);
+ /* xxx meaningless?
+ * GET_CANONNAME(cur->ai_next, "anyaddr");
+ */
+ } else {
+ GET_AI(cur->ai_next, afd, afd->a_loopback,
+ port);
+ /* xxx meaningless?
+ * GET_CANONNAME(cur->ai_next, "localhost");
+ */
+ }
+ cur = cur->ai_next;
+ }
+ top = sentinel.ai_next;
+ if (top)
+ goto good;
+ else
+ ERR(EAI_FAMILY);
+ }
+
+ /* hostname as numeric name */
+ for (i = 0; afdl[i].a_af; i++) {
+ if (inet_pton(afdl[i].a_af, hostname, pton) == 1) {
+ u_long v4a;
+ u_char pfx;
+
+ switch (afdl[i].a_af) {
+ case AF_INET:
+ v4a = ntohl(((struct in_addr *)pton)->s_addr);
+ if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
+ pai->ai_flags &= ~AI_CANONNAME;
+ v4a >>= IN_CLASSA_NSHIFT;
+ if (v4a == 0 || v4a == IN_LOOPBACKNET)
+ pai->ai_flags &= ~AI_CANONNAME;
+ break;
+#ifdef INET6
+ case AF_INET6:
+ pfx = ((struct in6_addr *)pton)->s6_addr[0];
+ if (pfx == 0 || pfx == 0xfe || pfx == 0xff)
+ pai->ai_flags &= ~AI_CANONNAME;
+ break;
+#endif
+ }
+
+ if (pai->ai_family == afdl[i].a_af ||
+ pai->ai_family == PF_UNSPEC) {
+ if (! (pai->ai_flags & AI_CANONNAME)) {
+ GET_AI(top, &afdl[i], pton, port);
+ goto good;
+ }
+ /*
+ * if AI_CANONNAME and if reverse lookup
+ * fail, return ai anyway to pacify
+ * calling application.
+ *
+ * XXX getaddrinfo() is a name->address
+ * translation function, and it looks strange
+ * that we do addr->name translation here.
+ */
+ get_name(pton, &afdl[i], &top, pton, pai, port);
+ goto good;
+ } else
+ ERR(EAI_FAMILY); /*xxx*/
+ }
+ }
+
+ if (pai->ai_flags & AI_NUMERICHOST)
+ ERR(EAI_NONAME);
+
+ /* hostname as alphabetical name */
+ error = get_addr(hostname, pai->ai_family, &top, pai, port);
+ if (error == 0) {
+ if (top) {
+ good:
+ *res = top;
+ return SUCCESS;
+ } else
+ error = EAI_FAIL;
+ }
+ free:
+ if (top)
+ freeaddrinfo(top);
+ bad:
+ *res = NULL;
+ return error;
+}
+
+static int
+get_name(addr, afd, res, numaddr, pai, port0)
+ const char *addr;
+ struct afd *afd;
+ struct addrinfo **res;
+ char *numaddr;
+ struct addrinfo *pai;
+ int port0;
+{
+ u_short port = port0 & 0xffff;
+ struct hostent *hp;
+ struct addrinfo *cur;
+ int error = 0;
+ hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
+ if (hp && hp->h_name && hp->h_name[0] && hp->h_addr_list[0]) {
+ GET_AI(cur, afd, hp->h_addr_list[0], port);
+ GET_CANONNAME(cur, hp->h_name);
+ } else
+ GET_AI(cur, afd, numaddr, port);
+
+ *res = cur;
+ return SUCCESS;
+ free:
+ if (cur)
+ freeaddrinfo(cur);
+
+ /* bad: */
+ *res = NULL;
+ return error;
+}
+
+static int
+get_addr(hostname, af, res0, pai, port0)
+ const char *hostname;
+ int af;
+ struct addrinfo **res0;
+ struct addrinfo *pai;
+ int port0;
+{
+ int i, error, ekeep;
+ struct addrinfo *cur;
+ struct addrinfo **res;
+ int retry;
+ int s;
+
+ res = res0;
+ ekeep = 0;
+ error = 0;
+ for (i = 0; afdl[i].a_af; i++) {
+ retry = 0;
+ if (af == AF_UNSPEC) {
+ /*
+ * filter out AFs that are not supported by the kernel
+ * XXX errno?
+ */
+ s = socket(afdl[i].a_af, SOCK_DGRAM, 0);
+ if (s < 0)
+ continue;
+ close(s);
+ } else {
+ if (af != afdl[i].a_af)
+ continue;
+ }
+ /* It is WRONG, we need getipnodebyname(). */
+again:
+ error = get_addr0(hostname, afdl[i].a_af, res, pai, port0);
+ switch (error) {
+ case EAI_AGAIN:
+ if (++retry < 3)
+ goto again;
+ /* FALL THROUGH*/
+ default:
+ if (ekeep == 0)
+ ekeep = error;
+ break;
+ }
+ if (*res) {
+ /* make chain of addrs */
+ for (cur = *res;
+ cur && cur->ai_next;
+ cur = cur->ai_next)
+ ;
+ if (!cur)
+ return EAI_FAIL;
+ res = &cur->ai_next;
+ }
+ }
+
+ /* if we got something, it's okay */
+ if (*res0)
+ return 0;
+
+ return error ? error : ekeep;
+}
+
+static int
+get_addr0(hostname, af, res, pai, port0)
+ const char *hostname;
+ int af;
+ struct addrinfo **res;
+ struct addrinfo *pai;
+ int port0;
+{
+ u_short port = port0 & 0xffff;
+ struct addrinfo sentinel;
+ struct hostent *hp;
+ struct addrinfo *top, *cur;
+ struct afd *afd;
+ int i, error = 0, h_error;
+ char *ap;
+
+ top = NULL;
+ sentinel.ai_next = NULL;
+ cur = &sentinel;
+
+#ifdef HAVE_GETHOSTBYNAME2
+ if (af == AF_UNSPEC) {
+ error = EAI_FAIL;
+ goto bad;
+ }
+ hp = gethostbyname2(hostname, af);
+#else
+ if (af != AF_UNSPEC && af != AF_INET) {
+ error = EAI_FAIL;
+ goto bad;
+ }
+ hp = gethostbyname(hostname);
+#endif
+ h_error = h_errno;
+
+ if (hp == NULL) {
+ switch (h_error) {
+ case HOST_NOT_FOUND:
+ case NO_DATA:
+ error = EAI_NODATA;
+ break;
+ case TRY_AGAIN:
+ error = EAI_AGAIN;
+ break;
+ case NO_RECOVERY:
+ case NETDB_INTERNAL:
+ default:
+ error = EAI_FAIL;
+ break;
+ }
+ goto bad;
+ }
+
+ if ((hp->h_name == NULL) || (hp->h_name[0] == 0) ||
+ (hp->h_addr_list[0] == NULL))
+ ERR(EAI_FAIL);
+
+ for (i = 0; (ap = hp->h_addr_list[i]) != NULL; i++) {
+ switch (af) {
+#ifdef INET6
+ case AF_INET6:
+ afd = &afdl[N_INET6];
+ break;
+#endif
+#ifndef INET6
+ default: /* AF_UNSPEC */
+#endif
+ case AF_INET:
+ afd = &afdl[N_INET];
+ break;
+#ifdef INET6
+ default: /* AF_UNSPEC */
+ if (IN6_IS_ADDR_V4MAPPED((struct in6_addr *)ap)) {
+ ap += sizeof(struct in6_addr) -
+ sizeof(struct in_addr);
+ afd = &afdl[N_INET];
+ } else
+ afd = &afdl[N_INET6];
+ break;
+#endif
+ }
+ GET_AI(cur->ai_next, afd, ap, port);
+ if (cur == &sentinel) {
+ top = cur->ai_next;
+ GET_CANONNAME(top, hp->h_name);
+ }
+ cur = cur->ai_next;
+ }
+ *res = top;
+ return SUCCESS;
+ free:
+ if (top)
+ freeaddrinfo(top);
+ bad:
+ *res = NULL;
+ return error;
+}
diff --git a/contrib/queryperf/missing/getnameinfo.c b/contrib/queryperf/missing/getnameinfo.c
new file mode 100644
index 00000000..6b1cbe11
--- /dev/null
+++ b/contrib/queryperf/missing/getnameinfo.c
@@ -0,0 +1,226 @@
+/*
+ * 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:
+ * 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.
+ * 3. 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
+ * ARE DISCLAIMED. IN NO EVENT SHALL THE PROJECT 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.
+ */
+
+/*
+ * Issues to be discussed:
+ * - Thread safe-ness must be checked
+ * - Return values. There seems to be no standard for return value (RFC2553)
+ * but INRIA implementation returns EAI_xxx defined for getaddrinfo().
+ */
+
+#include <sys/types.h>
+#include <sys/socket.h>
+#include <netinet/in.h>
+#include <arpa/inet.h>
+#include <arpa/nameser.h>
+#include <netdb.h>
+#include <resolv.h>
+#include <string.h>
+#include <stddef.h>
+
+#include "addrinfo.h"
+
+#define SUCCESS 0
+#define ANY 0
+#define YES 1
+#define NO 0
+
+static struct afd {
+ int a_af;
+ int a_addrlen;
+ int a_socklen;
+ int a_off;
+} afdl [] = {
+#ifdef INET6
+ {PF_INET6, sizeof(struct in6_addr), sizeof(struct sockaddr_in6),
+ offsetof(struct sockaddr_in6, sin6_addr)},
+#endif
+ {PF_INET, sizeof(struct in_addr), sizeof(struct sockaddr_in),
+ offsetof(struct sockaddr_in, sin_addr)},
+ {0, 0, 0},
+};
+
+struct sockinet {
+ u_char si_len;
+ u_char si_family;
+ u_short si_port;
+};
+
+#define ENI_NOSOCKET 0
+#define ENI_NOSERVNAME 1
+#define ENI_NOHOSTNAME 2
+#define ENI_MEMORY 3
+#define ENI_SYSTEM 4
+#define ENI_FAMILY 5
+#define ENI_SALEN 6
+
+int
+getnameinfo(sa, salen, host, hostlen, serv, servlen, flags)
+ const struct sockaddr *sa;
+ size_t salen;
+ char *host;
+ size_t hostlen;
+ char *serv;
+ size_t servlen;
+ int flags;
+{
+ struct afd *afd;
+ struct servent *sp;
+ struct hostent *hp;
+ u_short port;
+ int family, len, i;
+ char *addr, *p;
+ u_long v4a;
+ int h_error;
+ char numserv[512];
+ char numaddr[512];
+
+ if (sa == NULL)
+ return ENI_NOSOCKET;
+
+#ifdef HAVE_SA_LEN
+ len = sa->sa_len;
+ if (len != salen) return ENI_SALEN;
+#else
+ len = salen;
+#endif
+
+ family = sa->sa_family;
+ for (i = 0; afdl[i].a_af; i++)
+ if (afdl[i].a_af == family) {
+ afd = &afdl[i];
+ goto found;
+ }
+ return ENI_FAMILY;
+
+ found:
+ if (len != afd->a_socklen) return ENI_SALEN;
+
+ port = ((struct sockinet *)sa)->si_port; /* network byte order */
+ addr = (char *)sa + afd->a_off;
+
+ if (serv == NULL || servlen == 0) {
+ /* what we should do? */
+ } else if (flags & NI_NUMERICSERV) {
+ snprintf(numserv, sizeof(numserv), "%d", ntohs(port));
+ if (strlen(numserv) > servlen)
+ return ENI_MEMORY;
+ strcpy(serv, numserv);
+ } else {
+ sp = getservbyport(port, (flags & NI_DGRAM) ? "udp" : "tcp");
+ if (sp) {
+ if (strlen(sp->s_name) > servlen)
+ return ENI_MEMORY;
+ strcpy(serv, sp->s_name);
+ } else
+ return ENI_NOSERVNAME;
+ }
+
+ switch (sa->sa_family) {
+ case AF_INET:
+ v4a = ntohl(((struct sockaddr_in *)sa)->sin_addr.s_addr);
+ if (IN_MULTICAST(v4a) || IN_EXPERIMENTAL(v4a))
+ flags |= NI_NUMERICHOST;
+ v4a >>= IN_CLASSA_NSHIFT;
+ if (v4a == 0 || v4a == IN_LOOPBACKNET)
+ flags |= NI_NUMERICHOST;
+ break;
+#ifdef INET6
+ case AF_INET6:
+ {
+ struct sockaddr_in6 *sin6;
+ sin6 = (struct sockaddr_in6 *)sa;
+ switch (sin6->sin6_addr.s6_addr[0]) {
+ case 0x00:
+ if (IN6_IS_ADDR_V4MAPPED(&sin6->sin6_addr))
+ ;
+ else if (IN6_IS_ADDR_LOOPBACK(&sin6->sin6_addr))
+ ;
+ else
+ flags |= NI_NUMERICHOST;
+ break;
+ default:
+ if (IN6_IS_ADDR_LINKLOCAL(&sin6->sin6_addr))
+ flags |= NI_NUMERICHOST;
+ else if (IN6_IS_ADDR_MULTICAST(&sin6->sin6_addr))
+ flags |= NI_NUMERICHOST;
+ break;
+ }
+ }
+ break;
+#endif
+ }
+ if (host == NULL || hostlen == 0) {
+ /* what should we do? */
+ } else if (flags & NI_NUMERICHOST) {
+ /* NUMERICHOST and NAMEREQD conflicts with each other */
+ if (flags & NI_NAMEREQD)
+ return ENI_NOHOSTNAME;
+ if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))
+ == NULL)
+ return ENI_SYSTEM;
+ if (strlen(numaddr) > hostlen)
+ return ENI_MEMORY;
+ strcpy(host, numaddr);
+ } else {
+#ifdef USE_GETIPNODEBY
+ hp = getipnodebyaddr(addr, afd->a_addrlen, afd->a_af, &h_error);
+#else
+ hp = gethostbyaddr(addr, afd->a_addrlen, afd->a_af);
+ h_error = h_errno;
+#endif
+
+ if (hp) {
+ if (flags & NI_NOFQDN) {
+ p = strchr(hp->h_name, '.');
+ if (p) *p = '\0';
+ }
+ if (strlen(hp->h_name) > hostlen) {
+#ifdef USE_GETIPNODEBY
+ freehostent(hp);
+#endif
+ return ENI_MEMORY;
+ }
+ strcpy(host, hp->h_name);
+#ifdef USE_GETIPNODEBY
+ freehostent(hp);
+#endif
+ } else {
+ if (flags & NI_NAMEREQD)
+ return ENI_NOHOSTNAME;
+ if (inet_ntop(afd->a_af, addr, numaddr, sizeof(numaddr))
+ == NULL)
+ return ENI_NOHOSTNAME;
+ if (strlen(numaddr) > hostlen)
+ return ENI_MEMORY;
+ strcpy(host, numaddr);
+ }
+ }
+ return SUCCESS;
+}
diff --git a/contrib/queryperf/queryperf.c b/contrib/queryperf/queryperf.c
index c6256900..89a92ec0 100644
--- a/contrib/queryperf/queryperf.c
+++ b/contrib/queryperf/queryperf.c
@@ -18,7 +18,7 @@
/***
*** DNS Query Performance Testing Tool (queryperf.c)
***
- *** Version $Id: queryperf.c,v 1.1.1.2.2.5.4.1 2003/10/21 06:24:14 marka Exp $
+ *** Version $Id: queryperf.c,v 1.1.1.2.2.5.4.2 2004/05/13 05:49:29 jinmei Exp $
***
*** Stephen Jacob <sj@nominum.com>
***/
@@ -39,14 +39,18 @@
#include <math.h>
#include <errno.h>
+#ifndef HAVE_GETADDRINFO
+#include "missing/addrinfo.h"
+#endif
+
/*
* Configuration defaults
*/
#define DEF_MAX_QUERIES_OUTSTANDING 20
#define DEF_QUERY_TIMEOUT 5 /* in seconds */
-#define DEF_SERVER_TO_QUERY "localhost"
-#define DEF_SERVER_PORT 53
+#define DEF_SERVER_TO_QUERY "127.0.0.1"
+#define DEF_SERVER_PORT "53"
#define DEF_BUFFER_SIZE 32 /* in k */
/*
@@ -116,11 +120,13 @@ unsigned int query_timeout = DEF_QUERY_TIMEOUT;
int ignore_config_changes = FALSE;
unsigned int socket_bufsize = DEF_BUFFER_SIZE;
+int family = AF_UNSPEC;
int use_stdin = TRUE;
char *datafile_name; /* init NULL */
char *server_to_query; /* init NULL */
-unsigned int server_port = DEF_SERVER_PORT;
+char *server_port; /* init NULL */
+struct addrinfo *server_ai; /* init NULL */
int run_only_once = FALSE;
int use_timelimit = FALSE;
@@ -154,8 +160,8 @@ struct timeval time_of_end_of_run;
struct query_status *status; /* init NULL */
unsigned int query_status_allocated; /* init 0 */
-int query_socket; /* init 0 */
-struct sockaddr_in qaddr;
+int query_socket = -1;
+int socket4 = -1, socket6 = -1;
static char *rcode_strings[] = RCODE_STRINGS;
@@ -180,7 +186,7 @@ void
show_startup_info(void) {
printf("\n"
"DNS Query Performance Testing Tool\n"
-"Version: $Id: queryperf.c,v 1.1.1.2.2.5.4.1 2003/10/21 06:24:14 marka Exp $\n"
+"Version: $Id: queryperf.c,v 1.1.1.2.2.5.4.2 2004/05/13 05:49:29 jinmei Exp $\n"
"\n");
}
@@ -193,17 +199,18 @@ show_usage(void) {
fprintf(stderr,
"\n"
"Usage: queryperf [-d datafile] [-s server_addr] [-p port] [-q num_queries]\n"
-" [-b bufsize] [-t timeout] [-n] [-l limit] [-1]\n"
+" [-b bufsize] [-t timeout] [-n] [-l limit] [-f family] [-1]\n"
" [-e] [-D] [-c] [-v] [-h]\n"
" -d specifies the input data file (default: stdin)\n"
" -s sets the server to query (default: %s)\n"
-" -p sets the port on which to query the server (default: %u)\n"
+" -p sets the port on which to query the server (default: %s)\n"
" -q specifies the maximum number of queries outstanding (default: %d)\n"
" -t specifies the timeout for query completion in seconds (default: %d)\n"
" -n causes configuration changes to be ignored\n"
" -l specifies how a limit for how long to run tests in seconds (no default)\n"
" -1 run through input only once (default: multiple iff limit given)\n"
" -b set input/output buffer size in kilobytes (default: %d k)\n"
+" -f specify address family of DNS transport, inet or inet6 (default: any)\n"
" -e enable EDNS 0\n"
" -D set the DNSSEC OK bit (implies EDNS)\n"
" -c print the number of packets with each rcode\n"
@@ -287,14 +294,7 @@ set_server(char *new_name) {
return (-1);
}
- if ((server_he = gethostbyname(new_name)) == NULL) {
- fprintf(stderr, "Error: gethostbyname(\"%s\") failed\n",
- new_name);
- return (-1);
- }
-
strcpy(server_to_query, new_name);
- qaddr.sin_addr = *((struct in_addr *)server_he->h_addr);
return (0);
}
@@ -307,16 +307,64 @@ set_server(char *new_name) {
* Return a non-negative integer otherwise
*/
int
-set_server_port(unsigned int new_port) {
- if (new_port > MAX_PORT)
+set_server_port(char *new_port) {
+ unsigned int uint_val;
+
+ if ((is_uint(new_port, &uint_val)) != TRUE)
+ return (-1);
+
+ if (uint_val && uint_val > MAX_PORT)
return (-1);
else {
- server_port = new_port;
- qaddr.sin_port = htons(server_port);
+ if (server_port != NULL && new_port != NULL &&
+ strcmp(server_port, new_port) == 0)
+ return (0);
+
+ free(server_port);
+ server_port = NULL;
+
+ if ((server_port = malloc(strlen(new_port) + 1)) == NULL) {
+ fprintf(stderr,
+ "Error allocating memory for server port: "
+ "%s\n", new_port);
+ return (-1);
+ }
+
+ strcpy(server_port, new_port);
+
return (0);
}
}
+int
+set_server_sa(void) {
+ struct addrinfo hints, *res;
+ static struct protoent *proto;
+ int error;
+
+ if (proto == NULL && (proto = getprotobyname("udp")) == NULL) {
+ fprintf(stderr, "Error: getprotobyname call failed");
+ return (-1);
+ }
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = family;
+ hints.ai_socktype = SOCK_DGRAM;
+ hints.ai_protocol = proto->p_proto;
+ if ((error = getaddrinfo(server_to_query, server_port,
+ &hints, &res)) != 0) {
+ fprintf(stderr, "Error: getaddrinfo(%s, %s) failed\n",
+ server_to_query, server_port);
+ return (-1);
+ }
+
+ /* replace the server's addrinfo */
+ if (server_ai != NULL)
+ freeaddrinfo(server_ai);
+ server_ai = res;
+ return (0);
+}
+
/*
* is_digit:
* Tests if a character is a digit
@@ -425,8 +473,23 @@ parse_args(int argc, char **argv) {
int c;
unsigned int uint_arg_val;
- while ((c = getopt(argc, argv, "q:t:nd:s:p:1l:b:eDcvh")) != -1) {
+ while ((c = getopt(argc, argv, "f:q:t:nd:s:p:1l:b:eDcvh")) != -1) {
switch (c) {
+ case 'f':
+ if (strcmp(optarg, "inet") == 0)
+ family = AF_INET;
+#ifdef AF_INET6
+ else if (strcmp(optarg, "inet6") == 0)
+ family = AF_INET6;
+#endif
+ else if (strcmp(optarg, "any") == 0)
+ family = AF_UNSPEC;
+ else {
+ fprintf(stderr, "Invalid address family: %s\n",
+ optarg);
+ return (-1);
+ }
+ break;
case 'q':
if (is_uint(optarg, &uint_arg_val) == TRUE) {
set_max_queries(uint_arg_val);
@@ -476,7 +539,7 @@ parse_args(int argc, char **argv) {
if (is_uint(optarg, &uint_arg_val) == TRUE &&
uint_arg_val < MAX_PORT)
{
- set_server_port(uint_arg_val);
+ set_server_port(optarg);
portset = TRUE;
} else {
fprintf(stderr, "Option requires a positive "
@@ -582,39 +645,54 @@ close_datafile(void) {
/*
* open_socket:
- * Open a socket for the queries
+ * Open a socket for the queries. When we have an active socket already,
+ * close it and open a new one.
*
* Return -1 on failure
- * Return a non-negative integer otherwise
+ * Return the socket identifier
*/
int
open_socket(void) {
int sock;
- struct protoent *proto;
- struct sockaddr_in bind_addr;
int ret;
int bufsize;
-
- bind_addr.sin_family = AF_INET;
- bind_addr.sin_port = htons(0); /* Have bind allocate a random port */
- bind_addr.sin_addr.s_addr = htonl(INADDR_ANY);
- bzero(&(bind_addr.sin_zero), 8);
-
- if ((proto = getprotobyname("udp")) == NULL) {
- fprintf(stderr, "Error: getprotobyname call failed");
+ struct addrinfo hints, *res;
+
+ memset(&hints, 0, sizeof(hints));
+ hints.ai_family = server_ai->ai_family;
+ hints.ai_socktype = server_ai->ai_socktype;
+ hints.ai_protocol = server_ai->ai_protocol;
+ hints.ai_flags = AI_PASSIVE;
+
+ if ((ret = getaddrinfo(NULL, "0", &hints, &res)) != 0) {
+ fprintf(stderr,
+ "Error: getaddrinfo for bind socket failed: %s\n",
+ gai_strerror(ret));
return (-1);
}
- if ((sock = socket(PF_INET, SOCK_DGRAM, proto->p_proto)) == -1) {
+ if ((sock = socket(res->ai_family, SOCK_DGRAM,
+ res->ai_protocol)) == -1) {
fprintf(stderr, "Error: socket call failed");
- return (-1);
+ goto fail;
}
- if (bind(sock, (struct sockaddr *)&bind_addr, sizeof(struct sockaddr))
- == -1) {
- fprintf(stderr, "Error: bind call failed");
- return (-1);
+#if defined(AF_INET6) && defined(IPV6_V6ONLY)
+ if (res->ai_family == AF_INET6) {
+ int on = 1;
+
+ if (setsockopt(sock, IPPROTO_IPV6, IPV6_V6ONLY,
+ &on, sizeof(on)) == -1) {
+ fprintf(stderr,
+ "Warning: setsockopt(IPV6_V6ONLY) failed\n");
+ }
}
+#endif
+
+ if (bind(sock, res->ai_addr, res->ai_addrlen) == -1)
+ fprintf(stderr, "Error: bind call failed");
+
+ freeaddrinfo(res);
bufsize = 1024 * socket_bufsize;
@@ -628,33 +706,81 @@ open_socket(void) {
if (ret < 0)
fprintf(stderr, "Warning: setsockbuf(SO_SNDBUF) failed\n");
- query_socket = sock;
-
- return (0);
+ return (sock);
+
+ fail:
+ if (res)
+ freeaddrinfo(res);
+ return (-1);
}
/*
* close_socket:
- * Close the query socket
+ * Close the query socket(s)
*
* Return -1 on failure
* Return a non-negative integer otherwise
*/
int
close_socket(void) {
- if (query_socket != 0) {
- if (close(query_socket) != 0) {
- fprintf(stderr, "Error: unable to close socket\n");
+ if (socket4 != -1) {
+ if (close(socket4) != 0) {
+ fprintf(stderr,
+ "Error: unable to close IPv4 socket\n");
return (-1);
}
}
- query_socket = 0;
+ if (socket6 != -1) {
+ if (close(socket6) != 0) {
+ fprintf(stderr,
+ "Error: unable to close IPv6 socket\n");
+ return (-1);
+ }
+ }
+
+ query_socket = -1;
return (0);
}
/*
+ * change_socket:
+ * Choose an appropriate socket according to the address family of the
+ * current server. Open a new socket if necessary.
+ *
+ * Return -1 on failure
+ * Return the socket identifier
+ */
+int
+change_socket(void) {
+ int s, *sockp;
+
+ switch (server_ai->ai_family) {
+ case AF_INET:
+ sockp = &socket4;
+ break;
+#ifdef AF_INET6
+ case AF_INET6:
+ sockp = &socket6;
+ break;
+#endif
+ default:
+ fprintf(stderr, "unexpected address family: %d\n",
+ server_ai->ai_family);
+ exit(1);
+ }
+
+ if (*sockp == -1) {
+ if ((s = open_socket()) == -1)
+ return (-1);
+ *sockp = s;
+ }
+
+ return (*sockp);
+}
+
+/*
* setup:
* Set configuration options from command line arguments
* Open datafile ready for reading
@@ -664,11 +790,6 @@ close_socket(void) {
*/
int
setup(int argc, char **argv) {
- qaddr.sin_family = AF_INET;
- qaddr.sin_port = htons(0);
- qaddr.sin_addr.s_addr = htonl(INADDR_ANY);
- bzero(&(qaddr.sin_zero), 8);
-
set_input_stdin();
if (set_max_queries(DEF_MAX_QUERIES_OUTSTANDING) == -1) {
@@ -697,7 +818,10 @@ setup(int argc, char **argv) {
if (open_datafile() == -1)
return (-1);
- if (open_socket() == -1)
+ if (set_server_sa() == -1)
+ return (-1);
+
+ if ((query_socket = change_socket()) == -1)
return (-1);
return (0);
@@ -733,7 +857,7 @@ difftv(struct timeval tv1, struct timeval tv2) {
diff = (double)diff_sec + ((double)diff_usec / 1000000.0);
- return diff;
+ return (diff);
}
/*
@@ -875,6 +999,7 @@ update_config(char *config_change_desc) {
unsigned int uint_val;
int directive_number;
int check;
+ int old_af;
if (ignore_config_changes == TRUE) {
fprintf(stderr, "Ignoring configuration change: %s",
@@ -928,9 +1053,29 @@ update_config(char *config_change_desc) {
return;
}
- if (set_server(config_value) == -1)
+ if (set_server(config_value) == -1) {
fprintf(stderr, "Set server error: unable to change "
"the server name to '%s'\n", config_value);
+ return;
+ }
+
+ old_af = server_ai->ai_family;
+ if (set_server_sa() == -1) {
+ fprintf(stderr, "Set server error: unable to resolve "
+ "a new server '%s'\n",
+ config_value);
+ return;
+ }
+ if (old_af != server_ai->ai_family) {
+ if ((query_socket = change_socket()) == -1) {
+ /* XXX: this is fatal */
+ fprintf(stderr, "Set server error: "
+ "unable to open a new socket "
+ "for '%s'\n", config_value);
+ exit(1);
+ }
+ }
+
break;
case V_PORT:
@@ -943,9 +1088,15 @@ update_config(char *config_change_desc) {
check = is_uint(config_value, &uint_val);
if ((check == TRUE) && (uint_val > 0)) {
- if (set_server_port(uint_val) == -1) {
+ if (set_server_port(config_value) == -1) {
fprintf(stderr, "Invalid config: Bad value for"
" %s: %s\n", directive, config_value);
+ } else {
+ if (set_server_sa() == -1) {
+ fprintf(stderr,
+ "Failed to set a new port\n");
+ return;
+ }
}
} else
fprintf(stderr, "Invalid config: Bad value for "
@@ -1098,7 +1249,7 @@ dispatch_query(unsigned short int id, char *dom, int qt) {
packet_buffer[1] = id_ptr[1];
bytes_sent = sendto(query_socket, packet_buffer, buffer_len, 0,
- (struct sockaddr *)&qaddr, sockaddrlen);
+ server_ai->ai_addr, server_ai->ai_addrlen);
if (bytes_sent == -1) {
fprintf(stderr, "Failed to send query packet: %s %d\n",
dom, qt);
@@ -1121,6 +1272,7 @@ send_query(char *query_desc) {
static unsigned short int use_query_id = 0;
static int qname_len = MAX_DOMAIN_LEN;
static char domain[MAX_DOMAIN_LEN + 1];
+ char serveraddr[NI_MAXHOST];
int query_type;
unsigned int count;
@@ -1132,14 +1284,30 @@ send_query(char *query_desc) {
}
if (dispatch_query(use_query_id, domain, query_type) == -1) {
- fprintf(stderr, "Error sending query: %s\n", query_desc);
+ char *addrstr;
+
+ if (getnameinfo(server_ai->ai_addr, server_ai->ai_addrlen,
+ serveraddr, sizeof(serveraddr), NULL, 0,
+ NI_NUMERICHOST) == 0) {
+ addrstr = serveraddr;
+ } else
+ addrstr = "???"; /* XXX: this should not happen */
+ fprintf(stderr, "Error sending query to %s: %s\n",
+ addrstr, query_desc);
return;
}
if (setup_phase == TRUE) {
set_timenow(&time_of_first_query);
setup_phase = FALSE;
- printf("[Status] Sending queries\n");
+ if (getnameinfo(server_ai->ai_addr, server_ai->ai_addrlen,
+ serveraddr, sizeof(serveraddr), NULL, 0,
+ NI_NUMERICHOST) != 0) {
+ fprintf(stderr, "Error printing server address\n");
+ return;
+ }
+ printf("[Status] Sending queries (beginning with %s)\n",
+ serveraddr);
}
/* Find the first slot in status[] that is not in use */
@@ -1164,39 +1332,6 @@ send_query(char *query_desc) {
}
/*
- * data_available:
- * Is there data available on the given file descriptor?
- *
- * Return TRUE if there is
- * Return FALSE otherwise
- */
-int
-data_available(int fd, double wait) {
- fd_set read_fds;
- struct timeval tv;
- int retval;
-
- /* Set list of file descriptors */
- FD_ZERO(&read_fds);
- FD_SET(fd, &read_fds);
-
- if ((wait > 0.0) && (wait < (double)LONG_MAX)) {
- tv.tv_sec = (long)floor(wait);
- tv.tv_usec = (long)(1000000.0 * (wait - floor(wait)));
- } else {
- tv.tv_sec = 0;
- tv.tv_usec = 0;
- }
-
- retval = select(fd + 1, &read_fds, NULL, NULL, &tv);
-
- if (FD_ISSET(fd, &read_fds))
- return (TRUE);
- else
- return (FALSE);
-}
-
-/*
* register_response:
* Register receipt of a query
*
@@ -1236,15 +1371,18 @@ register_response(unsigned short int id, unsigned int rcode) {
*/
void
process_single_response(int sockfd) {
- static struct sockaddr_in from_addr;
+ struct sockaddr_storage from_addr_ss;
+ struct sockaddr *from_addr;
static unsigned char in_buf[MAX_BUFFER_LEN];
int numbytes, addr_len, resp_id;
int flags;
- addr_len = sizeof(struct sockaddr);
+ memset(&from_addr_ss, 0, sizeof(from_addr_ss));
+ from_addr = (struct sockaddr *)&from_addr_ss;
+ addr_len = sizeof(from_addr_ss);
if ((numbytes = recvfrom(sockfd, in_buf, MAX_BUFFER_LEN,
- 0, (struct sockaddr *)&from_addr, &addr_len)) == -1) {
+ 0, from_addr, &addr_len)) == -1) {
fprintf(stderr, "Error receiving datagram\n");
return;
}
@@ -1256,6 +1394,55 @@ process_single_response(int sockfd) {
}
/*
+ * data_available:
+ * Is there data available on the given file descriptor?
+ *
+ * Return TRUE if there is
+ * Return FALSE otherwise
+ */
+int
+data_available(double wait) {
+ fd_set read_fds;
+ struct timeval tv;
+ int retval;
+ int available = FALSE;
+ int maxfd = -1;
+
+ /* Set list of file descriptors */
+ FD_ZERO(&read_fds);
+ if (socket4 != -1) {
+ FD_SET(socket4, &read_fds);
+ maxfd = socket4;
+ }
+ if (socket6 != -1) {
+ FD_SET(socket6, &read_fds);
+ if (maxfd == -1 || maxfd < socket6)
+ maxfd = socket6;
+ }
+
+ if ((wait > 0.0) && (wait < (double)LONG_MAX)) {
+ tv.tv_sec = (long)floor(wait);
+ tv.tv_usec = (long)(1000000.0 * (wait - floor(wait)));
+ } else {
+ tv.tv_sec = 0;
+ tv.tv_usec = 0;
+ }
+
+ retval = select(maxfd + 1, &read_fds, NULL, NULL, &tv);
+
+ if (socket4 != -1 && FD_ISSET(socket4, &read_fds)) {
+ available = TRUE;
+ process_single_response(socket4);
+ }
+ if (socket6 != -1 && FD_ISSET(socket6, &read_fds)) {
+ available = TRUE;
+ process_single_response(socket6);
+ }
+
+ return (available);
+}
+
+/*
* process_responses:
* Go through any/all received responses and remove them from the list of
* open queries (set in_use = FALSE for their entry in status[]), also
@@ -1274,11 +1461,9 @@ process_responses(void) {
first_packet_wait = 0.0;
}
- if (data_available(query_socket, first_packet_wait) == TRUE) {
- process_single_response(query_socket);
-
- while (data_available(query_socket, 0.0) == TRUE)
- process_single_response(query_socket);
+ if (data_available(first_packet_wait) == TRUE) {
+ while (data_available(0.0) == TRUE)
+ ;
}
}
@@ -1393,9 +1578,10 @@ print_statistics(void) {
printf("\n");
- printf(" Started at: %s", ctime(&start_time.tv_sec));
+ printf(" Started at: %s",
+ ctime((const time_t *)&start_time.tv_sec));
printf(" Finished at: %s",
- ctime(&time_of_end_of_run.tv_sec));
+ ctime((const time_t *)&time_of_end_of_run.tv_sec));
printf(" Ran for: %.6lf seconds\n", run_time);
printf("\n");
diff --git a/doc/arm/Bv9ARM-book.xml b/doc/arm/Bv9ARM-book.xml
index 593b6f98..d03c0d3f 100644
--- a/doc/arm/Bv9ARM-book.xml
+++ b/doc/arm/Bv9ARM-book.xml
@@ -2,7 +2,7 @@
<!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.0//EN"
"http://www.oasis-open.org/docbook/xml/4.0/docbookx.dtd">
-<!-- File: $Id: Bv9ARM-book.xml,v 1.155.2.27.2.40 2004/04/15 23:56:27 marka Exp $ -->
+<!-- File: $Id: Bv9ARM-book.xml,v 1.155.2.27.2.41 2004/05/12 02:06:20 marka Exp $ -->
<book>
<title>BIND 9 Administrator Reference Manual</title>
@@ -3563,7 +3563,7 @@ the server will not listen on any IPv6 address.</para></sect3>
query other name servers. <command>query-source</command> specifies
the address and port used for such queries. For queries sent over
IPv6, there is a separate <command>query-source-v6</command> option.
- If <command>address</command> is <command>*</command> or is omitted,
+If <command>address</command> is <command>*</command> or is omitted,
a wildcard IP address (<command>INADDR_ANY</command>) will be used.
If <command>port</command> is <command>*</command> or is omitted,
a random unprivileged port will be used, <command>avoid-v4-udp-ports</command>
@@ -3577,6 +3577,9 @@ query-source-v6 address * port *;
is used for both UDP and TCP queries, but the port applies only to
UDP queries. TCP queries always use a random
unprivileged port.</para></note>
+<note>
+<para>See also <command>transfer-source</command> and
+<command>notify-source</command>.</para></note>
</sect3>
<sect3 id="zone_transfers"><title>Zone Transfers</title>
diff --git a/doc/arm/Bv9ARM.ch06.html b/doc/arm/Bv9ARM.ch06.html
index d8ab5775..bec18c57 100644
--- a/doc/arm/Bv9ARM.ch06.html
+++ b/doc/arm/Bv9ARM.ch06.html
@@ -94,7 +94,7 @@ HREF="Bv9ARM.ch06.html#Configuration_File_Grammar"
></DT
><DT
>6.3. <A
-HREF="Bv9ARM.ch06.html#AEN4019"
+HREF="Bv9ARM.ch06.html#AEN4023"
>Zone File</A
></DT
></DL
@@ -6502,7 +6502,7 @@ IPv6, there is a separate <B
CLASS="command"
>query-source-v6</B
> option.
- If <B
+If <B
CLASS="command"
>address</B
> is <B
@@ -6550,6 +6550,23 @@ UDP queries. TCP queries always use a random
unprivileged port.</P
></BLOCKQUOTE
></DIV
+><DIV
+CLASS="note"
+><BLOCKQUOTE
+CLASS="note"
+><P
+><B
+>Note: </B
+>See also <B
+CLASS="command"
+>transfer-source</B
+> and
+<B
+CLASS="command"
+>notify-source</B
+>.</P
+></BLOCKQUOTE
+></DIV
></DIV
><DIV
CLASS="sect3"
@@ -6979,7 +6996,7 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN2951"
+NAME="AEN2955"
>6.2.16.8. Bad UDP Port Lists</A
></H3
><P
@@ -7003,7 +7020,7 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN2956"
+NAME="AEN2960"
>6.2.16.9. Operating System Resource Limits</A
></H3
><P
@@ -7123,7 +7140,7 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN2993"
+NAME="AEN2997"
>6.2.16.10. Server Resource Limits</A
></H3
><P
@@ -7246,7 +7263,7 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN3034"
+NAME="AEN3038"
>6.2.16.11. Periodic Task Intervals</A
></H3
><P
@@ -7617,7 +7634,7 @@ CLASS="command"
><DIV
CLASS="informaltable"
><A
-NAME="AEN3122"
+NAME="AEN3126"
></A
><P
></P
@@ -8099,7 +8116,7 @@ number is identical to the number in the beginning line.</P
><DIV
CLASS="informaltable"
><A
-NAME="AEN3266"
+NAME="AEN3270"
></A
><P
></P
@@ -8633,7 +8650,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN3405"
+NAME="AEN3409"
>6.2.19. <B
CLASS="command"
>trusted-keys</B
@@ -8708,7 +8725,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN3421"
+NAME="AEN3425"
>6.2.20. <B
CLASS="command"
>trusted-keys</B
@@ -8810,7 +8827,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN3443"
+NAME="AEN3447"
>6.2.22. <B
CLASS="command"
>view</B
@@ -9564,7 +9581,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN3617"
+NAME="AEN3621"
>6.2.24. <B
CLASS="command"
>zone</B
@@ -9575,13 +9592,13 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN3620"
+NAME="AEN3624"
>6.2.24.1. Zone Types</A
></H3
><DIV
CLASS="informaltable"
><A
-NAME="AEN3622"
+NAME="AEN3626"
></A
><P
></P
@@ -9851,7 +9868,7 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN3685"
+NAME="AEN3689"
>6.2.24.2. Class</A
></H3
><P
@@ -9889,7 +9906,7 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN3695"
+NAME="AEN3699"
>6.2.24.3. Zone Options</A
></H3
><P
@@ -10647,7 +10664,7 @@ CLASS="varname"
><DIV
CLASS="informaltable"
><A
-NAME="AEN3978"
+NAME="AEN3982"
></A
><P
></P
@@ -10814,7 +10831,7 @@ CLASS="sect1"
><H1
CLASS="sect1"
><A
-NAME="AEN4019"
+NAME="AEN4023"
>6.3. Zone File</A
></H1
><DIV
@@ -10835,7 +10852,7 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN4024"
+NAME="AEN4028"
>6.3.1.1. Resource Records</A
></H3
><P
@@ -10858,7 +10875,7 @@ HREF="Bv9ARM.ch06.html#rrset_ordering"
><DIV
CLASS="informaltable"
><A
-NAME="AEN4030"
+NAME="AEN4034"
></A
><P
></P
@@ -10969,7 +10986,7 @@ CLASS="emphasis"
><DIV
CLASS="informaltable"
><A
-NAME="AEN4062"
+NAME="AEN4066"
></A
><P
></P
@@ -11494,7 +11511,7 @@ are currently valid in the DNS:</P
><DIV
CLASS="informaltable"
><A
-NAME="AEN4214"
+NAME="AEN4218"
></A
><P
></P
@@ -11596,7 +11613,7 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN4238"
+NAME="AEN4242"
>6.3.1.2. Textual expression of RRs</A
></H3
><P
@@ -11626,7 +11643,7 @@ knowledge of the typical representation for the data.</P
><DIV
CLASS="informaltable"
><A
-NAME="AEN4245"
+NAME="AEN4249"
></A
><P
></P
@@ -11835,7 +11852,7 @@ domain names.</P
><DIV
CLASS="informaltable"
><A
-NAME="AEN4311"
+NAME="AEN4315"
></A
><P
></P
@@ -11926,7 +11943,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN4339"
+NAME="AEN4343"
>6.3.2. Discussion of MX Records</A
></H2
><P
@@ -11962,7 +11979,7 @@ pointed to by the CNAME.</P
><DIV
CLASS="informaltable"
><A
-NAME="AEN4345"
+NAME="AEN4349"
></A
><P
></P
@@ -12258,7 +12275,7 @@ used in a zone file.</P
><DIV
CLASS="informaltable"
><A
-NAME="AEN4437"
+NAME="AEN4441"
></A
><P
></P
@@ -12341,7 +12358,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN4460"
+NAME="AEN4464"
>6.3.4. Inverse Mapping in IPv4</A
></H2
><P
@@ -12368,7 +12385,7 @@ CLASS="optional"
><DIV
CLASS="informaltable"
><A
-NAME="AEN4465"
+NAME="AEN4469"
></A
><P
></P
@@ -12448,7 +12465,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN4487"
+NAME="AEN4491"
>6.3.5. Other Zone File Directives</A
></H2
><P
@@ -12473,7 +12490,7 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN4494"
+NAME="AEN4498"
>6.3.5.1. The <B
CLASS="command"
>$ORIGIN</B
@@ -12543,7 +12560,7 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN4514"
+NAME="AEN4518"
>6.3.5.2. The <B
CLASS="command"
>$INCLUDE</B
@@ -12625,7 +12642,7 @@ CLASS="sect3"
><H3
CLASS="sect3"
><A
-NAME="AEN4534"
+NAME="AEN4538"
>6.3.5.3. The <B
CLASS="command"
>$TTL</B
@@ -12665,7 +12682,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN4545"
+NAME="AEN4549"
>6.3.6. <SPAN
CLASS="acronym"
>BIND</SPAN
@@ -12760,7 +12777,7 @@ CLASS="literal"
><DIV
CLASS="informaltable"
><A
-NAME="AEN4569"
+NAME="AEN4573"
></A
><P
></P
diff --git a/doc/arm/Bv9ARM.ch07.html b/doc/arm/Bv9ARM.ch07.html
index 68312509..a18ec975 100644
--- a/doc/arm/Bv9ARM.ch07.html
+++ b/doc/arm/Bv9ARM.ch07.html
@@ -89,7 +89,7 @@ HREF="Bv9ARM.ch07.html#Access_Control_Lists"
></DT
><DT
>7.2. <A
-HREF="Bv9ARM.ch07.html#AEN4662"
+HREF="Bv9ARM.ch07.html#AEN4666"
><B
CLASS="command"
>chroot</B
@@ -197,7 +197,7 @@ CLASS="sect1"
><H1
CLASS="sect1"
><A
-NAME="AEN4662"
+NAME="AEN4666"
>7.2. <B
CLASS="command"
>chroot</B
@@ -279,7 +279,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN4685"
+NAME="AEN4689"
>7.2.1. The <B
CLASS="command"
>chroot</B
@@ -355,7 +355,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN4703"
+NAME="AEN4707"
>7.2.2. Using the <B
CLASS="command"
>setuid</B
diff --git a/doc/arm/Bv9ARM.ch08.html b/doc/arm/Bv9ARM.ch08.html
index 72e1b2a8..8c51aa87 100644
--- a/doc/arm/Bv9ARM.ch08.html
+++ b/doc/arm/Bv9ARM.ch08.html
@@ -81,17 +81,17 @@ CLASS="TOC"
></DT
><DT
>8.1. <A
-HREF="Bv9ARM.ch08.html#AEN4724"
+HREF="Bv9ARM.ch08.html#AEN4728"
>Common Problems</A
></DT
><DT
>8.2. <A
-HREF="Bv9ARM.ch08.html#AEN4729"
+HREF="Bv9ARM.ch08.html#AEN4733"
>Incrementing and Changing the Serial Number</A
></DT
><DT
>8.3. <A
-HREF="Bv9ARM.ch08.html#AEN4734"
+HREF="Bv9ARM.ch08.html#AEN4738"
>Where Can I Get Help?</A
></DT
></DL
@@ -101,7 +101,7 @@ CLASS="sect1"
><H1
CLASS="sect1"
><A
-NAME="AEN4724"
+NAME="AEN4728"
>8.1. Common Problems</A
></H1
><DIV
@@ -109,7 +109,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN4726"
+NAME="AEN4730"
>8.1.1. It's not working; how can I figure out what's wrong?</A
></H2
><P
@@ -125,7 +125,7 @@ CLASS="sect1"
><H1
CLASS="sect1"
><A
-NAME="AEN4729"
+NAME="AEN4733"
>8.2. Incrementing and Changing the Serial Number</A
></H1
><P
@@ -154,7 +154,7 @@ CLASS="sect1"
><H1
CLASS="sect1"
><A
-NAME="AEN4734"
+NAME="AEN4738"
>8.3. Where Can I Get Help?</A
></H1
><P
diff --git a/doc/arm/Bv9ARM.ch09.html b/doc/arm/Bv9ARM.ch09.html
index 0de54ed6..17082a42 100644
--- a/doc/arm/Bv9ARM.ch09.html
+++ b/doc/arm/Bv9ARM.ch09.html
@@ -74,7 +74,7 @@ CLASS="TOC"
></DT
><DT
>A.1. <A
-HREF="Bv9ARM.ch09.html#AEN4750"
+HREF="Bv9ARM.ch09.html#AEN4754"
>Acknowledgments</A
></DT
><DT
@@ -97,7 +97,7 @@ CLASS="sect1"
><H1
CLASS="sect1"
><A
-NAME="AEN4750"
+NAME="AEN4754"
>A.1. Acknowledgments</A
></H1
><DIV
@@ -105,7 +105,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN4752"
+NAME="AEN4756"
>A.1.1. A Brief History of the <SPAN
CLASS="acronym"
>DNS</SPAN
@@ -269,7 +269,7 @@ Unicast address scheme. For more information, see RFC 2374.</P
><DIV
CLASS="informaltable"
><A
-NAME="AEN4788"
+NAME="AEN4792"
></A
><P
></P
@@ -488,7 +488,7 @@ VALIGN="MIDDLE"
<DIV
CLASS="informaltable"
><A
-NAME="AEN4857"
+NAME="AEN4861"
></A
><P
></P
@@ -746,19 +746,19 @@ TARGET="_top"
</P
><H3
><A
-NAME="AEN4925"
+NAME="AEN4929"
>Bibliography</A
></H3
><H2
CLASS="bibliodiv"
><A
-NAME="AEN4926"
+NAME="AEN4930"
>Standards</A
></H2
><DIV
CLASS="biblioentry"
><A
-NAME="AEN4928"
+NAME="AEN4932"
></A
><P
>[RFC974]&nbsp;<SPAN
@@ -775,7 +775,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN4935"
+NAME="AEN4939"
></A
><P
>[RFC1034]&nbsp;<SPAN
@@ -792,7 +792,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN4942"
+NAME="AEN4946"
></A
><P
>[RFC1035]&nbsp;<SPAN
@@ -816,7 +816,7 @@ NAME="proposed_standards"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN4951"
+NAME="AEN4955"
></A
><P
>[RFC2181]&nbsp;<SPAN
@@ -836,7 +836,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN4959"
+NAME="AEN4963"
></A
><P
>[RFC2308]&nbsp;<SPAN
@@ -856,7 +856,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN4967"
+NAME="AEN4971"
></A
><P
>[RFC1995]&nbsp;<SPAN
@@ -876,7 +876,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN4975"
+NAME="AEN4979"
></A
><P
>[RFC1996]&nbsp;<SPAN
@@ -893,7 +893,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN4982"
+NAME="AEN4986"
></A
><P
>[RFC2136]&nbsp;<SPAN
@@ -919,7 +919,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN4999"
+NAME="AEN5003"
></A
><P
>[RFC2845]&nbsp;<SPAN
@@ -948,13 +948,13 @@ STYLE="margin-left=0.5in"
><H2
CLASS="bibliodiv"
><A
-NAME="AEN5018"
+NAME="AEN5022"
>Proposed Standards Still Under Development</A
></H2
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5023"
+NAME="AEN5027"
></A
><P
>[RFC1886]&nbsp;<SPAN
@@ -977,7 +977,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5035"
+NAME="AEN5039"
></A
><P
>[RFC2065]&nbsp;<SPAN
@@ -997,7 +997,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5047"
+NAME="AEN5051"
></A
><P
>[RFC2137]&nbsp;<SPAN
@@ -1014,7 +1014,7 @@ STYLE="margin-left=0.5in"
><H2
CLASS="bibliodiv"
><A
-NAME="AEN5055"
+NAME="AEN5059"
>Other Important RFCs About <SPAN
CLASS="acronym"
>DNS</SPAN
@@ -1023,7 +1023,7 @@ CLASS="acronym"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5058"
+NAME="AEN5062"
></A
><P
>[RFC1535]&nbsp;<SPAN
@@ -1043,7 +1043,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5066"
+NAME="AEN5070"
></A
><P
>[RFC1536]&nbsp;<SPAN
@@ -1075,7 +1075,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5087"
+NAME="AEN5091"
></A
><P
>[RFC1982]&nbsp;<SPAN
@@ -1095,13 +1095,13 @@ STYLE="margin-left=0.5in"
><H2
CLASS="bibliodiv"
><A
-NAME="AEN5098"
+NAME="AEN5102"
>Resource Record Types</A
></H2
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5100"
+NAME="AEN5104"
></A
><P
>[RFC1183]&nbsp;<SPAN
@@ -1130,7 +1130,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5118"
+NAME="AEN5122"
></A
><P
>[RFC1706]&nbsp;<SPAN
@@ -1153,7 +1153,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5130"
+NAME="AEN5134"
></A
><P
>[RFC2168]&nbsp;<SPAN
@@ -1174,7 +1174,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5141"
+NAME="AEN5145"
></A
><P
>[RFC1876]&nbsp;<SPAN
@@ -1201,7 +1201,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5158"
+NAME="AEN5162"
></A
><P
>[RFC2052]&nbsp;<SPAN
@@ -1225,7 +1225,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5170"
+NAME="AEN5174"
></A
><P
>[RFC2163]&nbsp;<SPAN
@@ -1246,7 +1246,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5178"
+NAME="AEN5182"
></A
><P
>[RFC2230]&nbsp;<SPAN
@@ -1266,7 +1266,7 @@ STYLE="margin-left=0.5in"
><H2
CLASS="bibliodiv"
><A
-NAME="AEN5186"
+NAME="AEN5190"
><SPAN
CLASS="acronym"
>DNS</SPAN
@@ -1275,7 +1275,7 @@ CLASS="acronym"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5189"
+NAME="AEN5193"
></A
><P
>[RFC1101]&nbsp;<SPAN
@@ -1295,7 +1295,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5197"
+NAME="AEN5201"
></A
><P
>[RFC1123]&nbsp;<SPAN
@@ -1312,7 +1312,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5204"
+NAME="AEN5208"
></A
><P
>[RFC1591]&nbsp;<SPAN
@@ -1329,7 +1329,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5211"
+NAME="AEN5215"
></A
><P
>[RFC2317]&nbsp;<SPAN
@@ -1352,7 +1352,7 @@ STYLE="margin-left=0.5in"
><H2
CLASS="bibliodiv"
><A
-NAME="AEN5225"
+NAME="AEN5229"
><SPAN
CLASS="acronym"
>DNS</SPAN
@@ -1361,7 +1361,7 @@ CLASS="acronym"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5228"
+NAME="AEN5232"
></A
><P
>[RFC1537]&nbsp;<SPAN
@@ -1381,7 +1381,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5236"
+NAME="AEN5240"
></A
><P
>[RFC1912]&nbsp;<SPAN
@@ -1401,7 +1401,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5244"
+NAME="AEN5248"
></A
><P
>[RFC2010]&nbsp;<SPAN
@@ -1421,7 +1421,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5255"
+NAME="AEN5259"
></A
><P
>[RFC2219]&nbsp;<SPAN
@@ -1444,7 +1444,7 @@ STYLE="margin-left=0.5in"
><H2
CLASS="bibliodiv"
><A
-NAME="AEN5267"
+NAME="AEN5271"
>Other <SPAN
CLASS="acronym"
>DNS</SPAN
@@ -1453,7 +1453,7 @@ CLASS="acronym"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5273"
+NAME="AEN5277"
></A
><P
>[RFC1464]&nbsp;<SPAN
@@ -1470,7 +1470,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5280"
+NAME="AEN5284"
></A
><P
>[RFC1713]&nbsp;<SPAN
@@ -1490,7 +1490,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5288"
+NAME="AEN5292"
></A
><P
>[RFC1794]&nbsp;<SPAN
@@ -1510,7 +1510,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5296"
+NAME="AEN5300"
></A
><P
>[RFC2240]&nbsp;<SPAN
@@ -1527,7 +1527,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5303"
+NAME="AEN5307"
></A
><P
>[RFC2345]&nbsp;<SPAN
@@ -1550,7 +1550,7 @@ STYLE="margin-left=0.5in"
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5317"
+NAME="AEN5321"
></A
><P
>[RFC2352]&nbsp;<SPAN
@@ -1567,13 +1567,13 @@ STYLE="margin-left=0.5in"
><H2
CLASS="bibliodiv"
><A
-NAME="AEN5324"
+NAME="AEN5328"
>Obsolete and Unimplemented Experimental RRs</A
></H2
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5326"
+NAME="AEN5330"
></A
><P
>[RFC1712]&nbsp;<SPAN
@@ -1624,7 +1624,7 @@ CLASS="sect2"
><H2
CLASS="sect2"
><A
-NAME="AEN5347"
+NAME="AEN5351"
>A.3.3. Other Documents About <SPAN
CLASS="acronym"
>BIND</SPAN
@@ -1634,13 +1634,13 @@ CLASS="acronym"
></P
><H3
><A
-NAME="AEN5351"
+NAME="AEN5355"
>Bibliography</A
></H3
><DIV
CLASS="biblioentry"
><A
-NAME="AEN5352"
+NAME="AEN5356"
></A
><P
><SPAN
diff --git a/doc/arm/Bv9ARM.html b/doc/arm/Bv9ARM.html
index 65c1012d..60ec2388 100644
--- a/doc/arm/Bv9ARM.html
+++ b/doc/arm/Bv9ARM.html
@@ -546,7 +546,7 @@ CLASS="command"
></DT
><DT
>6.2.19. <A
-HREF="Bv9ARM.ch06.html#AEN3405"
+HREF="Bv9ARM.ch06.html#AEN3409"
><B
CLASS="command"
>trusted-keys</B
@@ -554,7 +554,7 @@ CLASS="command"
></DT
><DT
>6.2.20. <A
-HREF="Bv9ARM.ch06.html#AEN3421"
+HREF="Bv9ARM.ch06.html#AEN3425"
><B
CLASS="command"
>trusted-keys</B
@@ -571,7 +571,7 @@ CLASS="command"
></DT
><DT
>6.2.22. <A
-HREF="Bv9ARM.ch06.html#AEN3443"
+HREF="Bv9ARM.ch06.html#AEN3447"
><B
CLASS="command"
>view</B
@@ -588,7 +588,7 @@ Statement Grammar</A
></DT
><DT
>6.2.24. <A
-HREF="Bv9ARM.ch06.html#AEN3617"
+HREF="Bv9ARM.ch06.html#AEN3621"
><B
CLASS="command"
>zone</B
@@ -598,7 +598,7 @@ CLASS="command"
></DD
><DT
>6.3. <A
-HREF="Bv9ARM.ch06.html#AEN4019"
+HREF="Bv9ARM.ch06.html#AEN4023"
>Zone File</A
></DT
><DD
@@ -610,7 +610,7 @@ HREF="Bv9ARM.ch06.html#types_of_resource_records_and_when_to_use_them"
></DT
><DT
>6.3.2. <A
-HREF="Bv9ARM.ch06.html#AEN4339"
+HREF="Bv9ARM.ch06.html#AEN4343"
>Discussion of MX Records</A
></DT
><DT
@@ -620,17 +620,17 @@ HREF="Bv9ARM.ch06.html#Setting_TTLs"
></DT
><DT
>6.3.4. <A
-HREF="Bv9ARM.ch06.html#AEN4460"
+HREF="Bv9ARM.ch06.html#AEN4464"
>Inverse Mapping in IPv4</A
></DT
><DT
>6.3.5. <A
-HREF="Bv9ARM.ch06.html#AEN4487"
+HREF="Bv9ARM.ch06.html#AEN4491"
>Other Zone File Directives</A
></DT
><DT
>6.3.6. <A
-HREF="Bv9ARM.ch06.html#AEN4545"
+HREF="Bv9ARM.ch06.html#AEN4549"
><SPAN
CLASS="acronym"
>BIND</SPAN
@@ -660,7 +660,7 @@ HREF="Bv9ARM.ch07.html#Access_Control_Lists"
></DT
><DT
>7.2. <A
-HREF="Bv9ARM.ch07.html#AEN4662"
+HREF="Bv9ARM.ch07.html#AEN4666"
><B
CLASS="command"
>chroot</B
@@ -674,7 +674,7 @@ UNIX servers)</A
><DL
><DT
>7.2.1. <A
-HREF="Bv9ARM.ch07.html#AEN4685"
+HREF="Bv9ARM.ch07.html#AEN4689"
>The <B
CLASS="command"
>chroot</B
@@ -682,7 +682,7 @@ CLASS="command"
></DT
><DT
>7.2.2. <A
-HREF="Bv9ARM.ch07.html#AEN4703"
+HREF="Bv9ARM.ch07.html#AEN4707"
>Using the <B
CLASS="command"
>setuid</B
@@ -706,26 +706,26 @@ HREF="Bv9ARM.ch08.html"
><DL
><DT
>8.1. <A
-HREF="Bv9ARM.ch08.html#AEN4724"
+HREF="Bv9ARM.ch08.html#AEN4728"
>Common Problems</A
></DT
><DD
><DL
><DT
>8.1.1. <A
-HREF="Bv9ARM.ch08.html#AEN4726"
+HREF="Bv9ARM.ch08.html#AEN4730"
>It's not working; how can I figure out what's wrong?</A
></DT
></DL
></DD
><DT
>8.2. <A
-HREF="Bv9ARM.ch08.html#AEN4729"
+HREF="Bv9ARM.ch08.html#AEN4733"
>Incrementing and Changing the Serial Number</A
></DT
><DT
>8.3. <A
-HREF="Bv9ARM.ch08.html#AEN4734"
+HREF="Bv9ARM.ch08.html#AEN4738"
>Where Can I Get Help?</A
></DT
></DL
@@ -739,14 +739,14 @@ HREF="Bv9ARM.ch09.html"
><DL
><DT
>A.1. <A
-HREF="Bv9ARM.ch09.html#AEN4750"
+HREF="Bv9ARM.ch09.html#AEN4754"
>Acknowledgments</A
></DT
><DD
><DL
><DT
>A.1.1. <A
-HREF="Bv9ARM.ch09.html#AEN4752"
+HREF="Bv9ARM.ch09.html#AEN4756"
>A Brief History of the <SPAN
CLASS="acronym"
>DNS</SPAN
@@ -793,7 +793,7 @@ HREF="Bv9ARM.ch09.html#internet_drafts"
></DT
><DT
>A.3.3. <A
-HREF="Bv9ARM.ch09.html#AEN5347"
+HREF="Bv9ARM.ch09.html#AEN5351"
>Other Documents About <SPAN
CLASS="acronym"
>BIND</SPAN
diff --git a/lib/bind/api b/lib/bind/api
index c4b90597..612fc85e 100644
--- a/lib/bind/api
+++ b/lib/bind/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 3
-LIBREVISION = 2
+LIBREVISION = 3
LIBAGE = 0
diff --git a/lib/bind/irs/dns_ho.c b/lib/bind/irs/dns_ho.c
index 9211ca5e..f765b82c 100644
--- a/lib/bind/irs/dns_ho.c
+++ b/lib/bind/irs/dns_ho.c
@@ -52,7 +52,7 @@
/* BIND Id: gethnamaddr.c,v 8.15 1996/05/22 04:56:30 vixie Exp $ */
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.7.4.3 2004/03/17 01:13:34 marka Exp $";
+static const char rcsid[] = "$Id: dns_ho.c,v 1.5.2.7.4.4 2004/05/17 07:48:56 marka Exp $";
#endif /* LIBC_SCCS and not lint */
/* Imports. */
@@ -414,38 +414,44 @@ ho_byaddr(struct irs_ho *this, const void *addr, int len, int af)
break;
case AF_INET6:
if (q->action != RESTGT_IGNORE) {
+ const char *nibsuff = res_get_nibblesuffix(pvt->res);
qp = q->qname;
for (n = IN6ADDRSZ - 1; n >= 0; n--) {
i = SPRINTF((qp, "%x.%x.",
uaddr[n] & 0xf,
(uaddr[n] >> 4) & 0xf));
- if (i < 0)
+ if (i != 4)
abort();
qp += i;
}
-#ifdef HAVE_STRLCAT
- strlcat(q->qname, res_get_nibblesuffix(pvt->res),
- sizeof(q->qname));
-#else
- strcpy(qp, res_get_nibblesuffix(pvt->res));
-#endif
+ if (strlen(q->qname) + strlen(nibsuff) + 1 >
+ sizeof q->qname) {
+ errno = ENAMETOOLONG;
+ RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL);
+ hp = NULL;
+ goto cleanup;
+ }
+ strcpy(qp, nibsuff); /* (checked) */
}
if (q2->action != RESTGT_IGNORE) {
+ const char *nibsuff2 = res_get_nibblesuffix2(pvt->res);
qp = q2->qname;
for (n = IN6ADDRSZ - 1; n >= 0; n--) {
i = SPRINTF((qp, "%x.%x.",
uaddr[n] & 0xf,
(uaddr[n] >> 4) & 0xf));
- if (i < 0)
+ if (i != 4)
abort();
qp += i;
}
-#ifdef HAVE_STRLCAT
- strlcat(q->qname, res_get_nibblesuffix2(pvt->res),
- sizeof(q->qname));
-#else
- strcpy(qp, res_get_nibblesuffix2(pvt->res));
-#endif
+ if ((qp - q->qname) + strlen(nibsuff2) + 1 >
+ sizeof q->qname){
+ errno = ENAMETOOLONG;
+ RES_SET_H_ERRNO(pvt->res, NETDB_INTERNAL);
+ hp = NULL;
+ goto cleanup;
+ }
+ strcpy(qp, nibsuff2); /* (checked) */
}
break;
default:
@@ -820,11 +826,7 @@ gethostans(struct irs_ho *this,
had_error++;
continue;
}
-#ifdef HAVE_STRLCPY
- strlcpy(bp, tbuf, ep - bp);
-#else
- strcpy(bp, tbuf);
-#endif
+ strcpy(bp, tbuf); /* (checked) */
pvt->host.h_name = bp;
hname = bp;
bp += n;
@@ -856,11 +858,7 @@ gethostans(struct irs_ho *this,
had_error++;
continue;
}
-#ifdef HAVE_STRLCPY
- strlcpy(bp, tbuf, ep - bp);
-#else
- strcpy(bp, tbuf);
-#endif
+ strcpy(bp, tbuf); /* (checked) */
tname = bp;
bp += n;
continue;
@@ -996,11 +994,7 @@ gethostans(struct irs_ho *this,
n = strlen(qname) + 1; /* for the \0 */
if (n > (ep - bp) || n >= MAXHOSTNAMELEN)
goto no_recovery;
-#ifdef HAVE_STRLCPY
- strlcpy(bp, qname, ep - bp);
-#else
- strcpy(bp, qname);
-#endif
+ strcpy(bp, qname); /* (checked) */
pvt->host.h_name = bp;
bp += n;
}
diff --git a/lib/bind/irs/dns_nw.c b/lib/bind/irs/dns_nw.c
index 34f1f58d..9e1a2621 100644
--- a/lib/bind/irs/dns_nw.c
+++ b/lib/bind/irs/dns_nw.c
@@ -16,7 +16,7 @@
*/
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: dns_nw.c,v 1.3.2.4.4.2 2004/03/17 00:29:48 marka Exp $";
+static const char rcsid[] = "$Id: dns_nw.c,v 1.3.2.4.4.3 2004/05/17 07:48:56 marka Exp $";
#endif /* LIBC_SCCS and not lint */
/* Imports. */
@@ -349,12 +349,7 @@ get1101answer(struct irs_nw *this,
RES_SET_H_ERRNO(pvt->res, NO_RECOVERY);
return (NULL);
}
-#ifdef HAVE_STRLCPY
- strlcpy(bp, name, ep - bp);
- pvt->net.n_name = bp;
-#else
- pvt->net.n_name = strcpy(bp, name);
-#endif
+ pvt->net.n_name = strcpy(bp, name); /* (checked) */
bp += n;
}
break;
diff --git a/lib/bind/irs/gen_gr.c b/lib/bind/irs/gen_gr.c
index 89610da0..e0c6dba5 100644
--- a/lib/bind/irs/gen_gr.c
+++ b/lib/bind/irs/gen_gr.c
@@ -16,7 +16,7 @@
*/
#if !defined(LINT) && !defined(CODECENTER)
-static const char rcsid[] = "$Id: gen_gr.c,v 1.4.2.1.4.1 2004/03/09 08:33:35 marka Exp $";
+static const char rcsid[] = "$Id: gen_gr.c,v 1.4.2.1.4.2 2004/05/17 07:48:56 marka Exp $";
#endif
/* Imports */
@@ -83,7 +83,7 @@ static void gr_res_set(struct irs_gr *,
struct __res_state *,
void (*)(void *));
-static void grmerge(struct irs_gr *gr, const struct group *src,
+static int grmerge(struct irs_gr *gr, const struct group *src,
int preserve);
static int countvec(char **vec);
@@ -92,6 +92,10 @@ static int countnew(char **old, char **new);
static size_t sizenew(char **old, char **new);
static int newgid(int, gid_t *, gid_t);
+/* Macros */
+
+#define FREE_IF(x) do { if ((x) != NULL) { free(x); (x) = NULL; } } while (0)
+
/* Public */
struct irs_gr *
@@ -171,7 +175,8 @@ gr_byname(struct irs_gr *this, const char *name) {
gr = rule->inst->gr;
tval = (*gr->byname)(gr, name);
if (tval) {
- grmerge(this, tval, dirty++);
+ if (!grmerge(this, tval, dirty++))
+ return (NULL);
if (!(rule->flags & IRS_MERGE))
break;
} else {
@@ -197,7 +202,8 @@ gr_bygid(struct irs_gr *this, gid_t gid) {
gr = rule->inst->gr;
tval = (*gr->bygid)(gr, gid);
if (tval) {
- grmerge(this, tval, dirty++);
+ if (!grmerge(this, tval, dirty++))
+ return (NULL);
if (!(rule->flags & IRS_MERGE))
break;
} else {
@@ -321,7 +327,7 @@ gr_res_set(struct irs_gr *this, struct __res_state *res,
/* Private. */
-static void
+static int
grmerge(struct irs_gr *this, const struct group *src, int preserve) {
struct pvt *pvt = (struct pvt *)this->private;
char *cp, **m, **p, *oldmembuf, *ep;
@@ -332,9 +338,9 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
pvt->group.gr_gid = src->gr_gid;
if (pvt->nmemb < 1) {
m = malloc(sizeof *m);
- if (!m) {
+ if (m == NULL) {
/* No harm done, no work done. */
- return;
+ return (0);
}
pvt->group.gr_mem = m;
pvt->nmemb = 1;
@@ -351,9 +357,9 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
n = ndst + nnew + 1;
if ((size_t)n > pvt->nmemb) {
m = realloc(pvt->group.gr_mem, n * sizeof *m);
- if (!m) {
+ if (m == NULL) {
/* No harm done, no work done. */
- return;
+ return (0);
}
pvt->group.gr_mem = m;
pvt->nmemb = n;
@@ -371,13 +377,13 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
}
if (n == 0) {
/* No work to do. */
- return;
+ return (1);
}
used = preserve ? pvt->membufsize : 0;
cp = malloc(used + n);
- if (!cp) {
+ if (cp == NULL) {
/* No harm done, no work done. */
- return;
+ return (0);
}
ep = cp + used + n;
if (used != 0)
@@ -401,12 +407,13 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
if (isnew(pvt->group.gr_mem, *m)) {
*p++ = cp;
*p = NULL;
-#ifdef HAVE_STRLCPY
- strlcpy(cp, *m, ep - cp);
-#else
- strcpy(cp, *m);
-#endif
- cp += strlen(cp) + 1;
+ n = strlen(*m) + 1;
+ if (n > ep - cp) {
+ FREE_IF(oldmembuf);
+ return (0);
+ }
+ strcpy(cp, *m); /* (checked) */
+ cp += n;
}
if (preserve) {
pvt->group.gr_name = pvt->membuf +
@@ -415,23 +422,26 @@ grmerge(struct irs_gr *this, const struct group *src, int preserve) {
(pvt->group.gr_passwd - oldmembuf);
} else {
pvt->group.gr_name = cp;
-#ifdef HAVE_STRLCPY
- strlcpy(cp, src->gr_name, ep - cp);
-#else
- strcpy(cp, src->gr_name);
-#endif
- cp += strlen(src->gr_name) + 1;
+ n = strlen(src->gr_name) + 1;
+ if (n > ep - cp) {
+ FREE_IF(oldmembuf);
+ return (0);
+ }
+ strcpy(cp, src->gr_name); /* (checked) */
+ cp += n;
+
pvt->group.gr_passwd = cp;
-#ifdef HAVE_STRLCPY
- strlcpy(cp, src->gr_passwd, ep - cp);
-#else
- strcpy(cp, src->gr_passwd);
-#endif
- cp += strlen(src->gr_passwd) + 1;
+ n = strlen(src->gr_passwd) + 1;
+ if (n > ep - cp) {
+ FREE_IF(oldmembuf);
+ return (0);
+ }
+ strcpy(cp, src->gr_passwd); /* (checked) */
+ cp += n;
}
- if (oldmembuf != NULL)
- free(oldmembuf);
+ FREE_IF(oldmembuf);
INSIST(cp >= pvt->membuf && cp <= &pvt->membuf[pvt->membufsize]);
+ return (1);
}
static int
diff --git a/lib/bind/irs/getaddrinfo.c b/lib/bind/irs/getaddrinfo.c
index 89db519f..31a45367 100644
--- a/lib/bind/irs/getaddrinfo.c
+++ b/lib/bind/irs/getaddrinfo.c
@@ -937,11 +937,7 @@ copy_ai(pai)
free(ai);
return NULL;
}
-#ifdef HAVE_STRLCPY
- strlcpy(ai->ai_canonname, pai->ai_canonname, l);
-#else
- strncpy(ai->ai_canonname, pai->ai_canonname, l);
-#endif
+ strcpy(ai->ai_canonname, pai->ai_canonname); /* (checked) */
} else {
/* just to make sure */
ai->ai_canonname = NULL;
diff --git a/lib/bind/irs/hesiod.c b/lib/bind/irs/hesiod.c
index a0b45c54..9b0efeb8 100644
--- a/lib/bind/irs/hesiod.c
+++ b/lib/bind/irs/hesiod.c
@@ -1,5 +1,5 @@
#if defined(LIBC_SCCS) && !defined(lint)
-static const char rcsid[] = "$Id: hesiod.c,v 1.1.2.1.4.2 2004/03/17 01:49:41 marka Exp $";
+static const char rcsid[] = "$Id: hesiod.c,v 1.1.2.1.4.3 2004/05/17 07:48:56 marka Exp $";
#endif
/*
@@ -92,19 +92,14 @@ hesiod_init(void **context) {
/*
* Use compiled in defaults.
*/
- ctx->LHS = malloc(strlen(DEF_LHS)+1);
- ctx->RHS = malloc(strlen(DEF_RHS)+1);
- if (ctx->LHS == 0 || ctx->RHS == 0) {
+ ctx->LHS = malloc(strlen(DEF_LHS) + 1);
+ ctx->RHS = malloc(strlen(DEF_RHS) + 1);
+ if (ctx->LHS == NULL || ctx->RHS == NULL) {
errno = ENOMEM;
goto cleanup;
}
-#ifdef HAVE_STRLCPY
- strlcpy(ctx->LHS, DEF_LHS, strlen(DEF_LHS) + 1);
- strlcpy(ctx->RHS, DEF_RHS, strlen(DEF_RHS) + 1);
-#else
- strcpy(ctx->LHS, DEF_LHS);
- strcpy(ctx->RHS, DEF_RHS);
-#endif
+ strcpy(ctx->LHS, DEF_LHS); /* (checked) */
+ strcpy(ctx->RHS, DEF_RHS); /* (checked) */
#else
goto cleanup;
#endif
@@ -123,22 +118,10 @@ hesiod_init(void **context) {
goto cleanup;
}
if (cp[0] == '.') {
-#ifdef HAVE_STRLCPY
- strlcpy(ctx->RHS, cp, RHSlen);
-#else
- strcpy(ctx->RHS, cp);
-#endif
+ strcpy(ctx->RHS, cp); /* (checked) */
} else {
-#ifdef HAVE_STRLCPY
- strlcpy(ctx->RHS, ".", RHSlen);
-#else
- strcpy(ctx->RHS, ".");
-#endif
-#ifdef HAVE_STRLCAT
- strlcat(ctx->RHS, cp, RHSlen);
-#else
- strcat(ctx->RHS, cp);
-#endif
+ strcpy(ctx->RHS, "."); /* (checked) */
+ strcat(ctx->RHS, cp); /* (checked) */
}
}
diff --git a/lib/bind/nameser/ns_name.c b/lib/bind/nameser/ns_name.c
index c26cebca..5ac91e3d 100644
--- a/lib/bind/nameser/ns_name.c
+++ b/lib/bind/nameser/ns_name.c
@@ -16,7 +16,7 @@
*/
#ifndef lint
-static const char rcsid[] = "$Id: ns_name.c,v 1.3.2.4.4.1 2004/03/09 08:33:44 marka Exp $";
+static const char rcsid[] = "$Id: ns_name.c,v 1.3.2.4.4.2 2004/05/04 03:27:47 marka Exp $";
#endif
#include "port_before.h"
@@ -75,9 +75,11 @@ static int dn_find(const u_char *, const u_char *,
const u_char * const *,
const u_char * const *);
static int encode_bitsring(const char **, const char *,
- char **, char **, const char *);
+ unsigned char **, unsigned char **,
+ unsigned const char *);
static int labellen(const u_char *);
-static int decode_bitstring(const char **, char *, const char *);
+static int decode_bitstring(const unsigned char **,
+ char *, const char *);
/* Public. */
@@ -132,7 +134,7 @@ ns_name_ntop(const u_char *src, char *dst, size_t dstsiz)
errno = EINVAL;
return(-1);
}
- if ((m = decode_bitstring((const char **)&cp, dn, eom)) < 0)
+ if ((m = decode_bitstring(&cp, dn, eom)) < 0)
{
errno = EMSGSIZE;
return(-1);
@@ -212,11 +214,8 @@ ns_name_pton(const char *src, u_char *dst, size_t dstsiz)
errno = EINVAL; /* ??? */
return(-1);
}
- if ((e = encode_bitsring(&src,
- cp + 2,
- (char **)&label,
- (char **)&bp,
- (const char *)eom))
+ if ((e = encode_bitsring(&src, cp + 2,
+ &label, &bp, eom))
!= 0) {
errno = e;
return(-1);
@@ -788,9 +787,9 @@ dn_find(const u_char *domain, const u_char *msg,
}
static int
-decode_bitstring(const char **cpp, char *dn, const char *eom)
+decode_bitstring(const unsigned char **cpp, char *dn, const char *eom)
{
- const char *cp = *cpp;
+ const unsigned char *cp = *cpp;
char *beg = dn, tc;
int b, blen, plen, i;
@@ -836,12 +835,13 @@ decode_bitstring(const char **cpp, char *dn, const char *eom)
}
static int
-encode_bitsring(const char **bp, const char *end, char **labelp,
- char ** dst, const char *eom)
+encode_bitsring(const char **bp, const char *end, unsigned char **labelp,
+ unsigned char ** dst, unsigned const char *eom)
{
int afterslash = 0;
const char *cp = *bp;
- char *tp, c;
+ unsigned char *tp;
+ char c;
const char *beg_blen;
char *end_blen = NULL;
int value = 0, count = 0, tbcount = 0, blen = 0;
diff --git a/lib/bind9/api b/lib/bind9/api
index 06977fcb..7931195a 100644
--- a/lib/bind9/api
+++ b/lib/bind9/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 0
-LIBREVISION = 1
+LIBREVISION = 2
LIBAGE = 0
diff --git a/lib/bind9/check.c b/lib/bind9/check.c
index 01bc366a..05212917 100644
--- a/lib/bind9/check.c
+++ b/lib/bind9/check.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: check.c,v 1.37.6.25 2004/04/15 23:56:28 marka Exp $ */
+/* $Id: check.c,v 1.37.6.26 2004/05/17 05:58:38 marka Exp $ */
#include <config.h>
@@ -1175,6 +1175,7 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
cfg_listelt_t *velement;
isc_result_t result = ISC_R_SUCCESS;
isc_result_t tresult;
+ isc_symtab_t *symtab = NULL;
static const char *builtin[] = { "localhost", "localnets",
"any", "none"};
@@ -1216,6 +1217,9 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
}
}
+ tresult = isc_symtab_create(mctx, 100, NULL, NULL, ISC_TRUE, &symtab);
+ if (tresult != ISC_R_SUCCESS)
+ result = tresult;
for (velement = cfg_list_first(views);
velement != NULL;
velement = cfg_list_next(velement))
@@ -1226,6 +1230,8 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
cfg_obj_t *vclassobj = cfg_tuple_get(view, "class");
dns_rdataclass_t vclass = dns_rdataclass_in;
isc_result_t tresult = ISC_R_SUCCESS;
+ const char *key = cfg_obj_asstring(vname);
+ isc_symvalue_t symvalue;
if (cfg_obj_isstring(vclassobj)) {
isc_textregion_t r;
@@ -1238,12 +1244,34 @@ bind9_check_namedconf(cfg_obj_t *config, isc_log_t *logctx, isc_mem_t *mctx) {
"view '%s': invalid class %s",
cfg_obj_asstring(vname), r.base);
}
+ if (tresult == ISC_R_SUCCESS && symtab != NULL) {
+ symvalue.as_pointer = view;
+ tresult = isc_symtab_define(symtab, key, vclass,
+ symvalue,
+ isc_symexists_reject);
+ if (tresult == ISC_R_EXISTS) {
+ const char *file;
+ unsigned int line;
+ RUNTIME_CHECK(isc_symtab_lookup(symtab, key,
+ vclass, &symvalue) == ISC_R_SUCCESS);
+ file = cfg_obj_file(symvalue.as_pointer);
+ line = cfg_obj_line(symvalue.as_pointer);
+ cfg_obj_log(view, logctx, ISC_LOG_ERROR,
+ "view '%s': already exists "
+ "previous definition: %s:%u",
+ key, file, line);
+ result = tresult;
+ } else if (result != ISC_R_SUCCESS)
+ result = tresult;
+ }
if (tresult == ISC_R_SUCCESS)
tresult = check_viewconf(config, voptions,
vclass, logctx, mctx);
if (tresult != ISC_R_SUCCESS)
result = ISC_R_FAILURE;
}
+ if (symtab != NULL)
+ isc_symtab_destroy(&symtab);
if (views != NULL && options != NULL) {
obj = NULL;
diff --git a/lib/bind9/getaddresses.c b/lib/bind9/getaddresses.c
index 7acd282d..16c9e131 100644
--- a/lib/bind9/getaddresses.c
+++ b/lib/bind9/getaddresses.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: getaddresses.c,v 1.13.126.4 2004/03/08 09:04:27 marka Exp $ */
+/* $Id: getaddresses.c,v 1.13.126.5 2004/05/15 03:46:12 jinmei Exp $ */
#include <config.h>
#include <string.h>
@@ -23,6 +23,7 @@
#include <isc/net.h>
#include <isc/netaddr.h>
#include <isc/netdb.h>
+#include <isc/netscope.h>
#include <isc/result.h>
#include <isc/sockaddr.h>
#include <isc/util.h>
@@ -67,19 +68,67 @@ bind9_getaddresses(const char *hostname, in_port_t port,
have_ipv4 = (isc_net_probeipv4() == ISC_R_SUCCESS);
have_ipv6 = (isc_net_probeipv6() == ISC_R_SUCCESS);
- if (inet_pton(AF_INET6, hostname, &in6) == 1) {
- if (!have_ipv6)
- return (ISC_R_FAMILYNOSUPPORT);
- isc_sockaddr_fromin6(&addrs[0], &in6, port);
- *addrcount = 1;
- return (ISC_R_SUCCESS);
- } else if (inet_pton(AF_INET, hostname, &in4) == 1) {
+ /*
+ * Try IPv4, then IPv6. In order to handle the extended format
+ * for IPv6 scoped addresses (address%scope_ID), we'll use a local
+ * working buffer of 128 bytes. The length is an ad-hoc value, but
+ * should be enough for this purpose; the buffer can contain a string
+ * of at least 80 bytes for scope_ID in addition to any IPv6 numeric
+ * addresses (up to 46 bytes), the delimiter character and the
+ * terminating NULL character.
+ */
+ if (inet_pton(AF_INET, hostname, &in4) == 1) {
if (have_ipv4)
isc_sockaddr_fromin(&addrs[0], &in4, port);
else
isc_sockaddr_v6fromin(&addrs[0], &in4, port);
*addrcount = 1;
return (ISC_R_SUCCESS);
+ } else if (strlen(hostname) <= 127) {
+ char tmpbuf[128], *d;
+ isc_uint32_t zone = 0;
+
+ strcpy(tmpbuf, hostname);
+ d = strchr(tmpbuf, '%');
+ if (d != NULL)
+ *d = '\0';
+
+ if (inet_pton(AF_INET6, tmpbuf, &in6) == 1) {
+ isc_netaddr_t na;
+
+ if (!have_ipv6)
+ return (ISC_R_FAMILYNOSUPPORT);
+
+ if (d != NULL) {
+#ifdef ISC_PLATFORM_HAVESCOPEID
+ isc_result_t result;
+
+ result = isc_netscope_pton(AF_INET6, d + 1,
+ &in6, &zone);
+
+ if (result != ISC_R_SUCCESS)
+ return (result);
+#else
+ /*
+ * The extended format is specified while the
+ * system does not provide the ability to use
+ * it. Throw an explicit error instead of
+ * ignoring the specified value.
+ */
+ return (ISC_R_BADADDRESSFORM);
+#endif
+ }
+
+ isc_netaddr_fromin6(&na, &in6);
+ isc_netaddr_setzone(&na, zone);
+ isc_sockaddr_fromnetaddr(&addrs[0],
+ (const isc_netaddr_t *)&na,
+ port);
+
+ *addrcount = 1;
+ return (ISC_R_SUCCESS);
+
+ }
}
#ifdef USE_GETADDRINFO
memset(&hints, 0, sizeof(hints));
diff --git a/lib/dns/api b/lib/dns/api
index a8be9070..49b39c32 100644
--- a/lib/dns/api
+++ b/lib/dns/api
@@ -1,3 +1,3 @@
-LIBINTERFACE = 14
+LIBINTERFACE = 15
LIBREVISION = 0
LIBAGE = 0
diff --git a/lib/dns/include/dns/db.h b/lib/dns/include/dns/db.h
index 8ae25b78..8e088823 100644
--- a/lib/dns/include/dns/db.h
+++ b/lib/dns/include/dns/db.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: db.h,v 1.67.12.7 2004/03/08 09:04:35 marka Exp $ */
+/* $Id: db.h,v 1.67.12.8 2004/05/14 05:06:41 marka Exp $ */
#ifndef DNS_DB_H
#define DNS_DB_H 1
@@ -188,6 +188,7 @@ struct dns_db {
#define DNS_DBFIND_PENDINGOK 0x08
#define DNS_DBFIND_NOEXACT 0x10
#define DNS_DBFIND_FORCENSEC 0x20
+#define DNS_DBFIND_COVERINGNSEC 0x40
/*
* Options that can be specified for dns_db_addrdataset().
@@ -647,6 +648,12 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* is only necessary when querying a database that was not secure
* when created.
*
+ * If the DNS_DBFIND_COVERINGNSEC option is set, then look for a
+ * NSEC record that potentially covers 'name' if a answer cannot
+ * be found. Note the returned NSEC needs to be checked to ensure
+ * that it is correct. This only affects answers returned from the
+ * cache.
+ *
* To respond to a query for SIG records, the caller should create a
* rdataset iterator and extract the signatures from each rdataset.
*
@@ -770,6 +777,9 @@ dns_db_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* DNS_R_EMPTYNAME The name exists but there is
* no data at the name.
*
+ * DNS_R_COVERINGNSEC The returned data is a NSEC
+ * that potentially covers 'name'.
+ *
* Error results:
*
* ISC_R_NOMEMORY
diff --git a/lib/dns/include/dns/result.h b/lib/dns/include/dns/result.h
index 5ffcf0f9..f1a71d98 100644
--- a/lib/dns/include/dns/result.h
+++ b/lib/dns/include/dns/result.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.h,v 1.81.2.7.2.12 2004/04/15 23:56:32 marka Exp $ */
+/* $Id: result.h,v 1.81.2.7.2.13 2004/05/14 05:06:41 marka Exp $ */
#ifndef DNS_RESULT_H
#define DNS_RESULT_H 1
@@ -142,8 +142,9 @@
#define DNS_R_DYNAMIC (ISC_RESULTCLASS_DNS + 98)
#define DNS_R_UNKNOWNCOMMAND (ISC_RESULTCLASS_DNS + 99)
#define DNS_R_MUSTBESECURE (ISC_RESULTCLASS_DNS + 100)
+#define DNS_R_COVERINGNSEC (ISC_RESULTCLASS_DNS + 101)
-#define DNS_R_NRESULTS 101 /* Number of results */
+#define DNS_R_NRESULTS 102 /* Number of results */
/*
* DNS wire format rcodes.
diff --git a/lib/dns/include/dns/validator.h b/lib/dns/include/dns/validator.h
index 585a6bfc..c405fbb4 100644
--- a/lib/dns/include/dns/validator.h
+++ b/lib/dns/include/dns/validator.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: validator.h,v 1.18.12.6 2004/04/15 23:56:33 marka Exp $ */
+/* $Id: validator.h,v 1.18.12.7 2004/05/14 05:06:41 marka Exp $ */
#ifndef DNS_VALIDATOR_H
#define DNS_VALIDATOR_H 1
@@ -121,6 +121,8 @@ struct dns_validator {
dns_fixedname_t wild;
ISC_LINK(dns_validator_t) link;
dns_rdataset_t * dlv;
+ dns_fixedname_t dlvsep;
+ isc_boolean_t havedlvsep;
isc_boolean_t mustbesecure;
};
diff --git a/lib/dns/journal.c b/lib/dns/journal.c
index 76dfbc24..28fd3547 100644
--- a/lib/dns/journal.c
+++ b/lib/dns/journal.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: journal.c,v 1.77.2.1.10.6 2004/03/08 09:04:30 marka Exp $ */
+/* $Id: journal.c,v 1.77.2.1.10.8 2004/05/14 05:27:47 marka Exp $ */
#include <config.h>
@@ -1822,10 +1822,16 @@ dns_db_diff(isc_mem_t *mctx,
dns_fixedname_init(&fixname[0]);
dns_fixedname_init(&fixname[1]);
- CHECK(dns_journal_open(mctx, journal_filename, ISC_TRUE, &journal));
+ result = dns_journal_open(mctx, journal_filename, ISC_TRUE, &journal);
+ if (result != ISC_R_SUCCESS)
+ return (result);
- CHECK(dns_db_createiterator(db[0], ISC_FALSE, &dbit[0]));
- CHECK(dns_db_createiterator(db[1], ISC_FALSE, &dbit[1]));
+ result = dns_db_createiterator(db[0], ISC_FALSE, &dbit[0]);
+ if (result != ISC_R_SUCCESS)
+ goto cleanup_journal;
+ result = dns_db_createiterator(db[1], ISC_FALSE, &dbit[1]);
+ if (result != ISC_R_SUCCESS)
+ goto cleanup_interator0;
itresult[0] = dns_dbiterator_first(dbit[0]);
itresult[1] = dns_dbiterator_first(dbit[1]);
@@ -1898,8 +1904,10 @@ dns_db_diff(isc_mem_t *mctx,
failure:
dns_diff_clear(&resultdiff);
- dns_dbiterator_destroy(&dbit[0]);
dns_dbiterator_destroy(&dbit[1]);
+ cleanup_interator0:
+ dns_dbiterator_destroy(&dbit[0]);
+ cleanup_journal:
dns_journal_destroy(&journal);
return (result);
}
@@ -2115,6 +2123,7 @@ index_to_disk(dns_journal_t *j) {
}
INSIST(p == j->rawindex + rawbytes);
+ CHECK(journal_seek(j, sizeof(journal_rawheader_t)));
CHECK(journal_write(j, j->rawindex, rawbytes));
}
failure:
diff --git a/lib/dns/master.c b/lib/dns/master.c
index db578f05..7a2dab3a 100644
--- a/lib/dns/master.c
+++ b/lib/dns/master.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: master.c,v 1.122.2.8.2.13 2004/03/08 02:07:53 marka Exp $ */
+/* $Id: master.c,v 1.122.2.8.2.14 2004/05/05 01:32:16 marka Exp $ */
#include <config.h>
@@ -1645,7 +1645,8 @@ load(dns_loadctx_t *lctx) {
}
- if (type == dns_rdatatype_rrsig)
+ if (type == dns_rdatatype_rrsig ||
+ type == dns_rdatatype_sig)
covers = dns_rdata_covers(&rdata[rdcount]);
else
covers = 0;
diff --git a/lib/dns/masterdump.c b/lib/dns/masterdump.c
index ac5aebb8..7ff5820d 100644
--- a/lib/dns/masterdump.c
+++ b/lib/dns/masterdump.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: masterdump.c,v 1.56.2.5.2.10 2004/03/08 09:04:30 marka Exp $ */
+/* $Id: masterdump.c,v 1.56.2.5.2.11 2004/05/14 01:18:10 marka Exp $ */
#include <config.h>
@@ -979,6 +979,7 @@ closeandrename(FILE *f, isc_result_t result, const char *temp, const char *file)
static void
dump_quantum(isc_task_t *task, isc_event_t *event) {
isc_result_t result;
+ isc_result_t tresult;
dns_dumpctx_t *dctx;
REQUIRE(event != NULL);
@@ -994,11 +995,12 @@ dump_quantum(isc_task_t *task, isc_event_t *event) {
return;
}
- if (dctx->file != NULL)
- result = closeandrename(dctx->f, result,
- dctx->tmpfile, dctx->file);
- if (dctx->version != NULL)
- dns_db_closeversion(dctx->db, &dctx->version, ISC_FALSE);
+ if (dctx->file != NULL) {
+ tresult = closeandrename(dctx->f, result,
+ dctx->tmpfile, dctx->file);
+ if (tresult != ISC_R_SUCCESS && result == ISC_R_SUCCESS)
+ result = tresult;
+ }
(dctx->done)(dctx->done_arg, result);
isc_event_free(&event);
dns_dumpctx_detach(&dctx);
diff --git a/lib/dns/message.c b/lib/dns/message.c
index f00dda81..badde6ee 100644
--- a/lib/dns/message.c
+++ b/lib/dns/message.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: message.c,v 1.194.2.10.2.16 2004/03/10 00:48:49 marka Exp $ */
+/* $Id: message.c,v 1.194.2.10.2.17 2004/05/05 01:32:16 marka Exp $ */
/***
*** Imports
@@ -1288,18 +1288,16 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
if (result != ISC_R_SUCCESS)
goto cleanup;
rdata->rdclass = rdclass;
+ issigzero = ISC_FALSE;
if (rdtype == dns_rdatatype_rrsig &&
rdata->flags == 0) {
covers = dns_rdata_covers(rdata);
if (covers == 0)
DO_FORMERR;
- } else
- covers = 0;
-
- issigzero = ISC_FALSE;
- if (rdtype == dns_rdatatype_sig /* SIG(0) */ &&
- rdata->flags == 0) {
- if (dns_rdata_covers(rdata) == 0) {
+ } else if (rdtype == dns_rdatatype_sig /* SIG(0) */ &&
+ rdata->flags == 0) {
+ covers = dns_rdata_covers(rdata);
+ if (covers == 0) {
if (sectionid != DNS_SECTION_ADDITIONAL ||
count != msg->counts[sectionid] - 1)
DO_FORMERR;
@@ -1308,7 +1306,8 @@ getsection(isc_buffer_t *source, dns_message_t *msg, dns_decompress_t *dctx,
skip_type_search = ISC_TRUE;
issigzero = ISC_TRUE;
}
- }
+ } else
+ covers = 0;
/*
* If we are doing a dynamic update or this is a meta-type,
diff --git a/lib/dns/rbtdb.c b/lib/dns/rbtdb.c
index cd01acb9..df44fa08 100644
--- a/lib/dns/rbtdb.c
+++ b/lib/dns/rbtdb.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rbtdb.c,v 1.168.2.11.2.12 2004/03/08 02:07:55 marka Exp $ */
+/* $Id: rbtdb.c,v 1.168.2.11.2.15 2004/05/14 05:06:38 marka Exp $ */
/*
* Principal Author: Bob Halley
@@ -842,8 +842,7 @@ clean_zone_node(dns_rbtdb_t *rbtdb, dns_rbtnode_t *node,
/*
* If this is a NONEXISTENT rdataset, we can delete it.
*/
- if ((current->attributes & RDATASET_ATTR_NONEXISTENT)
- != 0) {
+ if (NONEXISTENT(current)) {
if (top_prev != NULL)
top_prev->next = current->next;
else
@@ -1931,8 +1930,7 @@ find_closest_nsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
* Is this a "this rdataset doesn't
* exist" record?
*/
- if ((header->attributes &
- RDATASET_ATTR_NONEXISTENT) != 0)
+ if (NONEXISTENT(header))
header = NULL;
break;
} else
@@ -2204,8 +2202,7 @@ zone_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
* Is this a "this rdataset doesn't
* exist" record?
*/
- if ((header->attributes &
- RDATASET_ATTR_NONEXISTENT) != 0)
+ if (NONEXISTENT(header))
header = NULL;
break;
} else
@@ -2658,8 +2655,7 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
node->dirty = 1;
header_prev = header;
}
- } else if ((header->attributes &
- RDATASET_ATTR_NONEXISTENT) == 0) {
+ } else if (EXISTS(header)) {
/*
* We've found an extant rdataset. See if
* we're interested in it.
@@ -2736,6 +2732,104 @@ find_deepest_zonecut(rbtdb_search_t *search, dns_rbtnode_t *node,
}
static isc_result_t
+find_coveringnsec(rbtdb_search_t *search, dns_dbnode_t **nodep,
+ isc_stdtime_t now, dns_name_t *foundname,
+ dns_rdataset_t *rdataset, dns_rdataset_t *sigrdataset)
+{
+ dns_rbtnode_t *node;
+ rdatasetheader_t *header, *header_next, *header_prev;
+ rdatasetheader_t *found, *foundsig;
+ isc_boolean_t empty_node;
+ isc_result_t result;
+ dns_fixedname_t fname, forigin;
+ dns_name_t *name, *origin;
+ rbtdb_rdatatype_t matchtype, sigmatchtype, nsectype;
+
+ matchtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_nsec, 0);
+ nsectype = RBTDB_RDATATYPE_VALUE(0, dns_rdatatype_nsec);
+ sigmatchtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig,
+ dns_rdatatype_nsec);
+
+ do {
+ node = NULL;
+ dns_fixedname_init(&fname);
+ name = dns_fixedname_name(&fname);
+ dns_fixedname_init(&forigin);
+ origin = dns_fixedname_name(&forigin);
+ result = dns_rbtnodechain_current(&search->chain, name,
+ origin, &node);
+ if (result != ISC_R_SUCCESS)
+ return (result);
+ LOCK(&(search->rbtdb->node_locks[node->locknum].lock));
+ found = NULL;
+ foundsig = NULL;
+ empty_node = ISC_TRUE;
+ header_prev = NULL;
+ for (header = node->data;
+ header != NULL;
+ header = header_next) {
+ header_next = header->next;
+ if (header->ttl <= now) {
+ /*
+ * This rdataset is stale. If no one else is
+ * using the node, we can clean it up right
+ * now, otherwise we mark it as stale, and the
+ * node as dirty, so it will get cleaned up
+ * later.
+ */
+ if (node->references == 0) {
+ INSIST(header->down == NULL);
+ if (header_prev != NULL)
+ header_prev->next =
+ header->next;
+ else
+ node->data = header->next;
+ free_rdataset(search->rbtdb->common.mctx,
+ header);
+ } else {
+ header->attributes |=
+ RDATASET_ATTR_STALE;
+ node->dirty = 1;
+ header_prev = header;
+ }
+ continue;
+ }
+ if (NONEXISTENT(header) || NXDOMAIN(header)) {
+ header_prev = header;
+ continue;
+ }
+ empty_node = ISC_FALSE;
+ if (header->type == matchtype)
+ found = header;
+ else if (header->type == sigmatchtype)
+ foundsig = header;
+ header_prev = header;
+ }
+ if (found != NULL) {
+ result = dns_name_concatenate(name, origin,
+ foundname, NULL);
+ if (result != ISC_R_SUCCESS)
+ goto unlock_node;
+ bind_rdataset(search->rbtdb, node, found,
+ now, rdataset);
+ if (foundsig != NULL)
+ bind_rdataset(search->rbtdb, node, foundsig,
+ now, sigrdataset);
+ new_reference(search->rbtdb, node);
+ *nodep = node;
+ result = DNS_R_COVERINGNSEC;
+ } else if (!empty_node) {
+ result = ISC_R_NOTFOUND;
+ }else
+ result = dns_rbtnodechain_prev(&search->chain, NULL,
+ NULL);
+ unlock_node:
+ UNLOCK(&(search->rbtdb->node_locks[node->locknum].lock));
+ } while (empty_node && result == ISC_R_SUCCESS);
+ return (result);
+}
+
+static isc_result_t
cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
dns_rdatatype_t type, unsigned int options, isc_stdtime_t now,
dns_dbnode_t **nodep, dns_name_t *foundname,
@@ -2750,7 +2844,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
rdatasetheader_t *header, *header_prev, *header_next;
rdatasetheader_t *found, *nsheader;
rdatasetheader_t *foundsig, *nssig, *cnamesig;
- rbtdb_rdatatype_t sigtype, nsecype;
+ rbtdb_rdatatype_t sigtype, nsectype;
UNUSED(version);
@@ -2785,6 +2879,13 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
cache_zonecut_callback, &search);
if (result == DNS_R_PARTIALMATCH) {
+ if ((search.options & DNS_DBFIND_COVERINGNSEC) != 0) {
+ result = find_coveringnsec(&search, nodep, now,
+ foundname, rdataset,
+ sigrdataset);
+ if (result == DNS_R_COVERINGNSEC)
+ goto tree_exit;
+ }
if (search.zonecut != NULL) {
result = setup_delegation(&search, nodep, foundname,
rdataset, sigrdataset);
@@ -2818,7 +2919,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
found = NULL;
foundsig = NULL;
sigtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig, type);
- nsecype = RBTDB_RDATATYPE_VALUE(0, type);
+ nsectype = RBTDB_RDATATYPE_VALUE(0, type);
nsheader = NULL;
nssig = NULL;
cnamesig = NULL;
@@ -2846,8 +2947,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
node->dirty = 1;
header_prev = header;
}
- } else if ((header->attributes & RDATASET_ATTR_NONEXISTENT)
- == 0) {
+ } else if (EXISTS(header)) {
/*
* We now know that there is at least one active
* non-stale rdataset at this node.
@@ -2889,7 +2989,7 @@ cache_find(dns_db_t *db, dns_name_t *name, dns_dbversion_t *version,
*/
foundsig = header;
} else if (header->type == RBTDB_RDATATYPE_NCACHEANY ||
- header->type == nsecype) {
+ header->type == nsectype) {
/*
* We've found a negative cache entry.
*/
@@ -3114,8 +3214,7 @@ cache_findzonecut(dns_db_t *db, dns_name_t *name, unsigned int options,
node->dirty = 1;
header_prev = header;
}
- } else if ((header->attributes & RDATASET_ATTR_NONEXISTENT)
- == 0) {
+ } else if (EXISTS(header)) {
/*
* If we found a type we were looking for, remember
* it.
@@ -3178,6 +3277,7 @@ attachnode(dns_db_t *db, dns_dbnode_t *source, dns_dbnode_t **targetp) {
dns_rbtnode_t *node = (dns_rbtnode_t *)source;
REQUIRE(VALID_RBTDB(rbtdb));
+ REQUIRE(targetp != NULL && *targetp == NULL);
LOCK(&rbtdb->node_locks[node->locknum].lock);
INSIST(node->references > 0);
@@ -3448,8 +3548,7 @@ zone_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
* Is this a "this rdataset doesn't
* exist" record?
*/
- if ((header->attributes &
- RDATASET_ATTR_NONEXISTENT) != 0)
+ if (NONEXISTENT(header))
header = NULL;
break;
} else
@@ -3499,7 +3598,7 @@ cache_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
dns_rbtdb_t *rbtdb = (dns_rbtdb_t *)db;
dns_rbtnode_t *rbtnode = (dns_rbtnode_t *)node;
rdatasetheader_t *header, *header_next, *found, *foundsig;
- rbtdb_rdatatype_t matchtype, sigmatchtype, nsecype;
+ rbtdb_rdatatype_t matchtype, sigmatchtype, nsectype;
isc_result_t result;
REQUIRE(VALID_RBTDB(rbtdb));
@@ -3517,7 +3616,7 @@ cache_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
found = NULL;
foundsig = NULL;
matchtype = RBTDB_RDATATYPE_VALUE(type, covers);
- nsecype = RBTDB_RDATATYPE_VALUE(0, type);
+ nsectype = RBTDB_RDATATYPE_VALUE(0, type);
if (covers == 0)
sigmatchtype = RBTDB_RDATATYPE_VALUE(dns_rdatatype_rrsig, type);
else
@@ -3534,12 +3633,11 @@ cache_findrdataset(dns_db_t *db, dns_dbnode_t *node, dns_dbversion_t *version,
*/
header->attributes |= RDATASET_ATTR_STALE;
rbtnode->dirty = 1;
- } else if ((header->attributes & RDATASET_ATTR_NONEXISTENT) ==
- 0) {
+ } else if (EXISTS(header)) {
if (header->type == matchtype)
found = header;
else if (header->type == RBTDB_RDATATYPE_NCACHEANY ||
- header->type == nsecype)
+ header->type == nsectype)
found = header;
else if (header->type == sigmatchtype)
foundsig = header;
@@ -3669,10 +3767,13 @@ cname_and_other_data(dns_rbtnode_t *node, rbtdb_serial_t serial) {
* or RRSIG CNAME.
*/
rdtype = RBTDB_RDATATYPE_BASE(header->type);
- if (rdtype == dns_rdatatype_rrsig)
+ if (rdtype == dns_rdatatype_rrsig ||
+ rdtype == dns_rdatatype_sig)
rdtype = RBTDB_RDATATYPE_EXT(header->type);
if (rdtype != dns_rdatatype_nsec &&
rdtype != dns_rdatatype_dnskey &&
+ rdtype != dns_rdatatype_nxt &&
+ rdtype != dns_rdatatype_key &&
rdtype != dns_rdatatype_cname) {
/*
* We've found a type that isn't
@@ -3716,7 +3817,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
isc_boolean_t header_nx;
isc_boolean_t newheader_nx;
isc_boolean_t merge;
- dns_rdatatype_t nsecype, rdtype, covers;
+ dns_rdatatype_t nsectype, rdtype, covers;
dns_trust_t trust;
/*
@@ -3754,7 +3855,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
newheader_nx = NONEXISTENT(newheader) ? ISC_TRUE : ISC_FALSE;
topheader_prev = NULL;
- nsecype = 0;
+ nsectype = 0;
if (rbtversion == NULL && !newheader_nx) {
rdtype = RBTDB_RDATATYPE_BASE(newheader->type);
if (rdtype == 0) {
@@ -3781,7 +3882,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
rbtnode->dirty = 1;
goto find_header;
}
- nsecype = RBTDB_RDATATYPE_VALUE(covers, 0);
+ nsectype = RBTDB_RDATATYPE_VALUE(covers, 0);
} else {
/*
* We're adding something that isn't a
@@ -3821,7 +3922,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
topheader = NULL;
goto find_header;
}
- nsecype = RBTDB_RDATATYPE_VALUE(0, rdtype);
+ nsectype = RBTDB_RDATATYPE_VALUE(0, rdtype);
}
}
@@ -3829,7 +3930,7 @@ add(dns_rbtdb_t *rbtdb, dns_rbtnode_t *rbtnode, rbtdb_version_t *rbtversion,
topheader != NULL;
topheader = topheader->next) {
if (topheader->type == newheader->type ||
- topheader->type == nsecype)
+ topheader->type == nsectype)
break;
topheader_prev = topheader;
}
@@ -4090,8 +4191,10 @@ addnoqname(dns_rbtdb_t *rbtdb, rdatasetheader_t *newheader,
RUNTIME_CHECK(result == ISC_R_SUCCESS);
noqname = isc_mem_get(mctx, sizeof(*noqname));
- if (noqname == NULL)
- return (ISC_R_NOMEMORY);
+ if (noqname == NULL) {
+ result = ISC_R_NOMEMORY;
+ goto cleanup;
+ }
dns_name_init(&noqname->name, NULL);
noqname->nsec = NULL;
noqname->nsecsig = NULL;
@@ -4112,6 +4215,8 @@ addnoqname(dns_rbtdb_t *rbtdb, rdatasetheader_t *newheader,
return (ISC_R_SUCCESS);
cleanup:
+ dns_rdataset_disassociate(&nsec);
+ dns_rdataset_disassociate(&nsecsig);
free_noqname(mctx, &noqname);
return(result);
}
@@ -4954,7 +5059,7 @@ static void
rdataset_clone(dns_rdataset_t *source, dns_rdataset_t *target) {
dns_db_t *db = source->private1;
dns_dbnode_t *node = source->private2;
- dns_dbnode_t *cloned_node;
+ dns_dbnode_t *cloned_node = NULL;
attachnode(db, node, &cloned_node);
*target = *source;
@@ -4985,9 +5090,8 @@ rdataset_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
dns_dbnode_t *cloned_node;
struct noqname *noqname = rdataset->private6;
+ cloned_node = NULL;
attachnode(db, node, &cloned_node);
- attachnode(db, node, &cloned_node);
-
nsec->methods = &rdataset_methods;
nsec->rdclass = db->rdclass;
nsec->type = dns_rdatatype_nsec;
@@ -5001,6 +5105,8 @@ rdataset_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
nsec->private5 = NULL;
nsec->private6 = NULL;
+ cloned_node = NULL;
+ attachnode(db, node, &cloned_node);
nsecsig->methods = &rdataset_methods;
nsecsig->rdclass = db->rdclass;
nsecsig->type = dns_rdatatype_rrsig;
@@ -5019,7 +5125,6 @@ rdataset_getnoqname(dns_rdataset_t *rdataset, dns_name_t *name,
return (ISC_R_SUCCESS);
}
-
/*
* Rdataset Iterator Methods
*/
diff --git a/lib/dns/resolver.c b/lib/dns/resolver.c
index 13744f9d..bda01480 100644
--- a/lib/dns/resolver.c
+++ b/lib/dns/resolver.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: resolver.c,v 1.218.2.18.4.36 2004/04/19 23:41:33 marka Exp $ */
+/* $Id: resolver.c,v 1.218.2.18.4.37 2004/05/14 05:06:39 marka Exp $ */
#include <config.h>
@@ -65,25 +65,28 @@
DNS_LOGCATEGORY_RESOLVER, \
DNS_LOGMODULE_RESOLVER, \
ISC_LOG_DEBUG(3), \
- "fctx %p: %s", fctx, (m))
+ "fctx %p(%s'): %s", fctx, fctx->info, (m))
#define FCTXTRACE2(m1, m2) \
isc_log_write(dns_lctx, \
DNS_LOGCATEGORY_RESOLVER, \
DNS_LOGMODULE_RESOLVER, \
ISC_LOG_DEBUG(3), \
- "fctx %p: %s %s", fctx, (m1), (m2))
+ "fctx %p(%s): %s %s", \
+ fctx, fctx->info, (m1), (m2))
#define FTRACE(m) isc_log_write(dns_lctx, \
DNS_LOGCATEGORY_RESOLVER, \
DNS_LOGMODULE_RESOLVER, \
ISC_LOG_DEBUG(3), \
- "fetch %p (fctx %p): %s", \
- fetch, fetch->private, (m))
+ "fetch %p (fctx %p(%s)): %s", \
+ fetch, fetch->private, \
+ fetch->private->info, (m))
#define QTRACE(m) isc_log_write(dns_lctx, \
DNS_LOGCATEGORY_RESOLVER, \
DNS_LOGMODULE_RESOLVER, \
ISC_LOG_DEBUG(3), \
- "resquery %p (fctx %p): %s", \
- query, query->fctx, (m))
+ "resquery %p (fctx %p(%s)): %s", \
+ query, query->fctx, \
+ query->fctx->info, (m))
#else
#define RTRACE(m)
#define RRTRACE(r, m)
@@ -152,6 +155,7 @@ struct fetchctx {
dns_rdatatype_t type;
unsigned int options;
unsigned int bucketnum;
+ char * info;
/* Locked by appropriate bucket lock. */
fetchstate state;
isc_boolean_t want_shutdown;
@@ -1121,6 +1125,8 @@ resquery_send(resquery_t *query) {
&secure_domain);
if (result != ISC_R_SUCCESS)
secure_domain = ISC_FALSE;
+ if (res->view->dlv != NULL)
+ secure_domain = ISC_TRUE;
if (secure_domain)
fctx->qmessage->flags |= DNS_MESSAGEFLAG_CD;
} else
@@ -2287,6 +2293,7 @@ fctx_destroy(fetchctx_t *fctx) {
dns_name_free(&fctx->name, res->mctx);
dns_db_detach(&fctx->cache);
dns_adb_detach(&fctx->adb);
+ isc_mem_free(res->mctx, fctx->info);
isc_mem_put(res->mctx, fctx, sizeof(*fctx));
LOCK(&res->nlock);
@@ -2575,6 +2582,8 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
isc_interval_t interval;
dns_fixedname_t qdomain;
unsigned int findoptions = 0;
+ char buf[DNS_NAME_FORMATSIZE + DNS_RDATATYPE_FORMATSIZE];
+ char typebuf[DNS_RDATATYPE_FORMATSIZE];
/*
* Caller must be holding the lock for bucket number 'bucketnum'.
@@ -2584,11 +2593,18 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
fctx = isc_mem_get(res->mctx, sizeof(*fctx));
if (fctx == NULL)
return (ISC_R_NOMEMORY);
+ dns_name_format(name, buf, sizeof(buf));
+ dns_rdatatype_format(type, typebuf, sizeof(typebuf));
+ strcat(buf, "/"); /* checked */
+ strcat(buf, typebuf); /* checked */
+ fctx->info = isc_mem_strdup(res->mctx, buf);
+ if (fctx->info == NULL)
+ goto cleanup_fetch;
FCTXTRACE("create");
dns_name_init(&fctx->name, NULL);
result = dns_name_dup(name, res->mctx, &fctx->name);
if (result != ISC_R_SUCCESS)
- goto cleanup_fetch;
+ goto cleanup_info;
dns_name_init(&fctx->domain, NULL);
dns_rdataset_init(&fctx->nameservers);
@@ -2761,6 +2777,9 @@ fctx_create(dns_resolver_t *res, dns_name_t *name, dns_rdatatype_t type,
cleanup_name:
dns_name_free(&fctx->name, res->mctx);
+ cleanup_info:
+ isc_mem_free(res->mctx, fctx->info);
+
cleanup_fetch:
isc_mem_put(res->mctx, fctx, sizeof(*fctx));
@@ -3091,7 +3110,6 @@ validated(isc_task_t *task, isc_event_t *event) {
ardataset, &eresult);
if (result != ISC_R_SUCCESS)
goto noanswer_response;
-
goto answer_response;
}
@@ -3152,8 +3170,9 @@ validated(isc_task_t *task, isc_event_t *event) {
goto cleanup_event;
}
+ answer_response:
/*
- * Cache any NS records that happened to be validate.
+ * Cache any NS/NSEC records that happened to be validated.
*/
result = dns_message_firstname(fctx->rmessage, DNS_SECTION_AUTHORITY);
while (result == ISC_R_SUCCESS) {
@@ -3163,14 +3182,15 @@ validated(isc_task_t *task, isc_event_t *event) {
for (rdataset = ISC_LIST_HEAD(name->list);
rdataset != NULL;
rdataset = ISC_LIST_NEXT(rdataset, link)) {
- if (rdataset->type != dns_rdatatype_ns ||
+ if ((rdataset->type != dns_rdatatype_ns &&
+ rdataset->type != dns_rdatatype_nsec) ||
rdataset->trust != dns_trust_secure)
continue;
for (sigrdataset = ISC_LIST_HEAD(name->list);
sigrdataset != NULL;
sigrdataset = ISC_LIST_NEXT(sigrdataset, link)) {
if (sigrdataset->type != dns_rdatatype_rrsig ||
- sigrdataset->covers != dns_rdatatype_ns)
+ sigrdataset->covers != rdataset->type)
continue;
break;
}
@@ -3197,7 +3217,6 @@ validated(isc_task_t *task, isc_event_t *event) {
result = ISC_R_SUCCESS;
- answer_response:
/*
* Respond with an answer, positive or negative,
* as opposed to an error. 'node' must be non-NULL.
@@ -3262,6 +3281,9 @@ cache_name(fetchctx_t *fctx, dns_name_t *name, isc_stdtime_t now) {
if (result != ISC_R_SUCCESS)
return (result);
+ if (res->view->dlv != NULL)
+ secure_domain = ISC_TRUE;
+
if ((fctx->options & DNS_FETCHOPT_NOVALIDATE) != 0)
need_validation = ISC_FALSE;
else
@@ -3686,6 +3708,9 @@ ncache_message(fetchctx_t *fctx, dns_rdatatype_t covers, isc_stdtime_t now) {
if (result != ISC_R_SUCCESS)
return (result);
+ if (res->view->dlv != NULL)
+ secure_domain = ISC_TRUE;
+
if ((fctx->options & DNS_FETCHOPT_NOVALIDATE) != 0)
need_validation = ISC_FALSE;
else
diff --git a/lib/dns/result.c b/lib/dns/result.c
index b5c11cea..eb8308a3 100644
--- a/lib/dns/result.c
+++ b/lib/dns/result.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.c,v 1.90.2.9.2.12 2004/04/15 23:56:30 marka Exp $ */
+/* $Id: result.c,v 1.90.2.9.2.13 2004/05/14 05:06:39 marka Exp $ */
#include <config.h>
@@ -150,7 +150,8 @@ static const char *text[DNS_R_NRESULTS] = {
"dynamic zone", /* 98 DNS_R_DYNAMIC */
"unknown command", /* 99 DNS_R_UNKNOWNCOMMAND */
- "must-be-secure" /* 100 DNS_R_MUSTBESECURE */
+ "must-be-secure", /* 100 DNS_R_MUSTBESECURE */
+ "covering NSEC record returned" /* 101 DNS_R_COVERINGNSEC */
};
static const char *rcode_text[DNS_R_NRCODERESULTS] = {
diff --git a/lib/dns/validator.c b/lib/dns/validator.c
index 43948f6d..1d46229b 100644
--- a/lib/dns/validator.c
+++ b/lib/dns/validator.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: validator.c,v 1.91.2.5.8.10 2004/04/15 23:56:30 marka Exp $ */
+/* $Id: validator.c,v 1.91.2.5.8.11 2004/05/14 05:06:40 marka Exp $ */
#include <config.h>
@@ -53,6 +53,7 @@
#define VALATTR_INSECURITY 0x0010
#define VALATTR_DLV 0x0020
#define VALATTR_DLVTRIED 0x0040
+#define VALATTR_DLVSEPTRIED 0x0080
#define VALATTR_NEEDNOQNAME 0x0100
#define VALATTR_NEEDNOWILDCARD 0x0200
@@ -68,6 +69,7 @@
#define NEEDNOWILDCARD(val) ((val->attributes & VALATTR_NEEDNOWILDCARD) != 0)
#define DLV(val) ((val->attributes & VALATTR_DLV) != 0)
#define DLVTRIED(val) ((val->attributes & VALATTR_DLVTRIED) != 0)
+#define DLVSEPTRIED(val) ((val->attributes & VALATTR_DLVSEPTRIED) != 0)
#define SHUTDOWN(v) (((v)->attributes & VALATTR_SHUTDOWN) != 0)
@@ -107,6 +109,9 @@ validator_logcreate(dns_validator_t *val,
static isc_result_t
dlv_validatezonekey(dns_validator_t *val);
+static isc_result_t
+finddlvsep(dns_validator_t *val, isc_boolean_t resume);
+
static void
validator_done(dns_validator_t *val, isc_result_t result) {
isc_task_t *task;
@@ -735,6 +740,16 @@ negauthvalidated(isc_task_t *task, isc_event_t *event) {
static inline isc_result_t
view_find(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type) {
+ dns_fixedname_t fixedname;
+ dns_name_t *foundname;
+ dns_rdata_nsec_t nsec;
+ dns_rdata_t rdata = DNS_RDATA_INIT;
+ isc_result_t result;
+ unsigned int options;
+ char buf1[DNS_NAME_FORMATSIZE];
+ char buf2[DNS_NAME_FORMATSIZE];
+ char buf3[DNS_NAME_FORMATSIZE];
+
if (dns_rdataset_isassociated(&val->frdataset))
dns_rdataset_disassociate(&val->frdataset);
if (dns_rdataset_isassociated(&val->fsigrdataset))
@@ -742,9 +757,106 @@ view_find(dns_validator_t *val, dns_name_t *name, dns_rdatatype_t type) {
if (val->view->zonetable == NULL)
return (ISC_R_CANCELED);
- return (dns_view_simplefind(val->view, name, type, 0,
- DNS_DBFIND_PENDINGOK, ISC_FALSE,
- &val->frdataset, &val->fsigrdataset));
+
+ options = DNS_DBFIND_PENDINGOK;
+ if (type == dns_rdatatype_dlv)
+ options |= DNS_DBFIND_COVERINGNSEC;
+ dns_fixedname_init(&fixedname);
+ foundname = dns_fixedname_name(&fixedname);
+ result = dns_view_find(val->view, name, type, 0, options,
+ ISC_FALSE, NULL, NULL, foundname,
+ &val->frdataset, &val->fsigrdataset);
+ if (result == DNS_R_NXDOMAIN) {
+ if (dns_rdataset_isassociated(&val->frdataset))
+ dns_rdataset_disassociate(&val->frdataset);
+ if (dns_rdataset_isassociated(&val->fsigrdataset))
+ dns_rdataset_disassociate(&val->fsigrdataset);
+ } else if (result == DNS_R_COVERINGNSEC) {
+ validator_log(val, ISC_LOG_DEBUG(3), "DNS_R_COVERINGNSEC");
+ /*
+ * Check if the returned NSEC covers the name.
+ */
+ INSIST(type == dns_rdatatype_dlv);
+ if (val->frdataset.trust != dns_trust_secure) {
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "covering nsec: trust %u",
+ val->frdataset.trust);
+ goto notfound;
+ }
+ result = dns_rdataset_first(&val->frdataset);
+ if (result != ISC_R_SUCCESS)
+ goto notfound;
+ dns_rdataset_current(&val->frdataset, &rdata);
+ if (dns_nsec_typepresent(&rdata, dns_rdatatype_ns) &&
+ !dns_nsec_typepresent(&rdata, dns_rdatatype_soa)) {
+ /* Parent NSEC record. */
+ if (dns_name_issubdomain(name, foundname)) {
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "covering nsec: for parent");
+ goto notfound;
+ }
+ }
+ result = dns_rdata_tostruct(&rdata, &nsec, NULL);
+ if (result != ISC_R_SUCCESS)
+ goto notfound;
+ if (dns_name_compare(foundname, &nsec.next) >= 0) {
+ /* End of zone chain. */
+ if (!dns_name_issubdomain(name, &nsec.next)) {
+ /*
+ * XXXMPA We could look for a parent NSEC
+ * at nsec.next and if found retest with
+ * this NSEC.
+ */
+ dns_rdata_freestruct(&nsec);
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "covering nsec: not in zone");
+ goto notfound;
+ }
+ } else if (dns_name_compare(name, &nsec.next) >= 0) {
+ /*
+ * XXXMPA We could check if this NSEC is at a zone
+ * apex and if the qname is not below it and look for
+ * a parent NSEC with the same name. This requires
+ * that we can cache both NSEC records which we
+ * currently don't support.
+ */
+ dns_rdata_freestruct(&nsec);
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "covering nsec: not in range");
+ goto notfound;
+ }
+ if (isc_log_wouldlog(dns_lctx,ISC_LOG_DEBUG(3))) {
+ dns_name_format(name, buf1, sizeof buf1);
+ dns_name_format(foundname, buf2, sizeof buf2);
+ dns_name_format(&nsec.next, buf3, sizeof buf3);
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "covering nsec found: '%s' '%s' '%s'",
+ buf1, buf2, buf3);
+ }
+ if (dns_rdataset_isassociated(&val->frdataset))
+ dns_rdataset_disassociate(&val->frdataset);
+ if (dns_rdataset_isassociated(&val->fsigrdataset))
+ dns_rdataset_disassociate(&val->fsigrdataset);
+ dns_rdata_freestruct(&nsec);
+ result = DNS_R_NCACHENXDOMAIN;
+ } else if (result != ISC_R_SUCCESS &&
+ result != DNS_R_GLUE &&
+ result != DNS_R_HINT &&
+ result != DNS_R_NCACHENXDOMAIN &&
+ result != DNS_R_NCACHENXRRSET &&
+ result != DNS_R_NXRRSET &&
+ result != DNS_R_HINTNXRRSET &&
+ result != ISC_R_NOTFOUND) {
+ goto notfound;
+ }
+ return (result);
+
+ notfound:
+ if (dns_rdataset_isassociated(&val->frdataset))
+ dns_rdataset_disassociate(&val->frdataset);
+ if (dns_rdataset_isassociated(&val->fsigrdataset))
+ dns_rdataset_disassociate(&val->fsigrdataset);
+ return (ISC_R_NOTFOUND);
}
static inline isc_boolean_t
@@ -2097,9 +2209,127 @@ check_ds_algorithm(dns_validator_t *val, dns_name_t *name,
return (ISC_FALSE);
}
+static void
+dlv_fetched2(isc_task_t *task, isc_event_t *event) {
+ dns_fetchevent_t *devent;
+ dns_validator_t *val;
+ isc_boolean_t want_destroy;
+ isc_result_t eresult;
+ isc_result_t result;
+
+ UNUSED(task);
+ INSIST(event->ev_type == DNS_EVENT_FETCHDONE);
+ devent = (dns_fetchevent_t *)event;
+ val = devent->ev_arg;
+ eresult = devent->result;
+
+ isc_event_free(&event);
+ dns_resolver_destroyfetch(&val->fetch);
+
+ INSIST(val->event != NULL);
+ validator_log(val, ISC_LOG_DEBUG(3), "in dlv_fetched2: %s",
+ dns_result_totext(eresult));
+
+ LOCK(&val->lock);
+ if (eresult == ISC_R_SUCCESS) {
+ val->havedlvsep = ISC_TRUE;
+ result = proveunsecure(val, ISC_FALSE);
+ if (result != DNS_R_WAIT)
+ validator_done(val, result);
+ } else if (eresult == DNS_R_NXRRSET ||
+ eresult == DNS_R_NXDOMAIN ||
+ eresult == DNS_R_NCACHENXRRSET ||
+ eresult == DNS_R_NCACHENXDOMAIN) {
+ result = finddlvsep(val, ISC_TRUE);
+ if (result == ISC_R_SUCCESS) {
+ result = proveunsecure(val, ISC_FALSE);
+ if (result != DNS_R_WAIT)
+ validator_done(val, result);
+ } else if (result == ISC_R_NOTFOUND) {
+ validator_done(val, ISC_R_SUCCESS);
+ } else if (result != DNS_R_WAIT)
+ validator_done(val, result);
+ }
+ want_destroy = exit_check(val);
+ UNLOCK(&val->lock);
+ if (want_destroy)
+ destroy(val);
+}
+
+static isc_result_t
+finddlvsep(dns_validator_t *val, isc_boolean_t resume) {
+ dns_fixedname_t dlvfixed;
+ dns_name_t *dlvname;
+ dns_name_t *dlvsep;
+ dns_name_t noroot;
+ isc_result_t result;
+ unsigned int labels;
+
+ if (!resume) {
+ dns_fixedname_init(&val->dlvsep);
+ dlvsep = dns_fixedname_name(&val->dlvsep);
+ dns_name_copy(val->event->name, dlvsep, NULL);
+ val->attributes |= VALATTR_DLVSEPTRIED;
+ } else {
+ dlvsep = dns_fixedname_name(&val->dlvsep);
+ labels = dns_name_countlabels(dlvsep);
+ dns_name_getlabelsequence(dlvsep, 1, labels - 1, dlvsep);
+ }
+ dns_name_init(&noroot, NULL);
+ dns_fixedname_init(&dlvfixed);
+ dlvname = dns_fixedname_name(&dlvfixed);
+ labels = dns_name_countlabels(dlvsep);
+ dns_name_getlabelsequence(dlvsep, 0, labels - 1, &noroot);
+ result = dns_name_concatenate(&noroot, val->view->dlv, dlvname, NULL);
+ while (result == ISC_R_NOSPACE) {
+ labels = dns_name_countlabels(dlvsep);
+ dns_name_getlabelsequence(dlvsep, 1, labels - 1, dlvsep);
+ dns_name_getlabelsequence(dlvsep, 0, labels - 2, &noroot);
+ result = dns_name_concatenate(&noroot, val->view->dlv,
+ dlvname, NULL);
+ }
+ if (result != ISC_R_SUCCESS) {
+ validator_log(val, ISC_LOG_DEBUG(2), "DLV concatenate failed");
+ return (DNS_R_NOVALIDSIG);
+ }
+
+ while (dns_name_countlabels(dlvname) >
+ dns_name_countlabels(val->view->dlv))
+ {
+ result = view_find(val, dlvname, dns_rdatatype_dlv);
+ if (result == ISC_R_SUCCESS) {
+ if (val->frdataset.trust < dns_trust_secure)
+ return (DNS_R_NOVALIDSIG);
+ val->havedlvsep = ISC_TRUE;
+ return (ISC_R_SUCCESS);
+ }
+ if (result == ISC_R_NOTFOUND) {
+ result = create_fetch(val, dlvname, dns_rdatatype_dlv,
+ dlv_fetched2, "finddlvsep");
+ if (result != ISC_R_SUCCESS)
+ return (result);
+ return (DNS_R_WAIT);
+ }
+ if (result != DNS_R_NXRRSET &&
+ result != DNS_R_NXDOMAIN &&
+ result != DNS_R_NCACHENXRRSET &&
+ result != DNS_R_NCACHENXDOMAIN)
+ return (result);
+ /*
+ * Strip first labels from both dlvsep and dlvname.
+ */
+ labels = dns_name_countlabels(dlvsep);
+ dns_name_getlabelsequence(dlvsep, 1, labels - 1, dlvsep);
+ labels = dns_name_countlabels(dlvname);
+ dns_name_getlabelsequence(dlvname, 1, labels - 1, dlvname);
+ }
+ return (ISC_R_NOTFOUND);
+}
+
static isc_result_t
proveunsecure(dns_validator_t *val, isc_boolean_t resume) {
isc_result_t result;
+ isc_result_t tresult;
dns_fixedname_t secroot;
dns_name_t *tname;
@@ -2110,11 +2340,30 @@ proveunsecure(dns_validator_t *val, isc_boolean_t resume) {
/*
* If the name is not under a security root, it must be insecure.
*/
- if (result == ISC_R_NOTFOUND)
- return (ISC_R_SUCCESS);
+ if (val->view->dlv != NULL && !DLVSEPTRIED(val) &&
+ !dns_name_issubdomain(val->event->name, val->view->dlv)) {
+ tresult = finddlvsep(val, ISC_FALSE);
+ if (tresult != ISC_R_NOTFOUND && tresult != ISC_R_SUCCESS) {
+ validator_log(val, ISC_LOG_DEBUG(3),
+ "finddlvsep returned: %s",
+ dns_result_totext(tresult));
+ return (tresult);
+ }
+ }
- else if (result != ISC_R_SUCCESS)
+ if (result == ISC_R_NOTFOUND) {
+ if (!val->havedlvsep)
+ return (ISC_R_SUCCESS);
+ dns_name_copy(dns_fixedname_name(&val->dlvsep),
+ dns_fixedname_name(&secroot), NULL);
+ } else if (result != ISC_R_SUCCESS)
return (result);
+ else if (val->havedlvsep &&
+ dns_name_issubdomain(dns_fixedname_name(&val->dlvsep),
+ dns_fixedname_name(&secroot))) {
+ dns_name_copy(dns_fixedname_name(&val->dlvsep),
+ dns_fixedname_name(&secroot), NULL);
+ }
if (!resume) {
val->labels =
@@ -2427,6 +2676,7 @@ dns_validator_create(dns_view_t *view, dns_name_t *name, dns_rdatatype_t type,
val->nsecset = NULL;
val->soaname = NULL;
val->seensig = ISC_FALSE;
+ val->havedlvsep = ISC_FALSE;
val->mustbesecure = dns_resolver_getmustbesecure(view->resolver, name);
dns_rdataset_init(&val->frdataset);
dns_rdataset_init(&val->fsigrdataset);
diff --git a/lib/isc/api b/lib/isc/api
index 75a50276..0ab1e92d 100644
--- a/lib/isc/api
+++ b/lib/isc/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 10
-LIBREVISION = 0
+LIBREVISION = 1
LIBAGE = 1
diff --git a/lib/isc/include/isc/result.h b/lib/isc/include/isc/result.h
index fd35f867..93f7cefb 100644
--- a/lib/isc/include/isc/result.h
+++ b/lib/isc/include/isc/result.h
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.h,v 1.57.2.2.8.4 2004/03/08 09:04:53 marka Exp $ */
+/* $Id: result.h,v 1.57.2.2.8.5 2004/05/15 03:46:13 jinmei Exp $ */
#ifndef ISC_RESULT_H
#define ISC_RESULT_H 1
@@ -82,11 +82,12 @@
#define ISC_R_BADNUMBER 56 /* not a valid number */
#define ISC_R_DISABLED 57 /* disabled */
#define ISC_R_MAXSIZE 58 /* max size */
+#define ISC_R_BADADDRESSFORM 59 /* invalid address format */
/*
* Not a result code: the number of results.
*/
-#define ISC_R_NRESULTS 59
+#define ISC_R_NRESULTS 60
ISC_LANG_BEGINDECLS
diff --git a/lib/isc/netaddr.c b/lib/isc/netaddr.c
index a658d254..712ad2c1 100644
--- a/lib/isc/netaddr.c
+++ b/lib/isc/netaddr.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netaddr.c,v 1.18.12.8 2004/03/08 09:04:49 marka Exp $ */
+/* $Id: netaddr.c,v 1.18.12.9 2004/05/15 03:46:12 jinmei Exp $ */
#include <config.h>
@@ -47,7 +47,8 @@ isc_netaddr_equal(const isc_netaddr_t *a, const isc_netaddr_t *b) {
break;
case AF_INET6:
if (memcmp(&a->type.in6, &b->type.in6,
- sizeof(a->type.in6)) != 0)
+ sizeof(a->type.in6)) != 0 ||
+ a->zone != b->zone)
return (ISC_FALSE);
break;
default:
diff --git a/lib/isc/result.c b/lib/isc/result.c
index e1d854cd..12f767f0 100644
--- a/lib/isc/result.c
+++ b/lib/isc/result.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.c,v 1.56.2.2.8.5 2004/03/08 09:04:50 marka Exp $ */
+/* $Id: result.c,v 1.56.2.2.8.6 2004/05/15 03:46:12 jinmei Exp $ */
#include <config.h>
@@ -96,7 +96,8 @@ static const char *text[ISC_R_NRESULTS] = {
"soft quota reached", /* 55 */
"not a valid number", /* 56 */
"disabled", /* 57 */
- "max size" /* 58 */
+ "max size", /* 58 */
+ "invalid address format" /* 59 */
};
#define ISC_RESULT_RESULTSET 2
diff --git a/lib/isc/sockaddr.c b/lib/isc/sockaddr.c
index b222f4e8..4c47e4e0 100644
--- a/lib/isc/sockaddr.c
+++ b/lib/isc/sockaddr.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sockaddr.c,v 1.48.2.1.2.9 2004/03/08 09:04:50 marka Exp $ */
+/* $Id: sockaddr.c,v 1.48.2.1.2.10 2004/05/15 03:46:12 jinmei Exp $ */
#include <config.h>
@@ -57,6 +57,10 @@ isc_sockaddr_equal(const isc_sockaddr_t *a, const isc_sockaddr_t *b) {
if (memcmp(&a->type.sin6.sin6_addr, &b->type.sin6.sin6_addr,
sizeof(a->type.sin6.sin6_addr)) != 0)
return (ISC_FALSE);
+#ifdef ISC_PLATFORM_HAVESCOPEID
+ if (a->type.sin6.sin6_scope_id != b->type.sin6.sin6_scope_id)
+ return (ISC_FALSE);
+#endif
if (a->type.sin6.sin6_port != b->type.sin6.sin6_port)
return (ISC_FALSE);
break;
@@ -86,6 +90,10 @@ isc_sockaddr_eqaddr(const isc_sockaddr_t *a, const isc_sockaddr_t *b) {
if (memcmp(&a->type.sin6.sin6_addr, &b->type.sin6.sin6_addr,
sizeof(a->type.sin6.sin6_addr)) != 0)
return (ISC_FALSE);
+#ifdef ISC_PLATFORM_HAVESCOPEID
+ if (a->type.sin6.sin6_scope_id != b->type.sin6.sin6_scope_id)
+ return (ISC_FALSE);
+#endif
break;
default:
if (memcmp(&a->type, &b->type, a->length) != 0)
diff --git a/lib/isc/unix/ifiter_ioctl.c b/lib/isc/unix/ifiter_ioctl.c
index 50ce3772..2b625437 100644
--- a/lib/isc/unix/ifiter_ioctl.c
+++ b/lib/isc/unix/ifiter_ioctl.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.10 2004/04/15 07:03:50 marka Exp $ */
+/* $Id: ifiter_ioctl.c,v 1.19.2.5.2.11 2004/05/06 03:19:40 marka Exp $ */
/*
* Obtain the list of network interfaces using the SIOCGLIFCONF ioctl.
@@ -943,7 +943,7 @@ internal_next(isc_interfaceiter_t *iter) {
#endif
#ifdef HAVE_TRUCLUSTER
if (!iter->clua_done) {
- clua_result = clua_getaliasaddress(&intr->clua_sa,
+ clua_result = clua_getaliasaddress(&iter->clua_sa,
&iter->clua_context);
if (clua_result != CLUA_SUCCESS)
iter->clua_done = ISC_TRUE;
@@ -983,7 +983,7 @@ void internal_first(isc_interfaceiter_t *iter) {
#endif
#ifdef HAVE_TRUCLUSTER
iter->clua_context = 0;
- clua_result = clua_getaliasaddress(&intr->clua_sa,
+ clua_result = clua_getaliasaddress(&iter->clua_sa,
&iter->clua_context);
iter->clua_done = ISC_TF(clua_result != CLUA_SUCCESS);
#endif
diff --git a/lib/isc/unix/os.c b/lib/isc/unix/os.c
index 62d69a37..0838e127 100644
--- a/lib/isc/unix/os.c
+++ b/lib/isc/unix/os.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: os.c,v 1.11.12.3 2004/03/08 09:04:57 marka Exp $ */
+/* $Id: os.c,v 1.11.12.4 2004/05/18 01:39:20 marka Exp $ */
#include <config.h>
@@ -55,7 +55,8 @@ hpux_ncpus(void) {
#endif /* __hpux */
#if defined(HAVE_SYS_SYSCTL_H) && defined(HAVE_SYSCTLBYNAME)
-#include <sys/types.h>
+#include <sys/types.h> /* for FreeBSD */
+#include <sys/param.h> /* for NetBSD */
#include <sys/sysctl.h>
static int
diff --git a/lib/isc/win32/socket.c b/lib/isc/win32/socket.c
index c9a96d17..75184f1a 100644
--- a/lib/isc/win32/socket.c
+++ b/lib/isc/win32/socket.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: socket.c,v 1.5.2.13.2.8 2004/03/06 08:15:10 marka Exp $ */
+/* $Id: socket.c,v 1.5.2.13.2.10 2004/05/17 03:26:50 marka Exp $ */
/* This code has been rewritten to take advantage of Windows Sockets
* I/O Completion Ports and Events. I/O Completion Ports is ONLY
@@ -239,8 +239,10 @@ struct isc_socket {
listener : 1, /* listener socket */
connected : 1,
connecting : 1, /* connect pending */
- bound : 1; /* bound to local addr */
-
+ bound : 1, /* bound to local addr */
+ pending_free: 1;
+ unsigned int pending_recv;
+ unsigned int pending_send;
};
/*
@@ -346,11 +348,8 @@ static isc_threadresult_t WINAPI SocketIoThread(LPVOID ThreadContext);
static void free_socket(isc_socket_t **);
enum {
- SOCKET_CANCEL,
- SOCKET_SHUTDOWN,
SOCKET_RECV,
SOCKET_SEND,
- SOCK_ACCEPT
};
enum {
@@ -358,9 +357,6 @@ enum {
EVENT_DELETE
};
-#define SOCK_DEAD(s) ((s)->references == 0)
-
-
#if defined(ISC_SOCKET_DEBUG)
/*
* This is used to dump the contents of the sock structure
@@ -454,7 +450,7 @@ iocompletionport_createthreads(int total_threads, isc_socketmgr_t *manager) {
* We need at least one
*/
for (i = 0; i < total_threads; i++) {
- manager->hIOCPThreads[i] = CreateThread( NULL, 0, SocketIoThread,
+ manager->hIOCPThreads[i] = CreateThread(NULL, 0, SocketIoThread,
manager, 0,
&manager->dwIOCPThreadIds[i]);
if(manager->hIOCPThreads[i] == NULL) {
@@ -521,7 +517,8 @@ iocompletionport_exit(isc_socketmgr_t *manager) {
}
/*
- * Add sockets in here and pass the sock data in as part of the information needed
+ * Add sockets in here and pass the sock data in as part of the
+ * information needed.
*/
void
iocompletionport_update(isc_socket_t *sock) {
@@ -652,9 +649,10 @@ socket_eventlist_add(event_change_t *evchange, sock_event_list *evlist,
sock->evthread_id = GetCurrentThreadId();
return (ISC_TRUE);
}
+
/*
- * Note that the eventLock is locked before calling this function
- * All Events and associated sockes are closed here
+ * Note that the eventLock is locked before calling this function.
+ * All Events and associated sockets are closed here.
*/
isc_boolean_t
socket_eventlist_delete(event_change_t *evchange, sock_event_list *evlist) {
@@ -664,7 +662,7 @@ socket_eventlist_delete(event_change_t *evchange, sock_event_list *evlist) {
REQUIRE(evchange != NULL);
/* Make sure this is the right thread from which to delete the event */
- if(evchange->evthread_id != GetCurrentThreadId())
+ if (evchange->evthread_id != GetCurrentThreadId())
return (ISC_FALSE);
REQUIRE(evlist != NULL);
@@ -678,6 +676,7 @@ socket_eventlist_delete(event_change_t *evchange, sock_event_list *evlist) {
break;
}
}
+
/* Actual event start at 1 */
if (iEvent < 1)
return (ISC_FALSE);
@@ -686,6 +685,7 @@ socket_eventlist_delete(event_change_t *evchange, sock_event_list *evlist) {
evlist->aEventList[i] = evlist->aEventList[i + 1];
evlist->aSockList[i] = evlist->aSockList[i + 1];
}
+
evlist->aEventList[evlist->max_event - 1] = 0;
evlist->aSockList[evlist->max_event - 1] = NULL;
@@ -698,6 +698,7 @@ socket_eventlist_delete(event_change_t *evchange, sock_event_list *evlist) {
return (ISC_TRUE);
}
+
/*
* Get the event changes off of the list and apply the
* requested changes. The manager lock is taken out at
@@ -722,15 +723,20 @@ process_eventlist(sock_event_list *evlist, isc_socketmgr_t *manager) {
LOCK(&manager->lock);
- /* First the deletes */
+ /*
+ * First the deletes.
+ */
evchange = ISC_LIST_HEAD(manager->event_updates);
while (evchange != NULL) {
next = ISC_LIST_NEXT(evchange, link);
del = ISC_FALSE;
- if(evchange->action == EVENT_DELETE) {
+ if (evchange->action == EVENT_DELETE) {
del = socket_eventlist_delete(evchange, evlist);
- /* Delete only if this thread's socket list was updated */
+ /*
+ * Delete only if this thread's socket list was
+ * updated.
+ */
if (del) {
ISC_LIST_DEQUEUE(manager->event_updates,
evchange, link);
@@ -740,15 +746,21 @@ process_eventlist(sock_event_list *evlist, isc_socketmgr_t *manager) {
}
evchange = next;
}
- /* Now the adds */
+
+ /*
+ * Now the adds.
+ */
evchange = ISC_LIST_HEAD(manager->event_updates);
while (evchange != NULL) {
next = ISC_LIST_NEXT(evchange, link);
del = ISC_FALSE;
- if(evchange->action == EVENT_ADD) {
+ if (evchange->action == EVENT_ADD) {
del = socket_eventlist_add(evchange, evlist, manager);
- /* Delete only if this thread's socket list was updated */
+ /*
+ * Delete only if this thread's socket list was
+ * updated.
+ */
if (del) {
ISC_LIST_DEQUEUE(manager->event_updates,
evchange, link);
@@ -761,13 +773,15 @@ process_eventlist(sock_event_list *evlist, isc_socketmgr_t *manager) {
UNLOCK(&manager->lock);
return (ISC_R_SUCCESS);
}
+
/*
* Add the event list changes to the queue and notify the
* event loop
*/
static void
notify_eventlist(isc_socket_t *sock, isc_socketmgr_t *manager,
- unsigned int action) {
+ unsigned int action)
+{
event_change_t *evchange;
@@ -793,6 +807,7 @@ notify_eventlist(isc_socket_t *sock, isc_socketmgr_t *manager,
else
WSASetEvent(manager->prime_alert);
}
+
/*
* Note that the socket is already locked before calling this function
*/
@@ -830,6 +845,7 @@ socket_event_add(isc_socket_t *sock, long type) {
notify_eventlist(sock, sock->manager, EVENT_ADD);
return (ISC_R_SUCCESS);
}
+
/*
* Note that the socket is not locked before calling this function
*/
@@ -847,8 +863,8 @@ socket_event_delete(isc_socket_t *sock) {
sock->hAlert = NULL;
sock->evthread_id = 0;
}
-
}
+
/*
* Routine to cleanup and then close the socket.
* Only close the socket here if it is NOT associated
@@ -872,6 +888,7 @@ socket_close(isc_socket_t *sock) {
}
}
+
/*
* Initialize socket services
*/
@@ -893,7 +910,8 @@ BOOL InitSockets() {
int
internal_sendmsg(isc_socket_t *sock, IoCompletionInfo *lpo,
- struct msghdr *messagehdr, int flags, int *Error) {
+ struct msghdr *messagehdr, int flags, int *Error)
+{
int Result;
DWORD BytesSent;
DWORD Flags = flags;
@@ -918,19 +936,20 @@ internal_sendmsg(isc_socket_t *sock, IoCompletionInfo *lpo,
*Error = WSAGetLastError();
switch (*Error) {
+ case WSA_IO_INCOMPLETE :
+ case WSA_WAIT_IO_COMPLETION :
+ case WSA_IO_PENDING :
+ sock->pending_send++;
+ case NO_ERROR :
+ break;
- case NO_ERROR :
- case WSA_IO_INCOMPLETE :
- case WSA_WAIT_IO_COMPLETION :
- case WSA_IO_PENDING :
- break;
-
- default :
- return (-1);
- break;
- }
- }
- if(lpo != NULL)
+ default :
+ return (-1);
+ break;
+ }
+ } else
+ sock->pending_send++;
+ if (lpo != NULL)
return (0);
else
return (total_sent);
@@ -938,7 +957,8 @@ internal_sendmsg(isc_socket_t *sock, IoCompletionInfo *lpo,
int
internal_recvmsg(isc_socket_t *sock, IoCompletionInfo *lpo,
- struct msghdr *messagehdr, int flags, int *Error) {
+ struct msghdr *messagehdr, int flags, int *Error)
+{
DWORD Flags = 0;
DWORD NumBytes = 0;
int total_bytes = 0;
@@ -946,14 +966,14 @@ internal_recvmsg(isc_socket_t *sock, IoCompletionInfo *lpo,
*Error = 0;
Result = WSARecvFrom((SOCKET) sock->fd,
- messagehdr->msg_iov,
- messagehdr->msg_iovlen,
- &NumBytes,
- &Flags,
- messagehdr->msg_name,
- (int *)&(messagehdr->msg_namelen),
- (LPOVERLAPPED) lpo,
- NULL);
+ messagehdr->msg_iov,
+ messagehdr->msg_iovlen,
+ &NumBytes,
+ &Flags,
+ messagehdr->msg_name,
+ (int *)&(messagehdr->msg_namelen),
+ (LPOVERLAPPED) lpo,
+ NULL);
total_bytes = (int) NumBytes;
@@ -963,31 +983,32 @@ internal_recvmsg(isc_socket_t *sock, IoCompletionInfo *lpo,
*Error = WSAGetLastError();
switch (*Error) {
+ case WSA_IO_INCOMPLETE:
+ case WSA_WAIT_IO_COMPLETION:
+ case WSA_IO_PENDING:
+ sock->pending_recv++;
+ case NO_ERROR:
+ break;
- case NO_ERROR :
- case WSA_IO_INCOMPLETE :
- case WSA_WAIT_IO_COMPLETION :
- case WSA_IO_PENDING :
- break;
+ default :
+ return (-1);
+ break;
+ }
+ } else
+ sock->pending_recv++;
- default :
- return (-1);
- break;
- }
- }
/* Return the flags received in header */
messagehdr->msg_flags = Flags;
- if(lpo != NULL)
+ if (lpo != NULL)
return (-1);
else
return (total_bytes);
-
}
static void
-manager_log(isc_socketmgr_t *sockmgr,
- isc_logcategory_t *category, isc_logmodule_t *module, int level,
- const char *fmt, ...) {
+manager_log(isc_socketmgr_t *sockmgr, isc_logcategory_t *category,
+ isc_logmodule_t *module, int level, const char *fmt, ...)
+{
char msgbuf[2048];
va_list ap;
@@ -1007,11 +1028,13 @@ socket_log(isc_socket_t *sock, isc_sockaddr_t *address,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
isc_msgcat_t *msgcat, int msgset, int message,
const char *fmt, ...) ISC_FORMAT_PRINTF(9, 10);
+
static void
socket_log(isc_socket_t *sock, isc_sockaddr_t *address,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
isc_msgcat_t *msgcat, int msgset, int message,
- const char *fmt, ...) {
+ const char *fmt, ...)
+{
char msgbuf[2048];
char peerbuf[256];
va_list ap;
@@ -1058,6 +1081,7 @@ make_nonblock(SOCKET fd) {
return (ISC_R_SUCCESS);
}
+
/*
* Windows 2000 systems incorrectly cause UDP sockets using WASRecvFrom
* to not work correctly, returning a WSACONNRESET error when a WSASendTo
@@ -1107,7 +1131,8 @@ connection_reset_fix(SOCKET fd) {
static void
build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev,
struct msghdr *msg, char *cmsg,
- WSABUF *iov, size_t *write_countp) {
+ WSABUF *iov, size_t *write_countp)
+{
unsigned int iovcount;
isc_buffer_t *buffer;
isc_region_t used;
@@ -1194,7 +1219,8 @@ build_msghdr_send(isc_socket_t *sock, isc_socketevent_t *dev,
static void
build_msghdr_recv(isc_socket_t *sock, isc_socketevent_t *dev,
struct msghdr *msg, char *cmsg,
- WSABUF *iov, size_t *read_countp) {
+ WSABUF *iov, size_t *read_countp)
+{
unsigned int iovcount;
isc_buffer_t *buffer;
isc_region_t available;
@@ -1224,10 +1250,10 @@ build_msghdr_recv(isc_socket_t *sock, isc_socketevent_t *dev,
iov[0].len = read_count;
iovcount = 1;
} else {
- /*
- * Multibuffer I/O.
- * Skip empty buffers.
- */
+ /*
+ * Multibuffer I/O.
+ * Skip empty buffers.
+ */
while (buffer != NULL) {
REQUIRE(ISC_BUFFER_VALID(buffer));
if (isc_buffer_availablelength(buffer) != 0)
@@ -1266,7 +1292,8 @@ build_msghdr_recv(isc_socket_t *sock, isc_socketevent_t *dev,
static void
set_dev_address(isc_sockaddr_t *address, isc_socket_t *sock,
- isc_socketevent_t *dev) {
+ isc_socketevent_t *dev)
+{
if (sock->type == isc_sockettype_udp) {
if (address != NULL)
dev->address = *address;
@@ -1280,14 +1307,14 @@ set_dev_address(isc_sockaddr_t *address, isc_socket_t *sock,
static isc_socketevent_t *
allocate_socketevent(isc_socket_t *sock, isc_eventtype_t eventtype,
- isc_taskaction_t action, const void *arg) {
+ isc_taskaction_t action, const void *arg)
+{
isc_socketevent_t *ev;
ev = (isc_socketevent_t *)isc_event_allocate(sock->manager->mctx,
sock, eventtype,
action, arg,
sizeof(*ev));
-
if (ev == NULL)
return (NULL);
@@ -1324,7 +1351,8 @@ dump_msg(struct msghdr *msg, isc_socket_t *sock) {
static int
completeio_recv(isc_socket_t *sock, isc_socketevent_t *dev,
- struct msghdr *messagehdr, int cc, int recv_errno) {
+ struct msghdr *messagehdr, int cc, int recv_errno)
+{
size_t actual_count;
isc_buffer_t *buffer;
@@ -1442,31 +1470,27 @@ completeio_recv(isc_socket_t *sock, isc_socketevent_t *dev,
dev->result = ISC_R_SUCCESS;
return (DOIO_SUCCESS);
}
+
static int
startio_recv(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes,
- BOOL bwait, int *recv_errno) {
+ int *recv_errno)
+{
char *cmsg = NULL;
char strbuf[ISC_STRERRORSIZE];
IoCompletionInfo *lpo;
int status;
- struct msghdr messagehdr;
struct msghdr *msghdr;
- if (!bwait) {
- lpo = (IoCompletionInfo *) HeapAlloc(hHeapHandle,
- HEAP_ZERO_MEMORY, sizeof(IoCompletionInfo));
- lpo->request_type = SOCKET_RECV;
- lpo->dev = dev;
- msghdr = &lpo->messagehdr;
- } else { /* Wait for recv to complete */
- lpo = NULL;
- msghdr = &messagehdr;
- }
- sock->references++;
+ lpo = (IoCompletionInfo *) HeapAlloc(hHeapHandle,
+ HEAP_ZERO_MEMORY,
+ sizeof(IoCompletionInfo));
+ lpo->request_type = SOCKET_RECV;
+ lpo->dev = dev;
+ msghdr = &lpo->messagehdr;
memset(msghdr, 0, sizeof(struct msghdr));
build_msghdr_recv(sock, dev, msghdr, cmsg, sock->iov,
- &(sock->totalBytes));
+ &(sock->totalBytes));
#if defined(ISC_SOCKET_DEBUG)
dump_msg(msghdr, sock);
@@ -1485,13 +1509,12 @@ startio_recv(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes,
socket_log(sock, NULL, IOEVENT,
isc_msgcat, ISC_MSGSET_SOCKET,
ISC_MSG_DOIORECV,
- "startio_recv: recvmsg(%d) %d bytes, err %d/%s",
+ "startio_recv: recvmsg(%d) %d bytes, "
+ "err %d/%s",
sock->fd, *nbytes, *recv_errno, strbuf);
}
- status = completeio_recv(sock, dev, msghdr, *nbytes, *recv_errno);
- if(status != DOIO_SOFT) {
- sock->references--;
- }
+ status = completeio_recv(sock, dev, msghdr,
+ *nbytes, *recv_errno);
goto done;
}
dev->result = ISC_R_SUCCESS;
@@ -1499,6 +1522,7 @@ startio_recv(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes,
done:
return (status);
}
+
/*
* Returns:
* DOIO_SUCCESS The operation succeeded. dev->result contains
@@ -1513,8 +1537,9 @@ done:
* No other return values are possible.
*/
static int
-completeio_send(isc_socket_t *sock, isc_socketevent_t *dev, struct msghdr *messagehdr, int cc,
- int send_errno) {
+completeio_send(isc_socket_t *sock, isc_socketevent_t *dev,
+ struct msghdr *messagehdr, int cc, int send_errno)
+{
char addrbuf[ISC_SOCKADDR_FORMATSIZE];
char strbuf[ISC_STRERRORSIZE];
@@ -1592,28 +1617,24 @@ completeio_send(isc_socket_t *sock, isc_socketevent_t *dev, struct msghdr *messa
dev->result = ISC_R_SUCCESS;
return (DOIO_SUCCESS);
}
+
static int
startio_send(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes,
- BOOL bwait, int *send_errno) {
+ int *send_errno)
+{
char *cmsg = NULL;
char strbuf[ISC_STRERRORSIZE];
IoCompletionInfo *lpo;
int status;
- struct msghdr messagehdr;
struct msghdr *msghdr;
- if (!bwait) {
- lpo = (IoCompletionInfo *) HeapAlloc(hHeapHandle,
- HEAP_ZERO_MEMORY, sizeof(IoCompletionInfo));
- lpo->request_type = SOCKET_SEND;
- lpo->dev = dev;
- msghdr = &lpo->messagehdr;
- } else { /* Wait for send to complete */
- lpo = NULL;
- msghdr = &messagehdr;
- }
+ lpo = (IoCompletionInfo *) HeapAlloc(hHeapHandle,
+ HEAP_ZERO_MEMORY,
+ sizeof(IoCompletionInfo));
+ lpo->request_type = SOCKET_SEND;
+ lpo->dev = dev;
+ msghdr = &lpo->messagehdr;
memset(msghdr, 0, sizeof(struct msghdr));
- sock->references++;
build_msghdr_send(sock, dev, msghdr, cmsg, sock->iov,
&(sock->totalBytes));
@@ -1631,13 +1652,12 @@ startio_send(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes,
socket_log(sock, NULL, IOEVENT,
isc_msgcat, ISC_MSGSET_SOCKET,
ISC_MSG_INTERNALSEND,
- "startio_send: internal_sendmsg(%d) %d bytes, err %d/%s",
+ "startio_send: internal_sendmsg(%d) %d "
+ "bytes, err %d/%s",
sock->fd, *nbytes, *send_errno, strbuf);
}
- status = completeio_send(sock, dev, msghdr, *nbytes, *send_errno);
- if(status != DOIO_SOFT) {
- sock->references--;
- }
+ status = completeio_send(sock, dev, msghdr,
+ *nbytes, *send_errno);
goto done;
}
dev->result = ISC_R_SUCCESS;
@@ -1645,6 +1665,7 @@ startio_send(isc_socket_t *sock, isc_socketevent_t *dev, int *nbytes,
done:
return (status);
}
+
/*
* Kill.
*
@@ -1655,6 +1676,7 @@ static void
destroy_socket(isc_socket_t **sockp) {
isc_socket_t *sock = *sockp;
isc_socketmgr_t *manager = sock->manager;
+ isc_boolean_t dofree = ISC_TRUE;
REQUIRE(sock != NULL);
@@ -1668,15 +1690,14 @@ destroy_socket(isc_socket_t **sockp) {
LOCK(&manager->lock);
- /*
- * No one has this socket open and the socket doesn't have to be
- * locked. The socket_close function makes sure that if needed
- * the event_wait loop removes any associated event from the list
- * of events being waited on.
- */
+ LOCK(&sock->lock);
socket_close(sock);
-
+ if (sock->pending_recv != 0 || sock->pending_send != 0) {
+ dofree = ISC_FALSE;
+ sock->pending_free = 1;
+ }
ISC_LIST_UNLINK(manager->socklist, sock, link);
+ UNLOCK(&sock->lock);
if (ISC_LIST_EMPTY(manager->socklist))
SIGNAL(&manager->shutdown_ok);
@@ -1684,10 +1705,10 @@ destroy_socket(isc_socket_t **sockp) {
/*
* XXX should reset manager->maxfd here
*/
-
UNLOCK(&manager->lock);
- free_socket(sockp);
+ if (dofree)
+ free_socket(sockp);
}
static isc_result_t
@@ -1721,6 +1742,9 @@ allocate_socket(isc_socketmgr_t *manager, isc_sockettype_t type,
sock->connect_ev = NULL;
sock->pending_accept = 0;
sock->pending_close = 0;
+ sock->pending_recv = 0;
+ sock->pending_send = 0;
+ sock->pending_free = 0;
sock->iocp = 0;
sock->listener = 0;
sock->connected = 0;
@@ -2066,14 +2090,6 @@ internal_accept(isc_socket_t *sock, int accept_errno) {
INSIST(sock->pending_accept == 1);
sock->pending_accept = 0;
- INSIST(sock->references > 0);
- sock->references--; /* the internal event is done with this socket */
- if (sock->references == 0) {
- UNLOCK(&sock->lock);
- destroy_socket(&sock);
- return;
- }
-
/*
* Check any possible error status from the event notification here.
* Note that we don't take any action since it was only
@@ -2285,18 +2301,6 @@ internal_connect(isc_socket_t *sock, int connect_errno) {
LOCK(&sock->lock);
/*
- * When the internal event was sent the reference count was bumped
- * to keep the socket around for us. Decrement the count here.
- */
- INSIST(sock->references > 0);
- sock->references--;
- if (sock->references == 0) {
- UNLOCK(&sock->lock);
- destroy_socket(&sock);
- return;
- }
-
- /*
* Has this event been canceled?
*/
dev = sock->connect_ev;
@@ -2366,7 +2370,9 @@ internal_connect(isc_socket_t *sock, int connect_errno) {
}
static void
-internal_recv(isc_socket_t *sock, isc_socketevent_t *dev, struct msghdr *messagehdr, int nbytes, int recv_errno) {
+internal_recv(isc_socket_t *sock, isc_socketevent_t *dev,
+ struct msghdr *messagehdr, int nbytes, int recv_errno)
+{
isc_socketevent_t *ldev;
int io_state;
int cc;
@@ -2378,14 +2384,8 @@ internal_recv(isc_socket_t *sock, isc_socketevent_t *dev, struct msghdr *message
isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALRECV,
"internal_recv: task got socket event %p", dev);
- INSIST(sock->references > 0);
- sock->references--; /* the internal event is done with this socket */
- if (sock->references == 0) {
- UNLOCK(&sock->lock);
- destroy_socket(&sock);
- return;
- }
-
+ INSIST(sock->pending_recv > 0);
+ sock->pending_recv--;
/* If the event is no longer in the list we can just return */
ldev = ISC_LIST_HEAD(sock->recv_list);
while (ldev != NULL && ldev != dev) {
@@ -2398,34 +2398,36 @@ internal_recv(isc_socket_t *sock, isc_socketevent_t *dev, struct msghdr *message
* Try to do as much I/O as possible on this socket. There are no
* limits here, currently.
*/
- switch (completeio_recv(sock, dev, messagehdr, nbytes, recv_errno)) {
- case DOIO_SOFT:
- cc = 0;
- recv_errno = 0;
- io_state = startio_recv(sock, dev, &cc, FALSE, &recv_errno);
- goto done;
+ switch (completeio_recv(sock, dev, messagehdr, nbytes, recv_errno)) {
+ case DOIO_SOFT:
+ cc = 0;
+ recv_errno = 0;
+ io_state = startio_recv(sock, dev, &cc, &recv_errno);
+ goto done;
- case DOIO_EOF:
- /*
- * read of 0 means the remote end was closed.
- * Run through the event queue and dispatch all
- * the events with an EOF result code.
- */
- dev->result = ISC_R_EOF;
- send_recvdone_event(sock, &dev);
- goto done;
+ case DOIO_EOF:
+ /*
+ * read of 0 means the remote end was closed.
+ * Run through the event queue and dispatch all
+ * the events with an EOF result code.
+ */
+ dev->result = ISC_R_EOF;
+ send_recvdone_event(sock, &dev);
+ goto done;
- case DOIO_SUCCESS:
- case DOIO_HARD:
- send_recvdone_event(sock, &dev);
- break;
- }
+ case DOIO_SUCCESS:
+ case DOIO_HARD:
+ send_recvdone_event(sock, &dev);
+ break;
+ }
done:
UNLOCK(&sock->lock);
}
static void
-internal_send(isc_socket_t *sock, isc_socketevent_t *dev, struct msghdr *messagehdr, int nbytes, int send_errno) {
+internal_send(isc_socket_t *sock, isc_socketevent_t *dev,
+ struct msghdr *messagehdr, int nbytes, int send_errno)
+{
isc_socketevent_t *ldev;
int io_state;
int cc;
@@ -2440,13 +2442,8 @@ internal_send(isc_socket_t *sock, isc_socketevent_t *dev, struct msghdr *message
isc_msgcat, ISC_MSGSET_SOCKET, ISC_MSG_INTERNALSEND,
"internal_send: task got socket event %p", dev);
- INSIST(sock->references > 0);
- sock->references--; /* the internal event is done with this socket */
- if (sock->references == 0) {
- UNLOCK(&sock->lock);
- destroy_socket(&sock);
- return;
- }
+ INSIST(sock->pending_send > 0);
+ sock->pending_send--;
/* If the event is no longer in the list we can just return */
ldev = ISC_LIST_HEAD(sock->send_list);
@@ -2463,7 +2460,7 @@ internal_send(isc_socket_t *sock, isc_socketevent_t *dev, struct msghdr *message
case DOIO_SOFT:
cc = 0;
send_errno = 0;
- io_state = startio_send(sock, dev, &cc, FALSE, &send_errno);
+ io_state = startio_send(sock, dev, &cc, &send_errno);
goto done;
case DOIO_HARD:
@@ -2487,8 +2484,6 @@ SocketIoThread(LPVOID ThreadContext) {
isc_socketmgr_t *manager = ThreadContext;
BOOL bSuccess = FALSE;
DWORD nbytes;
- DWORD tbytes;
- DWORD tflags;
IoCompletionInfo *lpo = NULL;
isc_socket_t *sock = NULL;
int request;
@@ -2504,7 +2499,9 @@ SocketIoThread(LPVOID ThreadContext) {
* preempt normal recv packet processing, but not
* higher than the timer sync thread.
*/
- if (!SetThreadPriority(GetCurrentThread(), THREAD_PRIORITY_ABOVE_NORMAL)) {
+ if (!SetThreadPriority(GetCurrentThread(),
+ THREAD_PRIORITY_ABOVE_NORMAL))
+ {
errval = GetLastError();
isc__strerror(errval, strbuf, sizeof(strbuf));
FATAL_ERROR(__FILE__, __LINE__,
@@ -2514,33 +2511,53 @@ SocketIoThread(LPVOID ThreadContext) {
strbuf);
}
-
/*
* Loop forever waiting on I/O Completions and then processing them
*/
- while(TRUE) {
+ while (TRUE) {
bSuccess = GetQueuedCompletionStatus (
manager->hIoCompletionPort,
&nbytes,
(LPDWORD) &sock,
(LPOVERLAPPED *)&lpo,
- INFINITE
- );
- if(lpo == NULL ) {
+ INFINITE);
+ if (lpo == NULL) {
/*
* Received request to exit
*/
break;
}
errstatus = 0;
- if(!bSuccess) {
+ if (!bSuccess) {
+ isc_boolean_t dofree = ISC_FALSE;
+ REQUIRE(VALID_SOCKET(sock));
/*
- * I/O Failure
- * Find out why
+ * Was this the socket closed under us?
*/
- WSAGetOverlappedResult(sock->fd, (LPWSAOVERLAPPED) &lpo,
- &tbytes, FALSE, &tflags);
- dev = lpo->dev;
+ errstatus = WSAGetLastError();
+ if (nbytes == 0 && errstatus == WSA_OPERATION_ABORTED) {
+ LOCK(&sock->lock);
+ switch (lpo->request_type) {
+ case SOCKET_RECV:
+ INSIST(sock->pending_recv > 0);
+ sock->pending_recv--;
+ break;
+ case SOCKET_SEND:
+ INSIST(sock->pending_send > 0);
+ sock->pending_send--;
+ break;
+ }
+ if (sock->pending_recv == 0 &&
+ sock->pending_send == 0 &&
+ sock->pending_free)
+ dofree = ISC_TRUE;
+ UNLOCK(&sock->lock);
+ if (dofree)
+ free_socket(&sock);
+ if (lpo != NULL)
+ HeapFree(hHeapHandle, 0, lpo);
+ continue;
+ }
}
request = lpo->request_type;
@@ -2548,20 +2565,17 @@ SocketIoThread(LPVOID ThreadContext) {
messagehdr = &lpo->messagehdr;
switch (request) {
- case SOCKET_CANCEL:
- break;
case SOCKET_RECV:
internal_recv(sock, dev, messagehdr, nbytes, errstatus);
break;
case SOCKET_SEND:
internal_send(sock, dev, messagehdr, nbytes, errstatus);
break;
- default:
- break; /* Unknown: Just ignore it */
}
if (lpo != NULL)
HeapFree(hHeapHandle, 0, lpo);
}
+
/*
* Exit Completion Port Thread
*/
@@ -2570,6 +2584,7 @@ SocketIoThread(LPVOID ThreadContext) {
ISC_MSG_EXITING, "SocketIoThread exiting"));
return ((isc_threadresult_t)0);
}
+
/*
* This is the thread that will loop forever, waiting for an event to
* happen.
@@ -2631,7 +2646,6 @@ event_wait(void *uap) {
} while (cc < 0 && !manager->bShutdown
&& manager->event_written == 0);
-
if (manager->bShutdown)
break;
@@ -2690,11 +2704,9 @@ event_wait(void *uap) {
if (wsock->listener == 1 &&
wsock->pending_accept == 0) {
wsock->pending_accept = 1;
- wsock->references++;
internal_accept(wsock, event_errno);
}
else {
- wsock->references++;
internal_connect(wsock, event_errno);
}
}
@@ -2706,6 +2718,7 @@ event_wait(void *uap) {
return ((isc_threadresult_t)0);
}
+
/*
* Create a new socket manager.
*/
@@ -2861,7 +2874,8 @@ isc_socketmgr_destroy(isc_socketmgr_t **managerp) {
static isc_result_t
socket_recv(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
- unsigned int flags) {
+ unsigned int flags)
+{
int io_state;
int cc = 0;
isc_task_t *ntask = NULL;
@@ -2872,7 +2886,7 @@ socket_recv(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
LOCK(&sock->lock);
iocompletionport_update(sock);
- io_state = startio_recv(sock, dev, &cc, FALSE, &recv_errno);
+ io_state = startio_recv(sock, dev, &cc, &recv_errno);
switch (io_state) {
case DOIO_SOFT:
@@ -3050,7 +3064,7 @@ socket_send(isc_socket_t *sock, isc_socketevent_t *dev, isc_task_t *task,
LOCK(&sock->lock);
have_lock = ISC_TRUE;
iocompletionport_update(sock);
- io_state = startio_send(sock, dev, &cc, FALSE, &send_errno);
+ io_state = startio_send(sock, dev, &cc, &send_errno);
switch (io_state) {
case DOIO_SOFT:
@@ -3643,7 +3657,6 @@ isc_socket_cancel(isc_socket_t *sock, isc_task_t *task, unsigned int how) {
isc_task_t *current_task;
dev = ISC_LIST_HEAD(sock->accept_list);
- socket_event_delete(sock);
while (dev != NULL) {
current_task = dev->ev_sender;
diff --git a/lib/isccfg/api b/lib/isccfg/api
index 7f2166be..1d2759ef 100644
--- a/lib/isccfg/api
+++ b/lib/isccfg/api
@@ -1,3 +1,3 @@
LIBINTERFACE = 1
-LIBREVISION = 2
+LIBREVISION = 3
LIBAGE = 0
diff --git a/lib/isccfg/parser.c b/lib/isccfg/parser.c
index 5101e031..f72c3c2b 100644
--- a/lib/isccfg/parser.c
+++ b/lib/isccfg/parser.c
@@ -15,7 +15,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: parser.c,v 1.70.2.20.2.17 2004/03/16 12:38:15 marka Exp $ */
+/* $Id: parser.c,v 1.70.2.20.2.18 2004/05/15 03:46:13 jinmei Exp $ */
#include <config.h>
@@ -1671,7 +1671,7 @@ token_addr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na) {
}
if ((flags & CFG_ADDR_V6OK) != 0 &&
strlen(s) <= 127U) {
- char buf[128];
+ char buf[128]; /* see lib/bind9/getaddresses.c */
char *d; /* zone delimiter */
isc_uint32_t zone = 0; /* scope zone ID */
@@ -1682,6 +1682,7 @@ token_addr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na) {
if (inet_pton(AF_INET6, buf, &in6a) == 1) {
if (d != NULL) {
+#ifdef ISC_PLATFORM_HAVESCOPEID
isc_result_t result;
result = isc_netscope_pton(AF_INET6,
@@ -1690,6 +1691,9 @@ token_addr(cfg_parser_t *pctx, unsigned int flags, isc_netaddr_t *na) {
&zone);
if (result != ISC_R_SUCCESS)
return (result);
+#else
+ return (ISC_R_BADADDRESSFORM);
+#endif
}
isc_netaddr_fromin6(na, &in6a);
diff --git a/version b/version
index 0ea2c839..3208ce4f 100644
--- a/version
+++ b/version
@@ -1,4 +1,4 @@
-# $Id: version,v 1.26.2.17.2.4 2004/04/29 03:23:36 marka Exp $
+# $Id: version,v 1.26.2.17.2.5 2004/05/17 13:28:21 marka Exp $
#
# This file must follow /bin/sh rules. It is imported directly via
# configure.
@@ -7,4 +7,4 @@ MAJORVER=9
MINORVER=3
PATCHVER=0
RELEASETYPE=beta
-RELEASEVER=3
+RELEASEVER=4