summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorflorian <florian@openbsd.org>2020-01-28 17:17:04 +0000
committerflorian <florian@openbsd.org>2020-01-28 17:17:04 +0000
commit4e472648a6e21397024c2ba85aa7660fd5baabb9 (patch)
tree717a3a0e4fd5aa12e90dee63b83806909910522f
parentWe only need to be able to parse tsig key files, rip out all the rest (diff)
downloadwireguard-openbsd-4e472648a6e21397024c2ba85aa7660fd5baabb9.tar.xz
wireguard-openbsd-4e472648a6e21397024c2ba85aa7660fd5baabb9.zip
Switch to Makefile based builds.
Delete a bunch of files that were no longer built but still lying around. Since there are no subdirectories below obj any more we need to prefix dns/{log,time,result}.c with dns_ to not conflict with the same names used by lib/isc/. OK sthen
-rw-r--r--usr.sbin/bind/Makefile52
-rw-r--r--usr.sbin/bind/bin/dig/Makefile.inc6
-rw-r--r--usr.sbin/bind/bin/dig/dig.c8
-rw-r--r--usr.sbin/bind/bin/dig/dighost.c14
-rw-r--r--usr.sbin/bind/bin/dig/host.c6
-rw-r--r--usr.sbin/bind/bin/dig/include/dig/dig.h3
-rw-r--r--usr.sbin/bind/bin/dig/nslookup.c4
-rw-r--r--usr.sbin/bind/lib/dns/Makefile.inc11
-rw-r--r--usr.sbin/bind/lib/dns/byaddr.c4
-rw-r--r--usr.sbin/bind/lib/dns/dns_log.c (renamed from usr.sbin/bind/lib/dns/log.c)0
-rw-r--r--usr.sbin/bind/lib/dns/dns_result.c (renamed from usr.sbin/bind/lib/dns/result.c)2
-rw-r--r--usr.sbin/bind/lib/dns/dns_time.c (renamed from usr.sbin/bind/lib/dns/time.c)2
-rw-r--r--usr.sbin/bind/lib/dns/dnssec.c4
-rw-r--r--usr.sbin/bind/lib/dns/ds.c4
-rw-r--r--usr.sbin/bind/lib/dns/dst_gost.h28
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/keydata.h4
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/nsec3.h4
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/rdataset.h4
-rw-r--r--usr.sbin/bind/lib/dns/include/dns/types.h4
-rw-r--r--usr.sbin/bind/lib/dns/keydata.c4
-rw-r--r--usr.sbin/bind/lib/dns/message.c4
-rw-r--r--usr.sbin/bind/lib/dns/ncache.c4
-rw-r--r--usr.sbin/bind/lib/dns/nsec.c4
-rw-r--r--usr.sbin/bind/lib/dns/nsec3.c4
-rw-r--r--usr.sbin/bind/lib/dns/rdata.c6
-rw-r--r--usr.sbin/bind/lib/dns/rdata/generic/cds_59.c2
-rw-r--r--usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.c4
-rw-r--r--usr.sbin/bind/lib/dns/rdata/generic/ds_43.c4
-rw-r--r--usr.sbin/bind/lib/dns/soa.c4
-rw-r--r--usr.sbin/bind/lib/dns/tsig.c4
-rw-r--r--usr.sbin/bind/lib/isc/Makefile.inc11
-rw-r--r--usr.sbin/bind/lib/isc/bitstring.c127
-rw-r--r--usr.sbin/bind/lib/isc/unix/Makefile.inc6
-rw-r--r--usr.sbin/bind/lib/isc/unix/ipv6.c26
-rw-r--r--usr.sbin/bind/lib/isccfg/Makefile.inc5
-rw-r--r--usr.sbin/bind/lib/lwres/Makefile.inc5
36 files changed, 153 insertions, 235 deletions
diff --git a/usr.sbin/bind/Makefile b/usr.sbin/bind/Makefile
new file mode 100644
index 00000000000..db909df536c
--- /dev/null
+++ b/usr.sbin/bind/Makefile
@@ -0,0 +1,52 @@
+# $OpenBSD: Makefile,v 1.1 2020/01/28 17:17:04 florian Exp $
+
+PROG= dig
+MAN=
+LINKS= ${BINDIR}/dig ${BINDIR}/host \
+ ${BINDIR}/dig ${BINDIR}/nslookup
+CLEANFILES+= code.h enumclass.h enumtype.h gen gen.d rdatastruct.h
+
+.include "${.CURDIR}/bin/dig/Makefile.inc"
+.include "${.CURDIR}/lib/dns/Makefile.inc"
+.include "${.CURDIR}/lib/isc/Makefile.inc"
+.include "${.CURDIR}/lib/isc/unix/Makefile.inc"
+.include "${.CURDIR}/lib/isccfg/Makefile.inc"
+.include "${.CURDIR}/lib/lwres/Makefile.inc"
+
+CFLAGS+= -Wall -I${.CURDIR} -I${.OBJDIR}
+CFLAGS+= -I ${.CURDIR}/bin/dig/include
+CFLAGS+= -I ${.CURDIR}/lib/dns/include
+CFLAGS+= -I ${.CURDIR}/lib/isc/include
+CFLAGS+= -I ${.CURDIR}/lib/isc/unix/include
+CFLAGS+= -I ${.CURDIR}/lib/isccfg/include
+CFLAGS+= -I ${.CURDIR}/lib/lwres/include
+CFLAGS+= -Wstrict-prototypes -Wmissing-prototypes
+CFLAGS+= -Wmissing-declarations
+CFLAGS+= -Wshadow -Wpointer-arith
+CFLAGS+= -Wsign-compare
+CFLAGS+= -DVERSION=\"9.10.8-P1\"
+YFLAGS=
+LDADD+= -lcrypto
+DPADD+= ${LIBCRYPTO}
+
+BUILDFIRST = enumtype.h enumclass.h rdatastruct.h code.h
+
+gen: lib/dns/gen.c
+ ${HOSTCC} ${CFLAGS} ${.CURDIR}/lib/dns/gen.c -o $@
+
+enumtype.h: gen
+ ./gen -s ${.CURDIR}/lib/dns -t > $@
+
+enumclass.h: gen
+ ./gen -s ${.CURDIR}/lib/dns -c > $@
+
+rdatastruct.h: gen lib/dns/rdata/rdatastructpre.h \
+ lib/dns/rdata/rdatastructsuf.h
+ ./gen -s ${.CURDIR}/lib/dns -i \
+ -P ${.CURDIR}/lib/dns/rdata/rdatastructpre.h \
+ -S ${.CURDIR}/lib/dns/rdata/rdatastructsuf.h > $@
+
+code.h: gen
+ ./gen -s ${.CURDIR}/lib/dns > code.h
+
+.include <bsd.prog.mk>
diff --git a/usr.sbin/bind/bin/dig/Makefile.inc b/usr.sbin/bind/bin/dig/Makefile.inc
new file mode 100644
index 00000000000..7466e33c626
--- /dev/null
+++ b/usr.sbin/bind/bin/dig/Makefile.inc
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile.inc,v 1.1 2020/01/28 17:17:04 florian Exp $
+
+.PATH: ${.CURDIR}/bin/dig
+
+SRCS+= dig.c dighost.c host.c nslookup.c
+MAN+= dig.1 host.1 nslookup.1
diff --git a/usr.sbin/bind/bin/dig/dig.c b/usr.sbin/bind/bin/dig/dig.c
index dd7b1528594..f13d05f5b4d 100644
--- a/usr.sbin/bind/bin/dig/dig.c
+++ b/usr.sbin/bind/bin/dig/dig.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dig.c,v 1.43 2020/01/26 14:50:47 jca Exp $ */
+/* $Id: dig.c,v 1.44 2020/01/28 17:17:04 florian Exp $ */
/*! \file */
#include <sys/cdefs.h>
@@ -2020,6 +2020,12 @@ dig_shutdown() {
/*% Main processing routine for dig */
int
main(int argc, char **argv) {
+ extern char *__progname;
+
+ if (strcmp("host", __progname) == 0)
+ return host_main(argc, argv);
+ if (strcmp("nslookup", __progname) == 0)
+ return nslookup_main(argc, argv);
dig_setup(argc, argv);
dig_query_setup(ISC_FALSE, ISC_FALSE, argc, argv);
diff --git a/usr.sbin/bind/bin/dig/dighost.c b/usr.sbin/bind/bin/dig/dighost.c
index 6cd485c34e2..707246cee9f 100644
--- a/usr.sbin/bind/bin/dig/dighost.c
+++ b/usr.sbin/bind/bin/dig/dighost.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dighost.c,v 1.40 2020/01/26 11:23:42 florian Exp $ */
+/* $Id: dighost.c,v 1.41 2020/01/28 17:17:04 florian Exp $ */
/*! \file
* \note
@@ -44,7 +44,7 @@
#include <dns/rdataclass.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/rdatatype.h>
#include <dns/result.h>
#include <dns/tsig.h>
@@ -90,8 +90,8 @@
#define NS_IN6ADDRSZ 16
#endif
-static lwres_conf_t confdata;
-static lwres_conf_t *lwconf = &confdata;
+static lwres_conf_t lwconfdata;
+static lwres_conf_t *lwconf = &lwconfdata;
dig_lookuplist_t lookup_list;
dig_serverlist_t server_list;
@@ -475,7 +475,7 @@ flush_server_list(void) {
/* this used to be bind9_getaddresses from lib/bind9 */
static isc_result_t
-get_addresses(const char *hostname, in_port_t port,
+get_addresses(const char *hostname, in_port_t dstport,
isc_sockaddr_t *addrs, int addrsize, int *addrcount)
{
struct addrinfo *ai = NULL, *tmpai, hints;
@@ -517,12 +517,12 @@ get_addresses(const char *hostname, in_port_t port,
if (tmpai->ai_family == AF_INET) {
struct sockaddr_in *sin;
sin = (struct sockaddr_in *)tmpai->ai_addr;
- isc_sockaddr_fromin(&addrs[i], &sin->sin_addr, port);
+ isc_sockaddr_fromin(&addrs[i], &sin->sin_addr, dstport);
} else {
struct sockaddr_in6 *sin6;
sin6 = (struct sockaddr_in6 *)tmpai->ai_addr;
isc_sockaddr_fromin6(&addrs[i], &sin6->sin6_addr,
- port);
+ dstport);
}
i++;
diff --git a/usr.sbin/bind/bin/dig/host.c b/usr.sbin/bind/bin/dig/host.c
index 4e177e94b5c..32ad3e30226 100644
--- a/usr.sbin/bind/bin/dig/host.c
+++ b/usr.sbin/bind/bin/dig/host.c
@@ -40,7 +40,7 @@
#include <dns/rdataclass.h>
#include <dns/rdataset.h>
#include <dns/rdatatype.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dig/dig.h>
@@ -96,7 +96,7 @@ struct rtype {
const char *text;
};
-struct rtype rtypes[] = {
+static struct rtype rtypes[] = {
{ 1, "has address" },
{ 2, "name server" },
{ 5, "is an alias for" },
@@ -806,7 +806,7 @@ parse_args(isc_boolean_t is_batchfile, int argc, char **argv) {
}
int
-main(int argc, char **argv) {
+host_main(int argc, char **argv) {
isc_result_t result;
tries = 2;
diff --git a/usr.sbin/bind/bin/dig/include/dig/dig.h b/usr.sbin/bind/bin/dig/include/dig/dig.h
index 7e428b43c7d..b153055854f 100644
--- a/usr.sbin/bind/bin/dig/include/dig/dig.h
+++ b/usr.sbin/bind/bin/dig/include/dig/dig.h
@@ -257,6 +257,9 @@ extern char *progname;
extern int tries;
extern int fatalexit;
+int host_main(int, char **);
+int nslookup_main(int, char **);
+
/*
* Routines in dighost.c.
*/
diff --git a/usr.sbin/bind/bin/dig/nslookup.c b/usr.sbin/bind/bin/dig/nslookup.c
index ed302c386b4..1430450c163 100644
--- a/usr.sbin/bind/bin/dig/nslookup.c
+++ b/usr.sbin/bind/bin/dig/nslookup.c
@@ -36,7 +36,7 @@
#include <dns/rdata.h>
#include <dns/rdataclass.h>
#include <dns/rdataset.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/rdatatype.h>
#include <dns/byaddr.h>
@@ -864,7 +864,7 @@ getinput(isc_task_t *task, isc_event_t *event) {
}
int
-main(int argc, char **argv) {
+nslookup_main(int argc, char **argv) {
isc_result_t result;
interactive = ISC_TF(isatty(0));
diff --git a/usr.sbin/bind/lib/dns/Makefile.inc b/usr.sbin/bind/lib/dns/Makefile.inc
new file mode 100644
index 00000000000..51cce21230f
--- /dev/null
+++ b/usr.sbin/bind/lib/dns/Makefile.inc
@@ -0,0 +1,11 @@
+# $OpenBSD: Makefile.inc,v 1.1 2020/01/28 17:17:05 florian Exp $
+
+.PATH: ${.CURDIR}/lib/dns
+
+SRCS+= byaddr.c callbacks.c compress.c dns_log.c dns_result.c dns_time.c
+SRCS+= dnssec.c ds.c dst_api.c dst_parse.c dst_result.c masterdump.c
+SRCS+= hmac_link.c key.c keydata.c lib.c name.c openssl_link.c message.c
+SRCS+= ncache.c nsec.c nsec3.c openssldh_link.c openssldsa_link.c
+SRCS+= opensslecdsa_link.c opensslrsa_link.c rcode.c rdata.c rdatalist.c
+SRCS+= rdataset.c soa.c tsig.c ttl.c
+
diff --git a/usr.sbin/bind/lib/dns/byaddr.c b/usr.sbin/bind/lib/dns/byaddr.c
index b1fb1e6d78b..4070276221e 100644
--- a/usr.sbin/bind/lib/dns/byaddr.c
+++ b/usr.sbin/bind/lib/dns/byaddr.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: byaddr.c,v 1.13 2020/01/22 13:02:09 florian Exp $ */
+/* $Id: byaddr.c,v 1.14 2020/01/28 17:17:05 florian Exp $ */
/*! \file */
@@ -34,7 +34,7 @@
#include <dns/rdata.h>
#include <dns/rdataset.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/result.h>
diff --git a/usr.sbin/bind/lib/dns/log.c b/usr.sbin/bind/lib/dns/dns_log.c
index db85be7b2b9..db85be7b2b9 100644
--- a/usr.sbin/bind/lib/dns/log.c
+++ b/usr.sbin/bind/lib/dns/dns_log.c
diff --git a/usr.sbin/bind/lib/dns/result.c b/usr.sbin/bind/lib/dns/dns_result.c
index df0377ebbed..2572defa30e 100644
--- a/usr.sbin/bind/lib/dns/result.c
+++ b/usr.sbin/bind/lib/dns/dns_result.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: result.c,v 1.9 2020/01/26 11:24:19 florian Exp $ */
+/* $Id: dns_result.c,v 1.1 2020/01/28 17:17:05 florian Exp $ */
/*! \file */
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/time.c b/usr.sbin/bind/lib/dns/dns_time.c
index a31d25999cc..d1d64d136f8 100644
--- a/usr.sbin/bind/lib/dns/time.c
+++ b/usr.sbin/bind/lib/dns/dns_time.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: time.c,v 1.11 2020/01/22 13:02:09 florian Exp $ */
+/* $Id: dns_time.c,v 1.1 2020/01/28 17:17:05 florian Exp $ */
/*! \file */
diff --git a/usr.sbin/bind/lib/dns/dnssec.c b/usr.sbin/bind/lib/dns/dnssec.c
index 917944a2032..4a98aba15e4 100644
--- a/usr.sbin/bind/lib/dns/dnssec.c
+++ b/usr.sbin/bind/lib/dns/dnssec.c
@@ -15,7 +15,7 @@
*/
/*
- * $Id: dnssec.c,v 1.15 2020/01/22 13:02:09 florian Exp $
+ * $Id: dnssec.c,v 1.16 2020/01/28 17:17:05 florian Exp $
*/
/*! \file */
@@ -43,7 +43,7 @@
#include <dns/rdata.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/result.h>
#include <dns/tsig.h> /* for DNS_TSIG_FUDGE */
diff --git a/usr.sbin/bind/lib/dns/ds.c b/usr.sbin/bind/lib/dns/ds.c
index ba91c419738..738603d01fc 100644
--- a/usr.sbin/bind/lib/dns/ds.c
+++ b/usr.sbin/bind/lib/dns/ds.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ds.c,v 1.7 2020/01/22 13:02:09 florian Exp $ */
+/* $Id: ds.c,v 1.8 2020/01/28 17:17:05 florian Exp $ */
/*! \file */
@@ -32,7 +32,7 @@
#include <dns/fixedname.h>
#include <dns/name.h>
#include <dns/rdata.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/result.h>
#include <dst/dst.h>
diff --git a/usr.sbin/bind/lib/dns/dst_gost.h b/usr.sbin/bind/lib/dns/dst_gost.h
deleted file mode 100644
index da792ddd1cf..00000000000
--- a/usr.sbin/bind/lib/dns/dst_gost.h
+++ /dev/null
@@ -1,28 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or 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.
- */
-
-#ifndef DST_GOST_H
-#define DST_GOST_H 1
-
-#include <isc/lang.h>
-#include <isc/log.h>
-#include <dst/result.h>
-
-#define ISC_GOST_DIGESTLENGTH 32U
-
-ISC_LANG_BEGINDECLS
-
-#endif /* DST_GOST_H */
diff --git a/usr.sbin/bind/lib/dns/include/dns/keydata.h b/usr.sbin/bind/lib/dns/include/dns/keydata.h
index 777228d9a20..67315b31d62 100644
--- a/usr.sbin/bind/lib/dns/include/dns/keydata.h
+++ b/usr.sbin/bind/lib/dns/include/dns/keydata.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: keydata.h,v 1.4 2020/01/20 18:51:52 florian Exp $ */
+/* $Id: keydata.h,v 1.5 2020/01/28 17:17:05 florian Exp $ */
#ifndef DNS_KEYDATA_H
#define DNS_KEYDATA_H 1
@@ -36,7 +36,7 @@
#include <isc/types.h>
#include <dns/types.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
ISC_LANG_BEGINDECLS
diff --git a/usr.sbin/bind/lib/dns/include/dns/nsec3.h b/usr.sbin/bind/lib/dns/include/dns/nsec3.h
index a91367e505c..4424cf6b0fe 100644
--- a/usr.sbin/bind/lib/dns/include/dns/nsec3.h
+++ b/usr.sbin/bind/lib/dns/include/dns/nsec3.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsec3.h,v 1.4 2020/01/20 18:51:52 florian Exp $ */
+/* $Id: nsec3.h,v 1.5 2020/01/28 17:17:05 florian Exp $ */
#ifndef DNS_NSEC3_H
#define DNS_NSEC3_H 1
@@ -25,7 +25,7 @@
#include <dns/name.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/types.h>
#define DNS_NSEC3_SALTSIZE 255
diff --git a/usr.sbin/bind/lib/dns/include/dns/rdataset.h b/usr.sbin/bind/lib/dns/include/dns/rdataset.h
index 67f43aa1a3c..97d58273d4f 100644
--- a/usr.sbin/bind/lib/dns/include/dns/rdataset.h
+++ b/usr.sbin/bind/lib/dns/include/dns/rdataset.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdataset.h,v 1.10 2020/01/18 16:55:01 florian Exp $ */
+/* $Id: rdataset.h,v 1.11 2020/01/28 17:17:05 florian Exp $ */
#ifndef DNS_RDATASET_H
#define DNS_RDATASET_H 1
@@ -55,7 +55,7 @@
#include <isc/stdtime.h>
#include <dns/types.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
ISC_LANG_BEGINDECLS
diff --git a/usr.sbin/bind/lib/dns/include/dns/types.h b/usr.sbin/bind/lib/dns/include/dns/types.h
index 584419f187d..9e1ae628350 100644
--- a/usr.sbin/bind/lib/dns/include/dns/types.h
+++ b/usr.sbin/bind/lib/dns/include/dns/types.h
@@ -197,8 +197,8 @@ typedef enum {
/*
* These are generated by gen.c.
*/
-#include <dns/enumtype.h> /* Provides dns_rdatatype_t. */
-#include <dns/enumclass.h> /* Provides dns_rdataclass_t. */
+#include "enumtype.h" /* Provides dns_rdatatype_t. */
+#include "enumclass.h" /* Provides dns_rdataclass_t. */
/*%
* rcodes.
diff --git a/usr.sbin/bind/lib/dns/keydata.c b/usr.sbin/bind/lib/dns/keydata.c
index d04e5a40a4b..2aa64578daa 100644
--- a/usr.sbin/bind/lib/dns/keydata.c
+++ b/usr.sbin/bind/lib/dns/keydata.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: keydata.c,v 1.6 2020/01/22 13:02:09 florian Exp $ */
+/* $Id: keydata.c,v 1.7 2020/01/28 17:17:05 florian Exp $ */
/*! \file */
@@ -26,7 +26,7 @@
#include <isc/util.h>
#include <dns/rdata.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/keydata.h>
isc_result_t
diff --git a/usr.sbin/bind/lib/dns/message.c b/usr.sbin/bind/lib/dns/message.c
index d8736903fc3..4d36ee8f237 100644
--- a/usr.sbin/bind/lib/dns/message.c
+++ b/usr.sbin/bind/lib/dns/message.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: message.c,v 1.17 2020/01/22 13:02:09 florian Exp $ */
+/* $Id: message.c,v 1.18 2020/01/28 17:17:05 florian Exp $ */
/*! \file */
@@ -42,7 +42,7 @@
#include <dns/rdata.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/result.h>
#include <dns/tsig.h>
#include <dns/ttl.h>
diff --git a/usr.sbin/bind/lib/dns/ncache.c b/usr.sbin/bind/lib/dns/ncache.c
index 0822c7b35a0..e9a1824403e 100644
--- a/usr.sbin/bind/lib/dns/ncache.c
+++ b/usr.sbin/bind/lib/dns/ncache.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ncache.c,v 1.11 2020/01/22 13:02:09 florian Exp $ */
+/* $Id: ncache.c,v 1.12 2020/01/28 17:17:05 florian Exp $ */
/*! \file */
@@ -29,7 +29,7 @@
#include <dns/rdata.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#define DNS_NCACHE_RDATA 20U
diff --git a/usr.sbin/bind/lib/dns/nsec.c b/usr.sbin/bind/lib/dns/nsec.c
index 35c5c503777..cb14733c620 100644
--- a/usr.sbin/bind/lib/dns/nsec.c
+++ b/usr.sbin/bind/lib/dns/nsec.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsec.c,v 1.7 2020/01/22 13:02:09 florian Exp $ */
+/* $Id: nsec.c,v 1.8 2020/01/28 17:17:05 florian Exp $ */
/*! \file */
@@ -30,7 +30,7 @@
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/result.h>
#include <dst/dst.h>
diff --git a/usr.sbin/bind/lib/dns/nsec3.c b/usr.sbin/bind/lib/dns/nsec3.c
index 6a70369ac3a..ecb537219bc 100644
--- a/usr.sbin/bind/lib/dns/nsec3.c
+++ b/usr.sbin/bind/lib/dns/nsec3.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: nsec3.c,v 1.7 2020/01/22 13:02:09 florian Exp $ */
+/* $Id: nsec3.c,v 1.8 2020/01/28 17:17:05 florian Exp $ */
@@ -41,7 +41,7 @@
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/result.h>
#define CHECK(x) do { \
diff --git a/usr.sbin/bind/lib/dns/rdata.c b/usr.sbin/bind/lib/dns/rdata.c
index bdfa34be6ae..42ea72412e1 100644
--- a/usr.sbin/bind/lib/dns/rdata.c
+++ b/usr.sbin/bind/lib/dns/rdata.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdata.c,v 1.19 2020/01/22 13:02:09 florian Exp $ */
+/* $Id: rdata.c,v 1.20 2020/01/28 17:17:05 florian Exp $ */
/*! \file */
@@ -36,14 +36,14 @@
#include <dns/cert.h>
#include <dns/compress.h>
#include <dns/dsdigest.h>
-#include <dns/enumtype.h>
+#include "enumtype.h"
#include <dns/keyflags.h>
#include <dns/keyvalues.h>
#include <dns/message.h>
#include <dns/rcode.h>
#include <dns/rdata.h>
#include <dns/rdataclass.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/rdatatype.h>
#include <dns/result.h>
#include <dns/secalg.h>
diff --git a/usr.sbin/bind/lib/dns/rdata/generic/cds_59.c b/usr.sbin/bind/lib/dns/rdata/generic/cds_59.c
index 1c6920ca8b9..76c6b34b63f 100644
--- a/usr.sbin/bind/lib/dns/rdata/generic/cds_59.c
+++ b/usr.sbin/bind/lib/dns/rdata/generic/cds_59.c
@@ -26,8 +26,6 @@
#include <dns/ds.h>
-#include "dst_gost.h"
-
static inline isc_result_t
fromtext_cds(ARGS_FROMTEXT) {
diff --git a/usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.c b/usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.c
index 24ccd7fff48..71f4cecb0fc 100644
--- a/usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.c
+++ b/usr.sbin/bind/lib/dns/rdata/generic/dlv_32769.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: dlv_32769.c,v 1.6 2020/01/20 18:51:53 florian Exp $ */
+/* $Id: dlv_32769.c,v 1.7 2020/01/28 17:17:05 florian Exp $ */
/* RFC3658 */
@@ -28,8 +28,6 @@
#include <dns/ds.h>
-#include "dst_gost.h"
-
static inline isc_result_t
fromtext_dlv(ARGS_FROMTEXT) {
diff --git a/usr.sbin/bind/lib/dns/rdata/generic/ds_43.c b/usr.sbin/bind/lib/dns/rdata/generic/ds_43.c
index 8b69279df5e..c7d897ceac4 100644
--- a/usr.sbin/bind/lib/dns/rdata/generic/ds_43.c
+++ b/usr.sbin/bind/lib/dns/rdata/generic/ds_43.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ds_43.c,v 1.7 2020/01/20 18:51:53 florian Exp $ */
+/* $Id: ds_43.c,v 1.8 2020/01/28 17:17:05 florian Exp $ */
/* RFC3658 */
@@ -29,8 +29,6 @@
#include <dns/ds.h>
-#include "dst_gost.h"
-
static inline isc_result_t
generic_fromtext_ds(ARGS_FROMTEXT) {
isc_token_t token;
diff --git a/usr.sbin/bind/lib/dns/soa.c b/usr.sbin/bind/lib/dns/soa.c
index 93bd81e7bb6..bf994ce6623 100644
--- a/usr.sbin/bind/lib/dns/soa.c
+++ b/usr.sbin/bind/lib/dns/soa.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: soa.c,v 1.6 2020/01/22 13:02:09 florian Exp $ */
+/* $Id: soa.c,v 1.7 2020/01/28 17:17:05 florian Exp $ */
/*! \file */
@@ -25,7 +25,7 @@
#include <isc/util.h>
#include <dns/rdata.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/soa.h>
static inline uint32_t
diff --git a/usr.sbin/bind/lib/dns/tsig.c b/usr.sbin/bind/lib/dns/tsig.c
index a32cf9bd3f0..6f02f4b8917 100644
--- a/usr.sbin/bind/lib/dns/tsig.c
+++ b/usr.sbin/bind/lib/dns/tsig.c
@@ -15,7 +15,7 @@
*/
/*
- * $Id: tsig.c,v 1.17 2020/01/22 13:02:09 florian Exp $
+ * $Id: tsig.c,v 1.18 2020/01/28 17:17:05 florian Exp $
*/
/*! \file */
@@ -40,7 +40,7 @@
#include <dns/rdata.h>
#include <dns/rdatalist.h>
#include <dns/rdataset.h>
-#include <dns/rdatastruct.h>
+#include "rdatastruct.h"
#include <dns/result.h>
#include <dns/tsig.h>
diff --git a/usr.sbin/bind/lib/isc/Makefile.inc b/usr.sbin/bind/lib/isc/Makefile.inc
new file mode 100644
index 00000000000..eb6eca3b97d
--- /dev/null
+++ b/usr.sbin/bind/lib/isc/Makefile.inc
@@ -0,0 +1,11 @@
+# $OpenBSD: Makefile.inc,v 1.1 2020/01/28 17:17:06 florian Exp $
+
+.PATH: ${.CURDIR}/lib/isc
+
+SRCS+= aes.c assertions.c base32.c base64.c netaddr.c buffer.c bufferlist.c
+SRCS+= commandline.c error.c event.c hash.c heap.c hex.c hmacmd5.c hmacsha.c
+SRCS+= inet_aton.c iterated_hash.c lex.c log.c md5.c regex.c sockaddr.c
+SRCS+= task.c result.c netscope.c parseint.c refcount.c region.c timer.c
+SRCS+= safe.c serial.c sha1.c sha2.c symtab.c
+
+
diff --git a/usr.sbin/bind/lib/isc/bitstring.c b/usr.sbin/bind/lib/isc/bitstring.c
deleted file mode 100644
index d456a12894e..00000000000
--- a/usr.sbin/bind/lib/isc/bitstring.c
+++ /dev/null
@@ -1,127 +0,0 @@
-/*
- * Copyright (C) 2004, 2005 Internet Systems Consortium, Inc. ("ISC")
- * Copyright (C) 1999-2001 Internet Software Consortium.
- *
- * Permission to use, copy, modify, and distribute this software for any
- * purpose with or without fee is hereby granted, provided that the above
- * 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.
- */
-
-/* $ISC: bitstring.c,v 1.13.18.2 2005/04/29 00:16:44 marka Exp $ */
-
-/*! \file */
-
-
-
-#include <stddef.h>
-
-#include <isc/magic.h>
-#include <isc/bitstring.h>
-#include <isc/util.h>
-
-#define DIV8(x) ((x) >> 3)
-#define MOD8(x) ((x) & 0x00000007U)
-#define OCTETS(n) (((n) + 7) >> 3)
-#define PADDED(n) ((((n) + 7) >> 3) << 3)
-#define BITSET(bs, n) (((bs)->data[DIV8(n)] & \
- (1 << (7 - MOD8(n)))) != 0)
-#define SETBIT(bs, n) (bs)->data[DIV8(n)] |= (1 << (7 - MOD8(n)))
-#define CLEARBIT(bs, n) (bs)->data[DIV8(n)] &= ~(1 << (7 - MOD8(n)))
-
-#define BITSTRING_MAGIC ISC_MAGIC('B', 'S', 't', 'r')
-#define VALID_BITSTRING(b) ISC_MAGIC_VALID(b, BITSTRING_MAGIC)
-
-void
-isc_bitstring_init(isc_bitstring_t *bitstring, unsigned char *data,
- unsigned int length, unsigned int size, isc_boolean_t lsb0)
-{
- /*
- * Make 'bitstring' refer to the bitstring of 'size' bits starting
- * at 'data'. 'length' bits of the bitstring are valid. If 'lsb0'
- * is set then, bit 0 refers to the least significant bit of the
- * bitstring. Otherwise bit 0 is the most significant bit.
- */
-
- REQUIRE(bitstring != NULL);
- REQUIRE(data != NULL);
- REQUIRE(length <= size);
-
- bitstring->magic = BITSTRING_MAGIC;
- bitstring->data = data;
- bitstring->length = length;
- bitstring->size = size;
- bitstring->lsb0 = lsb0;
-}
-
-void
-isc_bitstring_invalidate(isc_bitstring_t *bitstring) {
-
- /*
- * Invalidate 'bitstring'.
- */
-
- REQUIRE(VALID_BITSTRING(bitstring));
-
- bitstring->magic = 0;
- bitstring->data = NULL;
- bitstring->length = 0;
- bitstring->size = 0;
- bitstring->lsb0 = ISC_FALSE;
-}
-
-void
-isc_bitstring_copy(isc_bitstring_t *source, unsigned int sbitpos,
- isc_bitstring_t *target, unsigned int tbitpos,
- unsigned int n)
-{
- unsigned int tlast;
-
- /*
- * Starting at bit 'sbitpos', copy 'n' bits from 'source' to
- * the 'n' bits of 'target' starting at 'tbitpos'.
- */
-
- REQUIRE(VALID_BITSTRING(source));
- REQUIRE(VALID_BITSTRING(target));
- REQUIRE(source->lsb0 == target->lsb0);
- if (source->lsb0) {
- REQUIRE(sbitpos <= source->length);
- sbitpos = PADDED(source->size) - sbitpos;
- REQUIRE(sbitpos >= n);
- sbitpos -= n;
- } else
- REQUIRE(sbitpos + n <= source->length);
- tlast = tbitpos + n;
- if (target->lsb0) {
- REQUIRE(tbitpos <= target->length);
- tbitpos = PADDED(target->size) - tbitpos;
- REQUIRE(tbitpos >= n);
- tbitpos -= n;
- } else
- REQUIRE(tlast <= target->size);
-
- if (tlast > target->length)
- target->length = tlast;
-
- /*
- * This is far from optimal...
- */
-
- while (n > 0) {
- if (BITSET(source, sbitpos))
- SETBIT(target, tbitpos);
- else
- CLEARBIT(target, tbitpos);
- sbitpos++;
- tbitpos++;
- n--;
- }
-}
diff --git a/usr.sbin/bind/lib/isc/unix/Makefile.inc b/usr.sbin/bind/lib/isc/unix/Makefile.inc
new file mode 100644
index 00000000000..5cc42d9f8b4
--- /dev/null
+++ b/usr.sbin/bind/lib/isc/unix/Makefile.inc
@@ -0,0 +1,6 @@
+# $OpenBSD: Makefile.inc,v 1.1 2020/01/28 17:17:06 florian Exp $
+
+.PATH: ${.CURDIR}/lib/isc/unix
+
+SRCS+= app.c dir.c errno.c errno2result.c socket.c stdio.c net.c stdtime.c
+SRCS+= strerror.c time.c
diff --git a/usr.sbin/bind/lib/isc/unix/ipv6.c b/usr.sbin/bind/lib/isc/unix/ipv6.c
deleted file mode 100644
index 9c7f93b00a8..00000000000
--- a/usr.sbin/bind/lib/isc/unix/ipv6.c
+++ /dev/null
@@ -1,26 +0,0 @@
-/*
- * Copyright (C) Internet Systems Consortium, Inc. ("ISC")
- *
- * Permission to use, copy, modify, and/or 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: ipv6.c,v 1.4 2020/01/22 13:02:10 florian Exp $ */
-
-/*! \file */
-
-
-
-#include <isc/ipv6.h>
-
-const struct in6_addr in6addr_any = IN6ADDR_ANY_INIT;
-const struct in6_addr in6addr_loopback = IN6ADDR_LOOPBACK_INIT;
diff --git a/usr.sbin/bind/lib/isccfg/Makefile.inc b/usr.sbin/bind/lib/isccfg/Makefile.inc
new file mode 100644
index 00000000000..a02f30475a0
--- /dev/null
+++ b/usr.sbin/bind/lib/isccfg/Makefile.inc
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile.inc,v 1.1 2020/01/28 17:17:06 florian Exp $
+
+.PATH: ${.CURDIR}/lib/isccfg
+
+SRCS+= namedconf.c parser.c
diff --git a/usr.sbin/bind/lib/lwres/Makefile.inc b/usr.sbin/bind/lib/lwres/Makefile.inc
new file mode 100644
index 00000000000..c7b4c267689
--- /dev/null
+++ b/usr.sbin/bind/lib/lwres/Makefile.inc
@@ -0,0 +1,5 @@
+# $OpenBSD: Makefile.inc,v 1.1 2020/01/28 17:17:06 florian Exp $
+
+.PATH: ${.CURDIR}/lib/lwres
+
+SRCS+= lwconfig.c