summaryrefslogtreecommitdiff
path: root/usr.sbin/bind
diff options
context:
space:
mode:
Diffstat (limited to 'usr.sbin/bind')
-rw-r--r--usr.sbin/bind/bin/dig/dig.c14
-rw-r--r--usr.sbin/bind/bin/dig/dighost.c4
-rw-r--r--usr.sbin/bind/bin/dig/host.c4
-rw-r--r--usr.sbin/bind/bin/dig/include/dig/dig.h2
-rw-r--r--usr.sbin/bind/bin/dig/nslookup.c2
-rw-r--r--usr.sbin/bind/lib/dns/adb.c2
-rw-r--r--usr.sbin/bind/lib/dns/byaddr.c4
-rw-r--r--usr.sbin/bind/lib/dns/cache.c32
-rw-r--r--usr.sbin/bind/lib/dns/callbacks.c4
-rw-r--r--usr.sbin/bind/lib/dns/diff.c4
-rw-r--r--usr.sbin/bind/lib/dns/dispatch.c2
-rw-r--r--usr.sbin/bind/lib/dns/dst_api.c4
-rw-r--r--usr.sbin/bind/lib/dns/dst_parse.c4
-rw-r--r--usr.sbin/bind/lib/dns/gssapi_link.c4
-rw-r--r--usr.sbin/bind/lib/dns/gssapictx.c4
-rw-r--r--usr.sbin/bind/lib/dns/journal.c4
-rw-r--r--usr.sbin/bind/lib/dns/keytable.c4
-rw-r--r--usr.sbin/bind/lib/dns/master.c4
-rw-r--r--usr.sbin/bind/lib/dns/masterdump.c2
-rw-r--r--usr.sbin/bind/lib/dns/message.c4
-rw-r--r--usr.sbin/bind/lib/dns/name.c4
-rw-r--r--usr.sbin/bind/lib/dns/private.c4
-rw-r--r--usr.sbin/bind/lib/dns/rbt.c2
-rw-r--r--usr.sbin/bind/lib/dns/rbtdb.c2
-rw-r--r--usr.sbin/bind/lib/dns/rcode.c8
-rw-r--r--usr.sbin/bind/lib/dns/rdata.c6
-rw-r--r--usr.sbin/bind/lib/dns/resolver.c8
-rw-r--r--usr.sbin/bind/lib/dns/rpz.c7
-rw-r--r--usr.sbin/bind/lib/dns/rrl.c2
-rw-r--r--usr.sbin/bind/lib/dns/sdb.c4
-rw-r--r--usr.sbin/bind/lib/dns/sdlz.c4
-rw-r--r--usr.sbin/bind/lib/dns/ssu_external.c4
-rw-r--r--usr.sbin/bind/lib/dns/tcpmsg.c4
-rw-r--r--usr.sbin/bind/lib/dns/time.c4
-rw-r--r--usr.sbin/bind/lib/dns/tkey.c2
-rw-r--r--usr.sbin/bind/lib/dns/tsig.c4
-rw-r--r--usr.sbin/bind/lib/dns/ttl.c4
-rw-r--r--usr.sbin/bind/lib/dns/update.c4
-rw-r--r--usr.sbin/bind/lib/dns/validator.c4
-rw-r--r--usr.sbin/bind/lib/dns/view.c2
-rw-r--r--usr.sbin/bind/lib/dns/xfrin.c6
-rw-r--r--usr.sbin/bind/lib/dns/zone.c2
-rw-r--r--usr.sbin/bind/lib/isc/Makefile.in4
-rw-r--r--usr.sbin/bind/lib/isc/assertions.c4
-rw-r--r--usr.sbin/bind/lib/isc/commandline.c4
-rw-r--r--usr.sbin/bind/lib/isc/entropy.c4
-rw-r--r--usr.sbin/bind/lib/isc/error.c4
-rw-r--r--usr.sbin/bind/lib/isc/fsaccess.c4
-rw-r--r--usr.sbin/bind/lib/isc/httpd.c4
-rw-r--r--usr.sbin/bind/lib/isc/include/isc/platform.h.in63
-rw-r--r--usr.sbin/bind/lib/isc/include/isc/print.h112
-rw-r--r--usr.sbin/bind/lib/isc/include/isc/stdlib.h39
-rw-r--r--usr.sbin/bind/lib/isc/include/isc/string.h36
-rw-r--r--usr.sbin/bind/lib/isc/lex.c4
-rw-r--r--usr.sbin/bind/lib/isc/lib.c4
-rw-r--r--usr.sbin/bind/lib/isc/log.c4
-rw-r--r--usr.sbin/bind/lib/isc/mem.c24
-rw-r--r--usr.sbin/bind/lib/isc/netaddr.c4
-rw-r--r--usr.sbin/bind/lib/isc/parseint.c5
-rw-r--r--usr.sbin/bind/lib/isc/pk11.c2
-rw-r--r--usr.sbin/bind/lib/isc/print.c700
-rw-r--r--usr.sbin/bind/lib/isc/regex.c2
-rw-r--r--usr.sbin/bind/lib/isc/rwlock.c4
-rw-r--r--usr.sbin/bind/lib/isc/sockaddr.c4
-rw-r--r--usr.sbin/bind/lib/isc/stats.c4
-rw-r--r--usr.sbin/bind/lib/isc/string.c98
-rw-r--r--usr.sbin/bind/lib/isc/strtoul.c124
-rw-r--r--usr.sbin/bind/lib/isc/task.c2
-rw-r--r--usr.sbin/bind/lib/isc/timer.c4
-rw-r--r--usr.sbin/bind/lib/isc/unix/dir.c2
-rw-r--r--usr.sbin/bind/lib/isc/unix/entropy.c4
-rw-r--r--usr.sbin/bind/lib/isc/unix/ifiter_ioctl.c4
-rw-r--r--usr.sbin/bind/lib/isc/unix/ifiter_sysctl.c4
-rw-r--r--usr.sbin/bind/lib/isc/unix/interfaceiter.c4
-rw-r--r--usr.sbin/bind/lib/isc/unix/pk11_api.c4
-rw-r--r--usr.sbin/bind/lib/isc/unix/socket.c2
-rw-r--r--usr.sbin/bind/lib/isc/unix/strerror.c4
-rw-r--r--usr.sbin/bind/lib/isc/unix/time.c4
-rw-r--r--usr.sbin/bind/lib/isccfg/aclconf.c2
-rw-r--r--usr.sbin/bind/lib/isccfg/parser.c4
80 files changed, 171 insertions, 1333 deletions
diff --git a/usr.sbin/bind/bin/dig/dig.c b/usr.sbin/bind/bin/dig/dig.c
index a9a5dfbc2bb..c1cdc962be9 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.30 2020/01/07 19:09:26 florian Exp $ */
+/* $Id: dig.c,v 1.31 2020/01/09 13:47:12 florian Exp $ */
/*! \file */
@@ -28,7 +28,7 @@
#include <isc/netaddr.h>
#include <isc/parseint.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/task.h>
#include <isc/util.h>
@@ -214,7 +214,7 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
printf(";; WHEN: %s\n", time_str);
if (query->lookup->doing_xfr) {
printf(";; XFR size: %u records (messages %u, "
- "bytes %" ISC_PRINT_QUADFORMAT "u)\n",
+ "bytes %llu)\n",
query->rr_count, query->msg_count,
query->byte_count);
} else {
@@ -232,14 +232,14 @@ received(unsigned int bytes, isc_sockaddr_t *from, dig_query_t *query) {
} else if (query->lookup->identify && !short_form) {
diff = isc_time_microdiff(&query->time_recv, &query->time_sent);
if (use_usec)
- printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
+ printf(";; Received %llu bytes "
"from %s(%s) in %ld us\n\n",
query->lookup->doing_xfr
? query->byte_count
: (isc_uint64_t)bytes,
fromtext, query->userarg, (long) diff);
else
- printf(";; Received %" ISC_PRINT_QUADFORMAT "u bytes "
+ printf(";; Received %llu bytes "
"from %s(%s) in %ld ms\n\n",
query->lookup->doing_xfr
? query->byte_count
@@ -292,9 +292,9 @@ say_message(dns_rdata_t *rdata, dig_query_t *query, isc_buffer_t *buf) {
ADD_STRING(buf, " from server ");
ADD_STRING(buf, query->servname);
if (use_usec)
- snprintf(store, sizeof(store), " in %" ISC_PLATFORM_QUADFORMAT "u us.", diff);
+ snprintf(store, sizeof(store), " in %llu us.", diff);
else
- snprintf(store, sizeof(store), " in %" ISC_PLATFORM_QUADFORMAT "u ms.", diff / 1000);
+ snprintf(store, sizeof(store), " in %llu ms.", diff / 1000);
ADD_STRING(buf, store);
}
ADD_STRING(buf, "\n");
diff --git a/usr.sbin/bind/bin/dig/dighost.c b/usr.sbin/bind/bin/dig/dighost.c
index e194c75c492..121bd2b5043 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.23 2020/01/06 17:46:59 florian Exp $ */
+/* $Id: dighost.c,v 1.24 2020/01/09 13:47:12 florian Exp $ */
/*! \file
* \note
@@ -80,7 +80,7 @@
#include <isc/netaddr.h>
#include <isc/netdb.h>
#include <isc/parseint.h>
-#include <isc/print.h>
+
#include <isc/random.h>
#include <isc/result.h>
#include <isc/safe.h>
diff --git a/usr.sbin/bind/bin/dig/host.c b/usr.sbin/bind/bin/dig/host.c
index a110d2c7145..f2fa997daa0 100644
--- a/usr.sbin/bind/bin/dig/host.c
+++ b/usr.sbin/bind/bin/dig/host.c
@@ -35,11 +35,11 @@
#include <isc/app.h>
#include <isc/commandline.h>
#include <isc/netaddr.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/util.h>
#include <isc/task.h>
-#include <isc/stdlib.h>
+
#include <dns/byaddr.h>
#include <dns/fixedname.h>
diff --git a/usr.sbin/bind/bin/dig/include/dig/dig.h b/usr.sbin/bind/bin/dig/include/dig/dig.h
index 2f644532c13..c4a7ba477fe 100644
--- a/usr.sbin/bind/bin/dig/include/dig/dig.h
+++ b/usr.sbin/bind/bin/dig/include/dig/dig.h
@@ -30,7 +30,7 @@
#include <isc/lang.h>
#include <isc/list.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/sockaddr.h>
#include <isc/socket.h>
diff --git a/usr.sbin/bind/bin/dig/nslookup.c b/usr.sbin/bind/bin/dig/nslookup.c
index 86454d40de6..20527aabe6b 100644
--- a/usr.sbin/bind/bin/dig/nslookup.c
+++ b/usr.sbin/bind/bin/dig/nslookup.c
@@ -24,7 +24,7 @@
#include <isc/commandline.h>
#include <isc/event.h>
#include <isc/parseint.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/util.h>
#include <isc/task.h>
diff --git a/usr.sbin/bind/lib/dns/adb.c b/usr.sbin/bind/lib/dns/adb.c
index e9ac74762d4..43f5658541f 100644
--- a/usr.sbin/bind/lib/dns/adb.c
+++ b/usr.sbin/bind/lib/dns/adb.c
@@ -29,7 +29,7 @@
#include <isc/mutexblock.h>
#include <isc/netaddr.h>
-#include <isc/print.h>
+
#include <isc/random.h>
#include <isc/stats.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */
diff --git a/usr.sbin/bind/lib/dns/byaddr.c b/usr.sbin/bind/lib/dns/byaddr.c
index 8f798afbbbf..8c261c1d419 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.8 2019/12/17 01:46:31 sthen Exp $ */
+/* $Id: byaddr.c,v 1.9 2020/01/09 13:47:12 florian Exp $ */
/*! \file */
@@ -22,7 +22,7 @@
#include <isc/mem.h>
#include <isc/netaddr.h>
-#include <isc/print.h>
+
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/task.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/cache.c b/usr.sbin/bind/lib/dns/cache.c
index ba0625c37ed..3a537d7a4fa 100644
--- a/usr.sbin/bind/lib/dns/cache.c
+++ b/usr.sbin/bind/lib/dns/cache.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: cache.c,v 1.8 2019/12/17 01:46:31 sthen Exp $ */
+/* $Id: cache.c,v 1.9 2020/01/09 13:47:12 florian Exp $ */
/*! \file */
@@ -22,7 +22,7 @@
#include <isc/json.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/stats.h>
#include <isc/task.h>
@@ -1393,47 +1393,47 @@ dns_cache_dumpstats(dns_cache_t *cache, FILE *fp) {
getcounters(cache->stats, isc_statsformat_file,
dns_cachestatscounter_max, indices, values);
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
values[dns_cachestatscounter_hits],
"cache hits");
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
values[dns_cachestatscounter_misses],
"cache misses");
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
values[dns_cachestatscounter_queryhits],
"cache hits (from query)");
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
values[dns_cachestatscounter_querymisses],
"cache misses (from query)");
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
values[dns_cachestatscounter_deletelru],
"cache records deleted due to memory exhaustion");
- fprintf(fp, "%20" ISC_PRINT_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
values[dns_cachestatscounter_deletettl],
"cache records deleted due to TTL expiration");
fprintf(fp, "%20u %s\n", dns_db_nodecount(cache->db),
"cache database nodes");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
(isc_uint64_t) dns_db_hashsize(cache->db),
"cache database hash buckets");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
(isc_uint64_t) isc_mem_total(cache->mctx),
"cache tree memory total");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
(isc_uint64_t) isc_mem_inuse(cache->mctx),
"cache tree memory in use");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
(isc_uint64_t) isc_mem_maxinuse(cache->mctx),
"cache tree highest memory in use");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
(isc_uint64_t) isc_mem_total(cache->hmctx),
"cache heap memory total");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
(isc_uint64_t) isc_mem_inuse(cache->hmctx),
"cache heap memory in use");
- fprintf(fp, "%20" ISC_PLATFORM_QUADFORMAT "u %s\n",
+ fprintf(fp, "%20llu %s\n",
(isc_uint64_t) isc_mem_maxinuse(cache->hmctx),
"cache heap highest memory in use");
}
@@ -1448,7 +1448,7 @@ renderstat(const char *name, isc_uint64_t value, xmlTextWriterPtr writer) {
TRY0(xmlTextWriterWriteAttribute(writer,
ISC_XMLCHAR "name", ISC_XMLCHAR name));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
value));
TRY0(xmlTextWriterEndElement(writer)); /* counter */
diff --git a/usr.sbin/bind/lib/dns/callbacks.c b/usr.sbin/bind/lib/dns/callbacks.c
index e8169f24fac..0efa8dc5c24 100644
--- a/usr.sbin/bind/lib/dns/callbacks.c
+++ b/usr.sbin/bind/lib/dns/callbacks.c
@@ -14,13 +14,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: callbacks.c,v 1.3 2019/12/17 01:46:31 sthen Exp $ */
+/* $Id: callbacks.c,v 1.4 2020/01/09 13:47:12 florian Exp $ */
/*! \file */
#include <config.h>
-#include <isc/print.h>
+
#include <isc/util.h>
#include <dns/callbacks.h>
diff --git a/usr.sbin/bind/lib/dns/diff.c b/usr.sbin/bind/lib/dns/diff.c
index 1950475f572..1fd289a93fa 100644
--- a/usr.sbin/bind/lib/dns/diff.c
+++ b/usr.sbin/bind/lib/dns/diff.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: diff.c,v 1.3 2019/12/17 01:46:31 sthen Exp $ */
+/* $Id: diff.c,v 1.4 2020/01/09 13:47:12 florian Exp $ */
/*! \file */
@@ -25,7 +25,7 @@
#include <isc/buffer.h>
#include <isc/file.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/dispatch.c b/usr.sbin/bind/lib/dns/dispatch.c
index e487b8d0725..b1b1df4e164 100644
--- a/usr.sbin/bind/lib/dns/dispatch.c
+++ b/usr.sbin/bind/lib/dns/dispatch.c
@@ -27,7 +27,7 @@
#include <isc/mem.h>
#include <isc/mutex.h>
#include <isc/portset.h>
-#include <isc/print.h>
+
#include <isc/random.h>
#include <isc/socket.h>
#include <isc/stats.h>
diff --git a/usr.sbin/bind/lib/dns/dst_api.c b/usr.sbin/bind/lib/dns/dst_api.c
index 46e34e54b6f..286f25d3752 100644
--- a/usr.sbin/bind/lib/dns/dst_api.c
+++ b/usr.sbin/bind/lib/dns/dst_api.c
@@ -33,7 +33,7 @@
/*
* Principal Author: Brian Wellington
- * $Id: dst_api.c,v 1.9 2020/01/07 19:09:26 florian Exp $
+ * $Id: dst_api.c,v 1.10 2020/01/09 13:47:12 florian Exp $
*/
/*! \file */
@@ -52,7 +52,7 @@
#include <isc/mem.h>
#include <isc/once.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/refcount.h>
#include <isc/random.h>
#include <isc/safe.h>
diff --git a/usr.sbin/bind/lib/dns/dst_parse.c b/usr.sbin/bind/lib/dns/dst_parse.c
index 6c2ac5844a5..5b852b9c6b7 100644
--- a/usr.sbin/bind/lib/dns/dst_parse.c
+++ b/usr.sbin/bind/lib/dns/dst_parse.c
@@ -33,7 +33,7 @@
/*%
* Principal Author: Brian Wellington
- * $Id: dst_parse.c,v 1.4 2020/01/07 19:09:26 florian Exp $
+ * $Id: dst_parse.c,v 1.5 2020/01/09 13:47:12 florian Exp $
*/
#include <config.h>
@@ -44,7 +44,7 @@
#include <isc/fsaccess.h>
#include <isc/lex.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/stdtime.h>
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/gssapi_link.c b/usr.sbin/bind/lib/dns/gssapi_link.c
index 69853f9a4e5..3b6ad2e8061 100644
--- a/usr.sbin/bind/lib/dns/gssapi_link.c
+++ b/usr.sbin/bind/lib/dns/gssapi_link.c
@@ -15,7 +15,7 @@
*/
/*
- * $Id: gssapi_link.c,v 1.3 2019/12/17 01:46:31 sthen Exp $
+ * $Id: gssapi_link.c,v 1.4 2020/01/09 13:47:12 florian Exp $
*/
#include <config.h>
@@ -25,7 +25,7 @@
#include <isc/base64.h>
#include <isc/buffer.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/gssapictx.c b/usr.sbin/bind/lib/dns/gssapictx.c
index 88c947d3e86..d26b7d9d5bb 100644
--- a/usr.sbin/bind/lib/dns/gssapictx.c
+++ b/usr.sbin/bind/lib/dns/gssapictx.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: gssapictx.c,v 1.4 2020/01/07 19:09:26 florian Exp $ */
+/* $Id: gssapictx.c,v 1.5 2020/01/09 13:47:12 florian Exp $ */
#include <config.h>
@@ -29,7 +29,7 @@
#include <isc/lex.h>
#include <isc/mem.h>
#include <isc/once.h>
-#include <isc/print.h>
+
#include <isc/platform.h>
#include <isc/random.h>
#include <isc/string.h>
diff --git a/usr.sbin/bind/lib/dns/journal.c b/usr.sbin/bind/lib/dns/journal.c
index 7b34e3c6009..e56278dcebb 100644
--- a/usr.sbin/bind/lib/dns/journal.c
+++ b/usr.sbin/bind/lib/dns/journal.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: journal.c,v 1.3 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: journal.c,v 1.4 2020/01/09 13:47:12 florian Exp $ */
#include <config.h>
@@ -24,7 +24,7 @@
#include <isc/file.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/stdio.h>
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/keytable.c b/usr.sbin/bind/lib/dns/keytable.c
index 1850e55150d..845b36b6aa6 100644
--- a/usr.sbin/bind/lib/dns/keytable.c
+++ b/usr.sbin/bind/lib/dns/keytable.c
@@ -14,14 +14,14 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: keytable.c,v 1.3 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: keytable.c,v 1.4 2020/01/09 13:47:12 florian Exp $ */
/*! \file */
#include <config.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/refcount.h>
#include <isc/rwlock.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */
diff --git a/usr.sbin/bind/lib/dns/master.c b/usr.sbin/bind/lib/dns/master.c
index 17e7fa15d7b..250c96db57e 100644
--- a/usr.sbin/bind/lib/dns/master.c
+++ b/usr.sbin/bind/lib/dns/master.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: master.c,v 1.8 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: master.c,v 1.9 2020/01/09 13:47:12 florian Exp $ */
/*! \file */
@@ -24,7 +24,7 @@
#include <isc/lex.h>
#include <isc/magic.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/serial.h>
#include <isc/stdio.h>
#include <isc/stdtime.h>
diff --git a/usr.sbin/bind/lib/dns/masterdump.c b/usr.sbin/bind/lib/dns/masterdump.c
index 592a3461b53..b24e4b552e2 100644
--- a/usr.sbin/bind/lib/dns/masterdump.c
+++ b/usr.sbin/bind/lib/dns/masterdump.c
@@ -24,7 +24,7 @@
#include <isc/file.h>
#include <isc/magic.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/stdio.h>
#include <isc/string.h>
#include <isc/task.h>
diff --git a/usr.sbin/bind/lib/dns/message.c b/usr.sbin/bind/lib/dns/message.c
index bf1ef5aab61..27a1bb28b90 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.9 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: message.c,v 1.10 2020/01/09 13:47:12 florian Exp $ */
/*! \file */
@@ -27,7 +27,7 @@
#include <isc/buffer.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/name.c b/usr.sbin/bind/lib/dns/name.c
index 77bfb7dcd6d..c8513e8fbea 100644
--- a/usr.sbin/bind/lib/dns/name.c
+++ b/usr.sbin/bind/lib/dns/name.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: name.c,v 1.14 2020/01/07 19:08:09 florian Exp $ */
+/* $Id: name.c,v 1.15 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -27,7 +27,7 @@
#include <isc/hash.h>
#include <isc/mem.h>
#include <isc/once.h>
-#include <isc/print.h>
+
#include <isc/random.h>
#include <isc/string.h>
#include <isc/thread.h>
diff --git a/usr.sbin/bind/lib/dns/private.c b/usr.sbin/bind/lib/dns/private.c
index 841c99d2140..5ae8059bd69 100644
--- a/usr.sbin/bind/lib/dns/private.c
+++ b/usr.sbin/bind/lib/dns/private.c
@@ -14,12 +14,12 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: private.c,v 1.2 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: private.c,v 1.3 2020/01/09 13:47:13 florian Exp $ */
#include "config.h"
#include <isc/base64.h>
-#include <isc/print.h>
+
#include <isc/result.h>
#include <isc/string.h>
#include <isc/types.h>
diff --git a/usr.sbin/bind/lib/dns/rbt.c b/usr.sbin/bind/lib/dns/rbt.c
index 78971a4732a..9d9c5309e14 100644
--- a/usr.sbin/bind/lib/dns/rbt.c
+++ b/usr.sbin/bind/lib/dns/rbt.c
@@ -31,7 +31,7 @@
#include <isc/mem.h>
#include <isc/once.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/refcount.h>
#include <isc/socket.h>
#include <isc/stdio.h>
diff --git a/usr.sbin/bind/lib/dns/rbtdb.c b/usr.sbin/bind/lib/dns/rbtdb.c
index 02a2995a472..ee2a05d0e53 100644
--- a/usr.sbin/bind/lib/dns/rbtdb.c
+++ b/usr.sbin/bind/lib/dns/rbtdb.c
@@ -37,7 +37,7 @@
#include <isc/mutex.h>
#include <isc/once.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/random.h>
#include <isc/refcount.h>
#include <isc/rwlock.h>
diff --git a/usr.sbin/bind/lib/dns/rcode.c b/usr.sbin/bind/lib/dns/rcode.c
index 749ddf41098..80d6ea1271f 100644
--- a/usr.sbin/bind/lib/dns/rcode.c
+++ b/usr.sbin/bind/lib/dns/rcode.c
@@ -14,18 +14,20 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rcode.c,v 1.6 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: rcode.c,v 1.7 2020/01/09 13:47:13 florian Exp $ */
#include <config.h>
#include <ctype.h>
+#include <limits.h>
+#include <stdlib.h>
#include <isc/buffer.h>
#include <isc/parseint.h>
-#include <isc/print.h>
+
#include <isc/region.h>
#include <isc/result.h>
#include <isc/stdio.h>
-#include <isc/stdlib.h>
+
#include <isc/string.h>
#include <isc/types.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/rdata.c b/usr.sbin/bind/lib/dns/rdata.c
index 6bb024c04d4..735cd48f33d 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.14 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: rdata.c,v 1.15 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -26,9 +26,9 @@
#include <isc/lex.h>
#include <isc/mem.h>
#include <isc/parseint.h>
-#include <isc/print.h>
+
#include <isc/string.h>
-#include <isc/stdlib.h>
+
#include <isc/util.h>
#include <dns/callbacks.h>
diff --git a/usr.sbin/bind/lib/dns/resolver.c b/usr.sbin/bind/lib/dns/resolver.c
index 5ab53da4004..39c2a4d3ffd 100644
--- a/usr.sbin/bind/lib/dns/resolver.c
+++ b/usr.sbin/bind/lib/dns/resolver.c
@@ -22,7 +22,7 @@
#include <isc/counter.h>
#include <isc/log.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/random.h>
#include <isc/socket.h>
@@ -9558,8 +9558,8 @@ dns_resolver_logfetch(dns_fetch_t *fetch, isc_log_t *lctx,
dns_name_format(&fctx->domain, domainbuf, sizeof(domainbuf));
isc_log_write(lctx, category, module, level,
"fetch completed at %s:%d for %s in "
- "%" ISC_PRINT_QUADFORMAT "u."
- "%06" ISC_PRINT_QUADFORMAT "u: %s/%s "
+ "%llu."
+ "%06llu: %s/%s "
"[domain:%s,referral:%u,restart:%u,qrysent:%u,"
"timeout:%u,lame:%u,"
#ifdef ENABLE_FETCHLIMIT
@@ -9998,7 +9998,7 @@ dns_resolver_printbadcache(dns_resolver_t *resolver, FILE *fp) {
t = isc_time_microdiff(&bad->expire, &now);
t /= 1000;
fprintf(fp, "; %s/%s [ttl "
- "%" ISC_PLATFORM_QUADFORMAT "u]\n",
+ "%llu]\n",
namebuf, typebuf, t);
}
}
diff --git a/usr.sbin/bind/lib/dns/rpz.c b/usr.sbin/bind/lib/dns/rpz.c
index 92f6678d1b7..8b3f99e7f35 100644
--- a/usr.sbin/bind/lib/dns/rpz.c
+++ b/usr.sbin/bind/lib/dns/rpz.c
@@ -18,13 +18,16 @@
#include <config.h>
+#include <limits.h>
+#include <stdlib.h>
+
#include <isc/buffer.h>
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/netaddr.h>
-#include <isc/print.h>
+
#include <isc/rwlock.h>
-#include <isc/stdlib.h>
+
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/rrl.c b/usr.sbin/bind/lib/dns/rrl.c
index cec8ae696e9..ac684acbb13 100644
--- a/usr.sbin/bind/lib/dns/rrl.c
+++ b/usr.sbin/bind/lib/dns/rrl.c
@@ -26,7 +26,7 @@
#include <isc/mem.h>
#include <isc/net.h>
#include <isc/netaddr.h>
-#include <isc/print.h>
+
#include <isc/util.h>
#include <dns/result.h>
diff --git a/usr.sbin/bind/lib/dns/sdb.c b/usr.sbin/bind/lib/dns/sdb.c
index 6bb6ce4c4a4..5c317fff4fb 100644
--- a/usr.sbin/bind/lib/dns/sdb.c
+++ b/usr.sbin/bind/lib/dns/sdb.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sdb.c,v 1.6 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: sdb.c,v 1.7 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -28,7 +28,7 @@
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/once.h>
-#include <isc/print.h>
+
#include <isc/region.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/sdlz.c b/usr.sbin/bind/lib/dns/sdlz.c
index 0a4e3afaf87..cd7d444bb0e 100644
--- a/usr.sbin/bind/lib/dns/sdlz.c
+++ b/usr.sbin/bind/lib/dns/sdlz.c
@@ -49,7 +49,7 @@
* USE OR PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sdlz.c,v 1.3 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: sdlz.c,v 1.4 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -65,7 +65,7 @@
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/once.h>
-#include <isc/print.h>
+
#include <isc/region.h>
#include <dns/callbacks.h>
diff --git a/usr.sbin/bind/lib/dns/ssu_external.c b/usr.sbin/bind/lib/dns/ssu_external.c
index 1ae7e4fd342..4b6570ff3dc 100644
--- a/usr.sbin/bind/lib/dns/ssu_external.c
+++ b/usr.sbin/bind/lib/dns/ssu_external.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ssu_external.c,v 1.2 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: ssu_external.c,v 1.3 2020/01/09 13:47:13 florian Exp $ */
/*
* This implements external update-policy rules. This allows permission
@@ -34,7 +34,7 @@
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/netaddr.h>
-#include <isc/print.h>
+
#include <isc/result.h>
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/tcpmsg.c b/usr.sbin/bind/lib/dns/tcpmsg.c
index a0ffc57721f..e9d90f1c758 100644
--- a/usr.sbin/bind/lib/dns/tcpmsg.c
+++ b/usr.sbin/bind/lib/dns/tcpmsg.c
@@ -14,14 +14,14 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: tcpmsg.c,v 1.3 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: tcpmsg.c,v 1.4 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
#include <config.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/task.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/time.c b/usr.sbin/bind/lib/dns/time.c
index b45c9fe4fc7..7e455af7527 100644
--- a/usr.sbin/bind/lib/dns/time.c
+++ b/usr.sbin/bind/lib/dns/time.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: time.c,v 1.7 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: time.c,v 1.8 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -25,7 +25,7 @@
#include <time.h>
#include <ctype.h>
-#include <isc/print.h>
+
#include <isc/region.h>
#include <isc/serial.h>
#include <isc/stdtime.h>
diff --git a/usr.sbin/bind/lib/dns/tkey.c b/usr.sbin/bind/lib/dns/tkey.c
index 2144aa28301..ad10b95e8d4 100644
--- a/usr.sbin/bind/lib/dns/tkey.c
+++ b/usr.sbin/bind/lib/dns/tkey.c
@@ -21,7 +21,7 @@
#include <isc/entropy.h>
#include <isc/md5.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/tsig.c b/usr.sbin/bind/lib/dns/tsig.c
index abbc46cca6e..ee7d3f2d3d7 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.8 2019/12/17 01:46:32 sthen Exp $
+ * $Id: tsig.c,v 1.9 2020/01/09 13:47:13 florian Exp $
*/
/*! \file */
#include <config.h>
@@ -23,7 +23,7 @@
#include <isc/buffer.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/refcount.h>
#include <isc/serial.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */
diff --git a/usr.sbin/bind/lib/dns/ttl.c b/usr.sbin/bind/lib/dns/ttl.c
index 38936c13bde..ceb4872c6ce 100644
--- a/usr.sbin/bind/lib/dns/ttl.c
+++ b/usr.sbin/bind/lib/dns/ttl.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ttl.c,v 1.8 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: ttl.c,v 1.9 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -27,7 +27,7 @@
#include <isc/buffer.h>
#include <isc/parseint.h>
-#include <isc/print.h>
+
#include <isc/region.h>
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/dns/update.c b/usr.sbin/bind/lib/dns/update.c
index c7ab2adca42..0db3afc5c26 100644
--- a/usr.sbin/bind/lib/dns/update.c
+++ b/usr.sbin/bind/lib/dns/update.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: update.c,v 1.2 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: update.c,v 1.3 2020/01/09 13:47:13 florian Exp $ */
#include <config.h>
@@ -23,7 +23,7 @@
#include <isc/mem.h>
#include <isc/netaddr.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/serial.h>
#include <isc/stats.h>
#include <isc/stdtime.h>
diff --git a/usr.sbin/bind/lib/dns/validator.c b/usr.sbin/bind/lib/dns/validator.c
index aef8bf7b766..1fa61e0d182 100644
--- a/usr.sbin/bind/lib/dns/validator.c
+++ b/usr.sbin/bind/lib/dns/validator.c
@@ -14,13 +14,13 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: validator.c,v 1.9 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: validator.c,v 1.10 2020/01/09 13:47:13 florian Exp $ */
#include <config.h>
#include <isc/base32.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/sha2.h>
#include <isc/string.h>
#include <isc/task.h>
diff --git a/usr.sbin/bind/lib/dns/view.c b/usr.sbin/bind/lib/dns/view.c
index 184b0d02a09..fab5b48ed1a 100644
--- a/usr.sbin/bind/lib/dns/view.c
+++ b/usr.sbin/bind/lib/dns/view.c
@@ -20,7 +20,7 @@
#include <isc/file.h>
#include <isc/hash.h>
-#include <isc/print.h>
+
#include <isc/sha2.h>
#include <isc/stats.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */
diff --git a/usr.sbin/bind/lib/dns/xfrin.c b/usr.sbin/bind/lib/dns/xfrin.c
index 79fe6be29b4..409e8463c01 100644
--- a/usr.sbin/bind/lib/dns/xfrin.c
+++ b/usr.sbin/bind/lib/dns/xfrin.c
@@ -14,14 +14,14 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: xfrin.c,v 1.12 2019/12/17 01:46:32 sthen Exp $ */
+/* $Id: xfrin.c,v 1.13 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
#include <config.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/random.h>
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/task.h>
@@ -1497,7 +1497,7 @@ maybe_free(dns_xfrin_ctx_t *xfr) {
persec = (xfr->nbytes * 1000) / msecs;
xfrin_log(xfr, ISC_LOG_INFO,
"Transfer completed: %d messages, %d records, "
- "%" ISC_PRINT_QUADFORMAT "u bytes, "
+ "%llu bytes, "
"%u.%03u secs (%u bytes/sec)",
xfr->nmsg, xfr->nrecs, xfr->nbytes,
(unsigned int) (msecs / 1000), (unsigned int) (msecs % 1000),
diff --git a/usr.sbin/bind/lib/dns/zone.c b/usr.sbin/bind/lib/dns/zone.c
index 40b5cc4dc58..69d07a4d9c8 100644
--- a/usr.sbin/bind/lib/dns/zone.c
+++ b/usr.sbin/bind/lib/dns/zone.c
@@ -23,7 +23,7 @@
#include <isc/hex.h>
#include <isc/mutex.h>
#include <isc/pool.h>
-#include <isc/print.h>
+
#include <isc/random.h>
#include <isc/ratelimiter.h>
#include <isc/refcount.h>
diff --git a/usr.sbin/bind/lib/isc/Makefile.in b/usr.sbin/bind/lib/isc/Makefile.in
index b941b14e801..0526fb6a540 100644
--- a/usr.sbin/bind/lib/isc/Makefile.in
+++ b/usr.sbin/bind/lib/isc/Makefile.in
@@ -60,7 +60,7 @@ OBJS = @ISC_EXTRA_OBJS@ @ISC_PK11_O@ @ISC_PK11_RESULT_O@ \
ratelimiter.@O@ refcount.@O@ region.@O@ regex.@O@ result.@O@ \
rwlock.@O@ \
safe.@O@ serial.@O@ sha1.@O@ sha2.@O@ sockaddr.@O@ stats.@O@ \
- string.@O@ strtoul.@O@ symtab.@O@ task.@O@ taskpool.@O@ \
+ string.@O@ symtab.@O@ task.@O@ taskpool.@O@ \
tm.@O@ timer.@O@ version.@O@ \
${UNIXOBJS} ${NLSOBJS} ${THREADOBJS}
@@ -76,7 +76,7 @@ SRCS = @ISC_EXTRA_SRCS@ @ISC_PK11_C@ @ISC_PK11_RESULT_C@ \
parseint.c portset.c quota.c radix.c random.c \
ratelimiter.c refcount.c region.c regex.c result.c rwlock.c \
safe.c serial.c sha1.c sha2.c sockaddr.c stats.c string.c \
- strtoul.c symtab.c task.c taskpool.c timer.c \
+ symtab.c task.c taskpool.c timer.c \
tm.c version.c
LIBS = @ISC_OPENSSL_LIBS@ @LIBS@
diff --git a/usr.sbin/bind/lib/isc/assertions.c b/usr.sbin/bind/lib/isc/assertions.c
index 1ef05e2ef4d..e2a5f765b1a 100644
--- a/usr.sbin/bind/lib/isc/assertions.c
+++ b/usr.sbin/bind/lib/isc/assertions.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: assertions.c,v 1.4 2020/01/07 19:11:17 florian Exp $ */
+/* $Id: assertions.c,v 1.5 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -25,7 +25,7 @@
#include <isc/assertions.h>
#include <isc/msgs.h>
-#include <isc/print.h>
+
#include <isc/result.h>
/*%
diff --git a/usr.sbin/bind/lib/isc/commandline.c b/usr.sbin/bind/lib/isc/commandline.c
index f283158306b..3c20a222f0f 100644
--- a/usr.sbin/bind/lib/isc/commandline.c
+++ b/usr.sbin/bind/lib/isc/commandline.c
@@ -43,7 +43,7 @@
* SUCH DAMAGE.
*/
-/* $Id: commandline.c,v 1.7 2019/12/17 01:46:34 sthen Exp $ */
+/* $Id: commandline.c,v 1.8 2020/01/09 13:47:13 florian Exp $ */
/*! \file
* This file was adapted from the NetBSD project's source tree, RCS ID:
@@ -64,7 +64,7 @@
#include <isc/commandline.h>
#include <isc/msgs.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isc/entropy.c b/usr.sbin/bind/lib/isc/entropy.c
index fb881f7624a..00d387fd6c2 100644
--- a/usr.sbin/bind/lib/isc/entropy.c
+++ b/usr.sbin/bind/lib/isc/entropy.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: entropy.c,v 1.6 2019/12/17 01:46:34 sthen Exp $ */
+/* $Id: entropy.c,v 1.7 2020/01/09 13:47:13 florian Exp $ */
/*! \file
* \brief
@@ -39,7 +39,7 @@
#include <isc/msgs.h>
#include <isc/mutex.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/region.h>
#include <isc/safe.h>
#include <isc/sha1.h>
diff --git a/usr.sbin/bind/lib/isc/error.c b/usr.sbin/bind/lib/isc/error.c
index 2ef74701504..e71c6bab9ee 100644
--- a/usr.sbin/bind/lib/isc/error.c
+++ b/usr.sbin/bind/lib/isc/error.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: error.c,v 1.3 2019/12/17 01:46:34 sthen Exp $ */
+/* $Id: error.c,v 1.4 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -25,7 +25,7 @@
#include <isc/error.h>
#include <isc/msgs.h>
-#include <isc/print.h>
+
/*% Default unexpected callback. */
static void
diff --git a/usr.sbin/bind/lib/isc/fsaccess.c b/usr.sbin/bind/lib/isc/fsaccess.c
index 8229ac0df7a..5be67607475 100644
--- a/usr.sbin/bind/lib/isc/fsaccess.c
+++ b/usr.sbin/bind/lib/isc/fsaccess.c
@@ -14,14 +14,14 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: fsaccess.c,v 1.3 2019/12/17 01:46:34 sthen Exp $ */
+/* $Id: fsaccess.c,v 1.4 2020/01/09 13:47:13 florian Exp $ */
/*! \file
* \brief
* This file contains the OS-independent functionality of the API.
*/
#include <isc/fsaccess.h>
-#include <isc/print.h>
+
#include <isc/result.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isc/httpd.c b/usr.sbin/bind/lib/isc/httpd.c
index 27870ea9a3a..91303cf3e71 100644
--- a/usr.sbin/bind/lib/isc/httpd.c
+++ b/usr.sbin/bind/lib/isc/httpd.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: httpd.c,v 1.2 2019/12/17 01:46:34 sthen Exp $ */
+/* $Id: httpd.c,v 1.3 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -23,7 +23,7 @@
#include <isc/buffer.h>
#include <isc/httpd.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/socket.h>
#include <isc/string.h>
#include <isc/task.h>
diff --git a/usr.sbin/bind/lib/isc/include/isc/platform.h.in b/usr.sbin/bind/lib/isc/include/isc/platform.h.in
index 350a004b550..843e7d7aada 100644
--- a/usr.sbin/bind/lib/isc/include/isc/platform.h.in
+++ b/usr.sbin/bind/lib/isc/include/isc/platform.h.in
@@ -23,69 +23,6 @@
***** Platform-dependent defines.
*****/
-/*
- *** Printing.
- ***/
-
-/*! \brief
- * If this system needs vsnprintf() and snprintf(), ISC_PLATFORM_NEEDVSNPRINTF
- * will be defined.
- */
-@ISC_PLATFORM_NEEDVSNPRINTF@
-
-/*! \brief
- * If this system need a modern sprintf() that returns (int) not (char*).
- */
-@ISC_PLATFORM_NEEDSPRINTF@
-
-/*! \brief
- * If this system need a modern printf() that format size %z (size_t).
- */
-@ISC_PLATFORM_NEEDPRINTF@
-
-/*! \brief
- * If this system need a modern fprintf() that format size %z (size_t).
- */
-@ISC_PLATFORM_NEEDFPRINTF@
-
-/*! \brief
- * The printf format string modifier to use with isc_uint64_t values.
- */
-@ISC_PLATFORM_QUADFORMAT@
-
-/***
- *** String functions.
- ***/
-/*
- * If the system needs strsep(), ISC_PLATFORM_NEEDSTRSEP will be defined.
- */
-@ISC_PLATFORM_NEEDSTRSEP@
-
-/*
- * If the system needs strlcpy(), ISC_PLATFORM_NEEDSTRLCPY will be defined.
- */
-@ISC_PLATFORM_NEEDSTRLCPY@
-
-/*
- * If the system needs strlcat(), ISC_PLATFORM_NEEDSTRLCAT will be defined.
- */
-@ISC_PLATFORM_NEEDSTRLCAT@
-
-/*
- * Define if this system needs strtoul.
- */
-@ISC_PLATFORM_NEEDSTRTOUL@
-
-/*
- * Define if this system needs memmove.
- */
-@ISC_PLATFORM_NEEDMEMMOVE@
-
-/*
- * Define if this system needs strcasestr.
- */
-@ISC_PLATFORM_NEEDSTRCASESTR@
-
/***
*** Miscellaneous.
***/
diff --git a/usr.sbin/bind/lib/isc/include/isc/print.h b/usr.sbin/bind/lib/isc/include/isc/print.h
deleted file mode 100644
index 45d33ff7ebc..00000000000
--- a/usr.sbin/bind/lib/isc/include/isc/print.h
+++ /dev/null
@@ -1,112 +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 ISC_PRINT_H
-#define ISC_PRINT_H 1
-
-/*! \file isc/print.h */
-
-/***
- *** Imports
- ***/
-
-#include <isc/formatcheck.h> /* Required for ISC_FORMAT_PRINTF() macro. */
-#include <isc/lang.h>
-#include <isc/platform.h>
-
-/*!
- * This block allows lib/isc/print.c to be cleanly compiled even if
- * the platform does not need it. The standard Makefile will still
- * not compile print.c or archive print.o, so this is just to make test
- * compilation ("make print.o") easier.
- */
-#if !defined(ISC_PLATFORM_NEEDVSNPRINTF) && defined(ISC__PRINT_SOURCE)
-#define ISC_PLATFORM_NEEDVSNPRINTF
-#undef snprintf
-#undef vsnprintf
-#endif
-
-#if !defined(ISC_PLATFORM_NEEDSPRINTF) && defined(ISC__PRINT_SOURCE)
-#define ISC_PLATFORM_NEEDSPRINTF
-#undef sprintf
-#endif
-
-#if !defined(ISC_PLATFORM_NEEDFPRINTF) && defined(ISC__PRINT_SOURCE)
-#define ISC_PLATFORM_NEEDFPRINTF
-#undef fprintf
-#endif
-
-#if !defined(ISC_PLATFORM_NEEDPRINTF) && defined(ISC__PRINT_SOURCE)
-#define ISC_PLATFORM_NEEDPRINTF
-#undef printf
-#endif
-
-/***
- *** Macros
- ***/
-#define ISC_PRINT_QUADFORMAT ISC_PLATFORM_QUADFORMAT
-
-/***
- *** Functions
- ***/
-
-#ifdef ISC_PLATFORM_NEEDVSNPRINTF
-#include <stdarg.h>
-#include <stddef.h>
-#endif
-
-#include <stdio.h>
-
-ISC_LANG_BEGINDECLS
-
-#ifdef ISC_PLATFORM_NEEDVSNPRINTF
-int
-isc_print_vsnprintf(char *str, size_t size, const char *format, va_list ap)
- ISC_FORMAT_PRINTF(3, 0);
-#undef vsnprintf
-#define vsnprintf isc_print_vsnprintf
-
-int
-isc_print_snprintf(char *str, size_t size, const char *format, ...)
- ISC_FORMAT_PRINTF(3, 4);
-#undef snprintf
-#define snprintf isc_print_snprintf
-#endif /* ISC_PLATFORM_NEEDVSNPRINTF */
-
-#ifdef ISC_PLATFORM_NEEDSPRINTF
-int
-isc_print_sprintf(char *str, const char *format, ...) ISC_FORMAT_PRINTF(2, 3);
-#undef sprintf
-#define sprintf isc_print_sprintf
-#endif
-
-#ifdef ISC_PLATFORM_NEEDPRINTF
-int
-isc_print_printf(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
-#undef printf
-#define printf isc_print_printf
-#endif
-
-#ifdef ISC_PLATFORM_NEEDFPRINTF
-int
-isc_print_fprintf(FILE * fp, const char *format, ...) ISC_FORMAT_PRINTF(2, 3);
-#undef fprintf
-#define fprintf isc_print_fprintf
-#endif
-
-ISC_LANG_ENDDECLS
-
-#endif /* ISC_PRINT_H */
diff --git a/usr.sbin/bind/lib/isc/include/isc/stdlib.h b/usr.sbin/bind/lib/isc/include/isc/stdlib.h
deleted file mode 100644
index 8d875a27280..00000000000
--- a/usr.sbin/bind/lib/isc/include/isc/stdlib.h
+++ /dev/null
@@ -1,39 +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: stdlib.h,v 1.3 2019/12/17 01:46:35 sthen Exp $ */
-
-#ifndef ISC_STDLIB_H
-#define ISC_STDLIB_H 1
-
-/*! \file isc/stdlib.h */
-
-#include <stdlib.h>
-
-#include <isc/lang.h>
-#include <isc/platform.h>
-
-#ifdef ISC_PLATFORM_NEEDSTRTOUL
-#define strtoul isc_strtoul
-#endif
-
-ISC_LANG_BEGINDECLS
-
-unsigned long isc_strtoul(const char *, char **, int);
-
-ISC_LANG_ENDDECLS
-
-#endif
diff --git a/usr.sbin/bind/lib/isc/include/isc/string.h b/usr.sbin/bind/lib/isc/include/isc/string.h
index 66375cf624d..28f4a2f6f76 100644
--- a/usr.sbin/bind/lib/isc/include/isc/string.h
+++ b/usr.sbin/bind/lib/isc/include/isc/string.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: string.h,v 1.6 2019/12/17 01:46:35 sthen Exp $ */
+/* $Id: string.h,v 1.7 2020/01/09 13:47:14 florian Exp $ */
#ifndef ISC_STRING_H
#define ISC_STRING_H 1
@@ -198,40 +198,6 @@ isc_string_regiondup(isc_mem_t *mctx, const isc_region_t *source);
*
*/
-char *
-isc_string_separate(char **stringp, const char *delim);
-
-#ifdef ISC_PLATFORM_NEEDSTRSEP
-#define strsep isc_string_separate
-#endif
-
-#ifdef ISC_PLATFORM_NEEDMEMMOVE
-#define memmove(a,b,c) bcopy(b,a,c)
-#endif
-
-size_t
-isc_string_strlcpy(char *dst, const char *src, size_t size);
-
-
-#ifdef ISC_PLATFORM_NEEDSTRLCPY
-#define strlcpy isc_string_strlcpy
-#endif
-
-
-size_t
-isc_string_strlcat(char *dst, const char *src, size_t size);
-
-#ifdef ISC_PLATFORM_NEEDSTRLCAT
-#define strlcat isc_string_strlcat
-#endif
-
-char *
-isc_string_strcasestr(const char *big, const char *little);
-
-#ifdef ISC_PLATFORM_NEEDSTRCASESTR
-#define strcasestr isc_string_strcasestr
-#endif
-
ISC_LANG_ENDDECLS
#endif /* ISC_STRING_H */
diff --git a/usr.sbin/bind/lib/isc/lex.c b/usr.sbin/bind/lib/isc/lex.c
index c6627cf83a8..98de10a7b27 100644
--- a/usr.sbin/bind/lib/isc/lex.c
+++ b/usr.sbin/bind/lib/isc/lex.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lex.c,v 1.8 2019/12/17 01:46:34 sthen Exp $ */
+/* $Id: lex.c,v 1.9 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -30,7 +30,7 @@
#include <isc/mem.h>
#include <isc/msgs.h>
#include <isc/parseint.h>
-#include <isc/print.h>
+
#include <isc/stdio.h>
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isc/lib.c b/usr.sbin/bind/lib/isc/lib.c
index 3180dbc1d38..8a511fcc409 100644
--- a/usr.sbin/bind/lib/isc/lib.c
+++ b/usr.sbin/bind/lib/isc/lib.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: lib.c,v 1.3 2019/12/17 01:46:34 sthen Exp $ */
+/* $Id: lib.c,v 1.4 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -28,7 +28,7 @@
#include <isc/mem.h>
#include <isc/msgs.h>
#include <isc/once.h>
-#include <isc/print.h>
+
#include <isc/socket.h>
#include <isc/task.h>
#include <isc/timer.h>
diff --git a/usr.sbin/bind/lib/isc/log.c b/usr.sbin/bind/lib/isc/log.c
index 060e436ba1f..e02e3575950 100644
--- a/usr.sbin/bind/lib/isc/log.c
+++ b/usr.sbin/bind/lib/isc/log.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: log.c,v 1.12 2020/01/07 19:09:26 florian Exp $ */
+/* $Id: log.c,v 1.13 2020/01/09 13:47:13 florian Exp $ */
/*! \file
* \author Principal Authors: DCL */
@@ -34,7 +34,7 @@
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/msgs.h>
-#include <isc/print.h>
+
#include <isc/stat.h>
#include <isc/stdio.h>
#include <isc/string.h>
diff --git a/usr.sbin/bind/lib/isc/mem.c b/usr.sbin/bind/lib/isc/mem.c
index 5f64f59eaf6..221a80d11aa 100644
--- a/usr.sbin/bind/lib/isc/mem.c
+++ b/usr.sbin/bind/lib/isc/mem.c
@@ -33,7 +33,7 @@
#include <isc/ondestroy.h>
#include <isc/string.h>
#include <isc/mutex.h>
-#include <isc/print.h>
+
#include <isc/util.h>
#include <isc/xml.h>
@@ -2373,20 +2373,20 @@ xml_renderctx(isc__mem_t *ctx, summarystat_t *summary,
summary->total += ctx->total;
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "total"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
(isc_uint64_t)ctx->total));
TRY0(xmlTextWriterEndElement(writer)); /* total */
summary->inuse += ctx->inuse;
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "inuse"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
(isc_uint64_t)ctx->inuse));
TRY0(xmlTextWriterEndElement(writer)); /* inuse */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "maxinuse"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
(isc_uint64_t)ctx->maxinuse));
TRY0(xmlTextWriterEndElement(writer)); /* maxinuse */
@@ -2395,7 +2395,7 @@ xml_renderctx(isc__mem_t *ctx, summarystat_t *summary,
summary->blocksize += ctx->basic_table_count *
NUM_BASIC_BLOCKS * ctx->mem_target;
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
(isc_uint64_t)
ctx->basic_table_count *
NUM_BASIC_BLOCKS *
@@ -2411,13 +2411,13 @@ xml_renderctx(isc__mem_t *ctx, summarystat_t *summary,
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "hiwater"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
(isc_uint64_t)ctx->hi_water));
TRY0(xmlTextWriterEndElement(writer)); /* hiwater */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "lowater"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
(isc_uint64_t)ctx->lo_water));
TRY0(xmlTextWriterEndElement(writer)); /* lowater */
@@ -2461,31 +2461,31 @@ isc_mem_renderxml(xmlTextWriterPtr writer) {
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "TotalUse"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
summary.total));
TRY0(xmlTextWriterEndElement(writer)); /* TotalUse */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "InUse"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
summary.inuse));
TRY0(xmlTextWriterEndElement(writer)); /* InUse */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "BlockSize"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
summary.blocksize));
TRY0(xmlTextWriterEndElement(writer)); /* BlockSize */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "ContextSize"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
summary.contextsize));
TRY0(xmlTextWriterEndElement(writer)); /* ContextSize */
TRY0(xmlTextWriterStartElement(writer, ISC_XMLCHAR "Lost"));
TRY0(xmlTextWriterWriteFormatString(writer,
- "%" ISC_PRINT_QUADFORMAT "u",
+ "%llu",
lost));
TRY0(xmlTextWriterEndElement(writer)); /* Lost */
diff --git a/usr.sbin/bind/lib/isc/netaddr.c b/usr.sbin/bind/lib/isc/netaddr.c
index b76ae3cf21d..db741a07ce1 100644
--- a/usr.sbin/bind/lib/isc/netaddr.c
+++ b/usr.sbin/bind/lib/isc/netaddr.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: netaddr.c,v 1.5 2020/01/09 13:45:33 florian Exp $ */
+/* $Id: netaddr.c,v 1.6 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -26,7 +26,7 @@
#include <isc/msgs.h>
#include <isc/net.h>
#include <isc/netaddr.h>
-#include <isc/print.h>
+
#include <isc/sockaddr.h>
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isc/parseint.c b/usr.sbin/bind/lib/isc/parseint.c
index 7c57dd4f259..620cc71b09a 100644
--- a/usr.sbin/bind/lib/isc/parseint.c
+++ b/usr.sbin/bind/lib/isc/parseint.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: parseint.c,v 1.3 2019/12/17 01:46:34 sthen Exp $ */
+/* $Id: parseint.c,v 1.4 2020/01/09 13:47:13 florian Exp $ */
/*! \file */
@@ -23,10 +23,11 @@
#include <ctype.h>
#include <errno.h>
#include <limits.h>
+#include <stdlib.h>
#include <isc/parseint.h>
#include <isc/result.h>
-#include <isc/stdlib.h>
+
isc_result_t
isc_parse_uint32(isc_uint32_t *uip, const char *string, int base) {
diff --git a/usr.sbin/bind/lib/isc/pk11.c b/usr.sbin/bind/lib/isc/pk11.c
index b7ebd961e67..e7ff8bd3f8c 100644
--- a/usr.sbin/bind/lib/isc/pk11.c
+++ b/usr.sbin/bind/lib/isc/pk11.c
@@ -24,7 +24,7 @@
#include <isc/mem.h>
#include <isc/once.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/stdio.h>
#include <isc/string.h>
#include <isc/thread.h>
diff --git a/usr.sbin/bind/lib/isc/print.c b/usr.sbin/bind/lib/isc/print.c
deleted file mode 100644
index e9f169c38d3..00000000000
--- a/usr.sbin/bind/lib/isc/print.c
+++ /dev/null
@@ -1,700 +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.
- */
-
-/*! \file */
-
-#include <config.h>
-
-#include <ctype.h>
-#include <stdio.h> /* for sprintf() */
-#include <string.h> /* for strlen() */
-#include <assert.h> /* for assert() */
-
-#define ISC__PRINT_SOURCE /* Used to get the isc_print_* prototypes. */
-
-#include <isc/assertions.h>
-#include <isc/int.h>
-#include <isc/msgs.h>
-#include <isc/print.h>
-#include <isc/stdlib.h>
-#include <isc/util.h>
-
-/*
- * We use the system's sprintf so we undef it here.
- */
-#undef sprintf
-
-static int
-isc__print_printf(void (*emit)(char, void *), void *arg,
- const char *format, va_list ap);
-
-static void
-file_emit(char c, void *arg) {
- FILE *fp = arg;
- int i = c & 0xff;
-
- putc(i, fp);
-}
-
-#if 0
-static int
-isc_print_vfprintf(FILE *fp, const char *format, va_list ap) {
- assert(fp != NULL);
- assert(format != NULL);
-
- return (isc__print_printf(file_emit, fp, format, ap));
-}
-#endif
-
-int
-isc_print_printf(const char *format, ...) {
- va_list ap;
- int n;
-
- assert(format != NULL);
-
- va_start(ap, format);
- n = isc__print_printf(file_emit, stdout, format, ap);
- va_end(ap);
- return (n);
-}
-
-int
-isc_print_fprintf(FILE *fp, const char *format, ...) {
- va_list ap;
- int n;
-
- assert(fp != NULL);
- assert(format != NULL);
-
- va_start(ap, format);
- n = isc__print_printf(file_emit, fp, format, ap);
- va_end(ap);
- return (n);
-}
-
-static void
-nocheck_emit(char c, void *arg) {
- struct { char *str; } *a = arg;
-
- *(a->str)++ = c;
-}
-
-int
-isc_print_sprintf(char *str, const char *format, ...) {
- struct { char *str; } arg;
- int n;
- va_list ap;
-
- arg.str = str;
-
- va_start(ap, format);
- n = isc__print_printf(nocheck_emit, &arg, format, ap);
- va_end(ap);
- return (n);
-}
-
-/*!
- * Return length of string that would have been written if not truncated.
- */
-
-int
-isc_print_snprintf(char *str, size_t size, const char *format, ...) {
- va_list ap;
- int ret;
-
- va_start(ap, format);
- ret = isc_print_vsnprintf(str, size, format, ap);
- va_end(ap);
- return (ret);
-
-}
-
-/*!
- * Return length of string that would have been written if not truncated.
- */
-
-static void
-string_emit(char c, void *arg) {
- struct { char *str; size_t size; } *p = arg;
-
- if (p->size > 0) {
- *(p->str)++ = c;
- p->size--;
- }
-}
-
-int
-isc_print_vsnprintf(char *str, size_t size, const char *format, va_list ap) {
- struct { char *str; size_t size; } arg;
- int n;
-
- assert(str != NULL);
- assert(format != NULL);
-
- arg.str = str;
- arg.size = size;
-
- n = isc__print_printf(string_emit, &arg, format, ap);
- if (arg.size > 0)
- *arg.str = '\0';
- return (n);
-}
-
-static int
-isc__print_printf(void (*emit)(char, void *), void *arg,
- const char *format, va_list ap)
-{
- int h;
- int l;
- int z;
- int q;
- int alt;
- int zero;
- int left;
- int plus;
- int space;
- int neg;
- isc_int64_t tmpi;
- isc_uint64_t tmpui;
- unsigned long width;
- unsigned long precision;
- unsigned int length;
- char buf[1024];
- char c;
- void *v;
- const char *cp;
- const char *head;
- int count = 0;
- int pad;
- int zeropad;
- int dot;
- double dbl;
- isc_boolean_t precision_set;
-#ifdef HAVE_LONG_DOUBLE
- long double ldbl;
-#endif
- char fmt[32];
-
- assert(emit != NULL);
- assert(arg != NULL);
- assert(format != NULL);
-
- while (*format != '\0') {
- if (*format != '%') {
- emit(*format++, arg);
- count++;
- continue;
- }
- format++;
-
- /*
- * Reset flags.
- */
- dot = neg = space = plus = left = zero = alt = h = l = q = z = 0;
- width = precision = 0;
- head = "";
- pad = zeropad = 0;
- precision_set = ISC_FALSE;
-
- do {
- if (*format == '#') {
- alt = 1;
- format++;
- } else if (*format == '-') {
- left = 1;
- zero = 0;
- format++;
- } else if (*format == ' ') {
- if (!plus)
- space = 1;
- format++;
- } else if (*format == '+') {
- plus = 1;
- space = 0;
- format++;
- } else if (*format == '0') {
- if (!left)
- zero = 1;
- format++;
- } else
- break;
- } while (1);
-
- /*
- * Width.
- */
- if (*format == '*') {
- width = va_arg(ap, int);
- format++;
- } else if (isdigit((unsigned char)*format)) {
- char *e;
- width = strtoul(format, &e, 10);
- format = e;
- }
-
- /*
- * Precision.
- */
- if (*format == '.') {
- format++;
- dot = 1;
- if (*format == '*') {
- precision = va_arg(ap, int);
- precision_set = ISC_TRUE;
- format++;
- } else if (isdigit((unsigned char)*format)) {
- char *e;
- precision = strtoul(format, &e, 10);
- precision_set = ISC_TRUE;
- format = e;
- }
- }
-
- switch (*format) {
- case '\0':
- continue;
- case '%':
- emit(*format, arg);
- count++;
- break;
- case 'q':
- q = 1;
- format++;
- goto doint;
- case 'h':
- h = 1;
- format++;
- goto doint;
- case 'l':
- l = 1;
- format++;
- if (*format == 'l') {
- q = 1;
- format++;
- }
- goto doint;
- case 'z':
- z = 1;
- format++;
- goto doint;
- case 'n':
- case 'i':
- case 'd':
- case 'o':
- case 'u':
- case 'x':
- case 'X':
- doint:
- if (precision != 0)
- zero = 0;
- switch (*format) {
- case 'n':
- if (h) {
- short int *p;
- p = va_arg(ap, short *);
- assert(p != NULL);
- *p = count;
- } else if (l) {
- long int *p;
- p = va_arg(ap, long *);
- assert(p != NULL);
- *p = count;
- } else if (z) {
- size_t *p;
- p = va_arg(ap, size_t *);
- assert(p != NULL);
- *p = count;
- } else {
- int *p;
- p = va_arg(ap, int *);
- assert(p != NULL);
- *p = count;
- }
- break;
- case 'i':
- case 'd':
- if (q)
- tmpi = va_arg(ap, isc_int64_t);
- else if (l)
- tmpi = va_arg(ap, long int);
- else if (z)
- tmpi = va_arg(ap, ssize_t);
- else
- tmpi = va_arg(ap, int);
- if (tmpi < 0) {
- head = "-";
- tmpui = -tmpi;
- } else {
- if (plus)
- head = "+";
- else if (space)
- head = " ";
- else
- head = "";
- tmpui = tmpi;
- }
- if (tmpui <= 0xffffffffU)
- sprintf(buf, "%lu",
- (unsigned long)tmpui);
- else {
- unsigned long mid;
- unsigned long lo;
- unsigned long hi;
- lo = tmpui % 1000000000;
- tmpui /= 1000000000;
- mid = tmpui % 1000000000;
- hi = tmpui / 1000000000;
- if (hi != 0U) {
- sprintf(buf, "%lu", hi);
- sprintf(buf + strlen(buf),
- "%09lu", mid);
- } else
- sprintf(buf, "%lu", mid);
- sprintf(buf + strlen(buf), "%09lu",
- lo);
- }
- goto printint;
- case 'o':
- if (q)
- tmpui = va_arg(ap, isc_uint64_t);
- else if (l)
- tmpui = va_arg(ap, long int);
- else if (z)
- tmpui = va_arg(ap, size_t);
- else
- tmpui = va_arg(ap, int);
- if (tmpui <= 0xffffffffU)
- sprintf(buf, alt ? "%#lo" : "%lo",
- (unsigned long)tmpui);
- else {
- unsigned long mid;
- unsigned long lo;
- unsigned long hi;
- lo = tmpui % 010000000000;
- tmpui /= 010000000000;
- mid = tmpui % 010000000000;
- hi = tmpui / 010000000000;
- if (hi != 0) {
- sprintf(buf,
- alt ? "%#lo" : "%lo",
- hi);
- sprintf(buf + strlen(buf),
- "%09lo", mid);
- } else
- sprintf(buf,
- alt ? "%#lo" : "%lo",
- mid);
- sprintf(buf + strlen(buf), "%09lo", lo);
- }
- goto printint;
- case 'u':
- if (q)
- tmpui = va_arg(ap, isc_uint64_t);
- else if (l)
- tmpui = va_arg(ap, unsigned long int);
- else if (z)
- tmpui = va_arg(ap, size_t);
- else
- tmpui = va_arg(ap, unsigned int);
- if (tmpui <= 0xffffffffU)
- sprintf(buf, "%lu",
- (unsigned long)tmpui);
- else {
- unsigned long mid;
- unsigned long lo;
- unsigned long hi;
- lo = tmpui % 1000000000;
- tmpui /= 1000000000;
- mid = tmpui % 1000000000;
- hi = tmpui / 1000000000;
- if (hi != 0U) {
- sprintf(buf, "%lu", hi);
- sprintf(buf + strlen(buf),
- "%09lu", mid);
- } else
- sprintf(buf, "%lu", mid);
- sprintf(buf + strlen(buf), "%09lu",
- lo);
- }
- goto printint;
- case 'x':
- if (q)
- tmpui = va_arg(ap, isc_uint64_t);
- else if (l)
- tmpui = va_arg(ap, unsigned long int);
- else if (z)
- tmpui = va_arg(ap, size_t);
- else
- tmpui = va_arg(ap, unsigned int);
- if (alt) {
- head = "0x";
- if (precision > 2)
- precision -= 2;
- }
- if (tmpui <= 0xffffffffU)
- sprintf(buf, "%lx",
- (unsigned long)tmpui);
- else {
- unsigned long hi = tmpui>>32;
- unsigned long lo = tmpui & 0xffffffff;
- sprintf(buf, "%lx", hi);
- sprintf(buf + strlen(buf), "%08lx", lo);
- }
- goto printint;
- case 'X':
- if (q)
- tmpui = va_arg(ap, isc_uint64_t);
- else if (l)
- tmpui = va_arg(ap, unsigned long int);
- else if (z)
- tmpui = va_arg(ap, size_t);
- else
- tmpui = va_arg(ap, unsigned int);
- if (alt) {
- head = "0X";
- if (precision > 2)
- precision -= 2;
- }
- if (tmpui <= 0xffffffffU)
- sprintf(buf, "%lX",
- (unsigned long)tmpui);
- else {
- unsigned long hi = tmpui>>32;
- unsigned long lo = tmpui & 0xffffffff;
- sprintf(buf, "%lX", hi);
- sprintf(buf + strlen(buf), "%08lX", lo);
- }
- goto printint;
- printint:
- if (precision_set || width != 0U) {
- length = strlen(buf);
- if (length < precision)
- zeropad = precision - length;
- else if (length < width && zero)
- zeropad = width - length;
- if (width != 0) {
- pad = width - length -
- zeropad - strlen(head);
- if (pad < 0)
- pad = 0;
- }
- }
- count += strlen(head) + strlen(buf) + pad +
- zeropad;
- if (!left) {
- while (pad > 0) {
- emit(' ', arg);
- pad--;
- }
- }
- cp = head;
- while (*cp != '\0')
- emit(*cp++, arg);
- while (zeropad > 0) {
- emit('0', arg);
- zeropad--;
- }
- cp = buf;
- while (*cp != '\0')
- emit(*cp++, arg);
- while (pad > 0) {
- emit(' ', arg);
- pad--;
- }
- break;
- default:
- break;
- }
- break;
- case 's':
- cp = va_arg(ap, char *);
-
- if (precision_set) {
- /*
- * cp need not be NULL terminated.
- */
- const char *tp;
- unsigned long n;
-
- if (precision != 0U)
- assert(cp != NULL);
- n = precision;
- tp = cp;
- while (n != 0 && *tp != '\0')
- n--, tp++;
- length = precision - n;
- } else {
- assert(cp != NULL);
- length = strlen(cp);
- }
- if (width != 0) {
- pad = width - length;
- if (pad < 0)
- pad = 0;
- }
- count += pad + length;
- if (!left)
- while (pad > 0) {
- emit(' ', arg);
- pad--;
- }
- if (precision_set)
- while (precision > 0U && *cp != '\0') {
- emit(*cp++, arg);
- precision--;
- }
- else
- while (*cp != '\0')
- emit(*cp++, arg);
- while (pad > 0) {
- emit(' ', arg);
- pad--;
- }
- break;
- case 'c':
- c = va_arg(ap, int);
- if (width > 0) {
- count += width;
- width--;
- if (left)
- emit(c, arg);
- while (width-- > 0)
- emit(' ', arg);
- if (!left)
- emit(c, arg);
- } else {
- count++;
- emit(c, arg);
- }
- break;
- case 'p':
- v = va_arg(ap, void *);
- sprintf(buf, "%p", v);
- length = strlen(buf);
- if (precision > length)
- zeropad = precision - length;
- if (width > 0) {
- pad = width - length - zeropad;
- if (pad < 0)
- pad = 0;
- }
- count += length + pad + zeropad;
- if (!left)
- while (pad > 0) {
- emit(' ', arg);
- pad--;
- }
- cp = buf;
- if (zeropad > 0 && buf[0] == '0' &&
- (buf[1] == 'x' || buf[1] == 'X')) {
- emit(*cp++, arg);
- emit(*cp++, arg);
- while (zeropad > 0) {
- emit('0', arg);
- zeropad--;
- }
- }
- while (*cp != '\0')
- emit(*cp++, arg);
- while (pad > 0) {
- emit(' ', arg);
- pad--;
- }
- break;
- case 'D': /*deprecated*/
- assert("use %ld instead of %D" == NULL);
- case 'O': /*deprecated*/
- assert("use %lo instead of %O" == NULL);
- case 'U': /*deprecated*/
- assert("use %lu instead of %U" == NULL);
-
- case 'L':
-#ifdef HAVE_LONG_DOUBLE
- l = 1;
-#else
- assert("long doubles are not supported" == NULL);
-#endif
- /* FALLTHROUGH */
- case 'e':
- case 'E':
- case 'f':
- case 'g':
- case 'G':
- if (!dot)
- precision = 6;
- /*
- * IEEE floating point.
- * MIN 2.2250738585072014E-308
- * MAX 1.7976931348623157E+308
- * VAX floating point has a smaller range than IEEE.
- *
- * precisions > 324 don't make much sense.
- * if we cap the precision at 512 we will not
- * overflow buf.
- */
- if (precision > 512)
- precision = 512;
- sprintf(fmt, "%%%s%s.%lu%s%c", alt ? "#" : "",
- plus ? "+" : space ? " " : "",
- precision, l ? "L" : "", *format);
- switch (*format) {
- case 'e':
- case 'E':
- case 'f':
- case 'g':
- case 'G':
-#ifdef HAVE_LONG_DOUBLE
- if (l) {
- ldbl = va_arg(ap, long double);
- sprintf(buf, fmt, ldbl);
- } else
-#endif
- {
- dbl = va_arg(ap, double);
- sprintf(buf, fmt, dbl);
- }
- length = strlen(buf);
- if (width > 0) {
- pad = width - length;
- if (pad < 0)
- pad = 0;
- }
- count += length + pad;
- if (!left)
- while (pad > 0) {
- emit(' ', arg);
- pad--;
- }
- cp = buf;
- while (*cp != '\0')
- emit(*cp++, arg);
- while (pad > 0) {
- emit(' ', arg);
- pad--;
- }
- break;
- default:
- continue;
- }
- break;
- default:
- continue;
- }
- format++;
- }
- return (count);
-}
diff --git a/usr.sbin/bind/lib/isc/regex.c b/usr.sbin/bind/lib/isc/regex.c
index f4fc006173e..a93fdd1d6d3 100644
--- a/usr.sbin/bind/lib/isc/regex.c
+++ b/usr.sbin/bind/lib/isc/regex.c
@@ -17,7 +17,7 @@
#include <config.h>
#include <isc/file.h>
-#include <isc/print.h>
+
#include <isc/regex.h>
#include <isc/string.h>
diff --git a/usr.sbin/bind/lib/isc/rwlock.c b/usr.sbin/bind/lib/isc/rwlock.c
index 12fc3726336..ec07636f144 100644
--- a/usr.sbin/bind/lib/isc/rwlock.c
+++ b/usr.sbin/bind/lib/isc/rwlock.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rwlock.c,v 1.8 2020/01/07 19:08:09 florian Exp $ */
+/* $Id: rwlock.c,v 1.9 2020/01/09 13:47:14 florian Exp $ */
/*! \file */
@@ -26,7 +26,7 @@
#include <isc/magic.h>
#include <isc/msgs.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/rwlock.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isc/sockaddr.c b/usr.sbin/bind/lib/isc/sockaddr.c
index b40667ab549..8a37b419e9b 100644
--- a/usr.sbin/bind/lib/isc/sockaddr.c
+++ b/usr.sbin/bind/lib/isc/sockaddr.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: sockaddr.c,v 1.10 2020/01/09 13:45:33 florian Exp $ */
+/* $Id: sockaddr.c,v 1.11 2020/01/09 13:47:14 florian Exp $ */
/*! \file */
@@ -26,7 +26,7 @@
#include <isc/hash.h>
#include <isc/msgs.h>
#include <isc/netaddr.h>
-#include <isc/print.h>
+
#include <isc/region.h>
#include <isc/sockaddr.h>
#include <isc/string.h>
diff --git a/usr.sbin/bind/lib/isc/stats.c b/usr.sbin/bind/lib/isc/stats.c
index fee6a2c7b24..282c738b642 100644
--- a/usr.sbin/bind/lib/isc/stats.c
+++ b/usr.sbin/bind/lib/isc/stats.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: stats.c,v 1.2 2019/12/17 01:46:34 sthen Exp $ */
+/* $Id: stats.c,v 1.3 2020/01/09 13:47:14 florian Exp $ */
/*! \file */
@@ -27,7 +27,7 @@
#include <isc/magic.h>
#include <isc/mem.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/rwlock.h>
#include <isc/stats.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isc/string.c b/usr.sbin/bind/lib/isc/string.c
index 7d498cbe514..9f649922ea3 100644
--- a/usr.sbin/bind/lib/isc/string.c
+++ b/usr.sbin/bind/lib/isc/string.c
@@ -50,7 +50,7 @@
#include <ctype.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/region.h>
#include <isc/string.h>
#include <isc/util.h>
@@ -220,99 +220,3 @@ isc_string_regiondup(isc_mem_t *mctx, const isc_region_t *source) {
return (target);
}
-
-char *
-isc_string_separate(char **stringp, const char *delim) {
- char *string = *stringp;
- char *s;
- const char *d;
- char sc, dc;
-
- if (string == NULL)
- return (NULL);
-
- for (s = string; (sc = *s) != '\0'; s++)
- for (d = delim; (dc = *d) != '\0'; d++)
- if (sc == dc) {
- *s++ = '\0';
- *stringp = s;
- return (string);
- }
- *stringp = NULL;
- return (string);
-}
-
-size_t
-isc_string_strlcpy(char *dst, const char *src, size_t size)
-{
- char *d = dst;
- const char *s = src;
- size_t n = size;
-
- /* Copy as many bytes as will fit */
- if (n != 0U && --n != 0U) {
- do {
- if ((*d++ = *s++) == 0)
- break;
- } while (--n != 0U);
- }
-
- /* Not enough room in dst, add NUL and traverse rest of src */
- if (n == 0U) {
- if (size != 0U)
- *d = '\0'; /* NUL-terminate dst */
- while (*s++)
- ;
- }
-
- return(s - src - 1); /* count does not include NUL */
-}
-
-size_t
-isc_string_strlcat(char *dst, const char *src, size_t size)
-{
- char *d = dst;
- const char *s = src;
- size_t n = size;
- size_t dlen;
-
- /* Find the end of dst and adjust bytes left but don't go past end */
- while (n-- != 0U && *d != '\0')
- d++;
- dlen = d - dst;
- n = size - dlen;
-
- if (n == 0U)
- return(dlen + strlen(s));
- while (*s != '\0') {
- if (n != 1U) {
- *d++ = *s;
- n--;
- }
- s++;
- }
- *d = '\0';
-
- return(dlen + (s - src)); /* count does not include NUL */
-}
-
-char *
-isc_string_strcasestr(const char *str, const char *search) {
- char c, sc, *s;
- size_t len;
-
- if ((c = *search++) != 0) {
- c = tolower((unsigned char) c);
- len = strlen(search);
- do {
- do {
- if ((sc = *str++) == 0)
- return (NULL);
- } while ((char) tolower((unsigned char) sc) != c);
- } while (strncasecmp(str, search, len) != 0);
- str--;
- }
- DE_CONST(str, s);
- return (s);
-
-}
diff --git a/usr.sbin/bind/lib/isc/strtoul.c b/usr.sbin/bind/lib/isc/strtoul.c
deleted file mode 100644
index 25337205044..00000000000
--- a/usr.sbin/bind/lib/isc/strtoul.c
+++ /dev/null
@@ -1,124 +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.
- */
-
-/*
- * Copyright (c) 1990, 1993
- * The Regents of the University of California. 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 University 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 REGENTS 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 REGENTS 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.
- */
-
-/*! \file */
-#if defined(LIBC_SCCS) && !defined(lint)
-static char sccsid[] = "@(#)strtoul.c 8.1 (Berkeley) 6/4/93";
-#endif /* LIBC_SCCS and not lint */
-
-/* $Id: strtoul.c,v 1.3 2019/12/17 01:46:34 sthen Exp $ */
-
-#include <config.h>
-
-#include <limits.h>
-#include <ctype.h>
-#include <errno.h>
-
-#include <isc/stdlib.h>
-#include <isc/util.h>
-
-/*!
- * Convert a string to an unsigned long integer.
- *
- * Ignores `locale' stuff. Assumes that the upper and lower case
- * alphabets and digits are each contiguous.
- */
-unsigned long
-isc_strtoul(const char *nptr, char **endptr, int base) {
- const char *s = nptr;
- unsigned long acc;
- unsigned char c;
- unsigned long cutoff;
- int neg = 0, any, cutlim;
-
- /*
- * See strtol for comments as to the logic used.
- */
- do {
- c = *s++;
- } while (isspace(c));
- if (c == '-') {
- neg = 1;
- c = *s++;
- } else if (c == '+')
- c = *s++;
- if ((base == 0 || base == 16) &&
- c == '0' && (*s == 'x' || *s == 'X')) {
- c = s[1];
- s += 2;
- base = 16;
- }
- if (base == 0)
- base = c == '0' ? 8 : 10;
- cutoff = (unsigned long)ULONG_MAX / (unsigned long)base;
- cutlim = (unsigned long)ULONG_MAX % (unsigned long)base;
- for (acc = 0, any = 0;; c = *s++) {
- if (!isascii(c))
- break;
- if (isdigit(c))
- c -= '0';
- else if (isalpha(c))
- c -= isupper(c) ? 'A' - 10 : 'a' - 10;
- else
- break;
- if (c >= base)
- break;
- if (any < 0 || acc > cutoff || (acc == cutoff && c > cutlim))
- any = -1;
- else {
- any = 1;
- acc *= base;
- acc += c;
- }
- }
- if (any < 0) {
- acc = ULONG_MAX;
- errno = ERANGE;
- } else if (neg)
- acc = -acc;
- if (endptr != 0)
- DE_CONST(any ? s - 1 : nptr, *endptr);
- return (acc);
-}
diff --git a/usr.sbin/bind/lib/isc/task.c b/usr.sbin/bind/lib/isc/task.c
index b0559d1d2f8..a69b9cf245e 100644
--- a/usr.sbin/bind/lib/isc/task.c
+++ b/usr.sbin/bind/lib/isc/task.c
@@ -34,7 +34,7 @@
#include <isc/msgs.h>
#include <isc/once.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/task.h>
#include <isc/thread.h>
diff --git a/usr.sbin/bind/lib/isc/timer.c b/usr.sbin/bind/lib/isc/timer.c
index 013557ed968..9c2eab184ef 100644
--- a/usr.sbin/bind/lib/isc/timer.c
+++ b/usr.sbin/bind/lib/isc/timer.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: timer.c,v 1.6 2020/01/07 19:09:26 florian Exp $ */
+/* $Id: timer.c,v 1.7 2020/01/09 13:47:14 florian Exp $ */
/*! \file */
@@ -29,7 +29,7 @@
#include <isc/msgs.h>
#include <isc/once.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/task.h>
#include <isc/thread.h>
#include <isc/time.h>
diff --git a/usr.sbin/bind/lib/isc/unix/dir.c b/usr.sbin/bind/lib/isc/unix/dir.c
index 287aa70a39c..90d110ad63a 100644
--- a/usr.sbin/bind/lib/isc/unix/dir.c
+++ b/usr.sbin/bind/lib/isc/unix/dir.c
@@ -29,7 +29,7 @@
#include <isc/dir.h>
#include <isc/magic.h>
#include <isc/netdb.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isc/unix/entropy.c b/usr.sbin/bind/lib/isc/unix/entropy.c
index 8788c7c3db3..3f5c9800921 100644
--- a/usr.sbin/bind/lib/isc/unix/entropy.c
+++ b/usr.sbin/bind/lib/isc/unix/entropy.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: entropy.c,v 1.9 2020/01/09 13:45:33 florian Exp $ */
+/* $Id: entropy.c,v 1.10 2020/01/09 13:47:14 florian Exp $ */
/* \file unix/entropy.c
* \brief
@@ -36,7 +36,7 @@
#include <unistd.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/strerror.h>
#include <isc/string.h>
diff --git a/usr.sbin/bind/lib/isc/unix/ifiter_ioctl.c b/usr.sbin/bind/lib/isc/unix/ifiter_ioctl.c
index 078dbd4effe..7d074d8df1a 100644
--- a/usr.sbin/bind/lib/isc/unix/ifiter_ioctl.c
+++ b/usr.sbin/bind/lib/isc/unix/ifiter_ioctl.c
@@ -14,9 +14,9 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ifiter_ioctl.c,v 1.11 2020/01/09 13:45:33 florian Exp $ */
+/* $Id: ifiter_ioctl.c,v 1.12 2020/01/09 13:47:14 florian Exp $ */
+
-#include <isc/print.h>
/*! \file
* \brief
diff --git a/usr.sbin/bind/lib/isc/unix/ifiter_sysctl.c b/usr.sbin/bind/lib/isc/unix/ifiter_sysctl.c
index 5e55630e5f1..da487cb5754 100644
--- a/usr.sbin/bind/lib/isc/unix/ifiter_sysctl.c
+++ b/usr.sbin/bind/lib/isc/unix/ifiter_sysctl.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: ifiter_sysctl.c,v 1.4 2020/01/09 13:45:33 florian Exp $ */
+/* $Id: ifiter_sysctl.c,v 1.5 2020/01/09 13:47:14 florian Exp $ */
/*! \file
* \brief
@@ -29,7 +29,7 @@
#include <net/route.h>
#include <net/if_dl.h>
-#include <isc/print.h>
+
/* XXX what about Alpha? */
#ifdef sgi
diff --git a/usr.sbin/bind/lib/isc/unix/interfaceiter.c b/usr.sbin/bind/lib/isc/unix/interfaceiter.c
index 7f01777f8c1..1fbc7de8407 100644
--- a/usr.sbin/bind/lib/isc/unix/interfaceiter.c
+++ b/usr.sbin/bind/lib/isc/unix/interfaceiter.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: interfaceiter.c,v 1.4 2020/01/09 13:45:33 florian Exp $ */
+/* $Id: interfaceiter.c,v 1.5 2020/01/09 13:47:14 florian Exp $ */
/*! \file */
@@ -37,7 +37,7 @@
#include <isc/mem.h>
#include <isc/msgs.h>
#include <isc/net.h>
-#include <isc/print.h>
+
#include <isc/result.h>
#include <isc/strerror.h>
#include <isc/string.h>
diff --git a/usr.sbin/bind/lib/isc/unix/pk11_api.c b/usr.sbin/bind/lib/isc/unix/pk11_api.c
index c610c36d2da..66334fd33b0 100644
--- a/usr.sbin/bind/lib/isc/unix/pk11_api.c
+++ b/usr.sbin/bind/lib/isc/unix/pk11_api.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: pk11_api.c,v 1.2 2019/12/17 01:46:37 sthen Exp $ */
+/* $Id: pk11_api.c,v 1.3 2020/01/09 13:47:14 florian Exp $ */
/*! \file */
@@ -26,7 +26,7 @@
#include <isc/log.h>
#include <isc/mem.h>
#include <isc/once.h>
-#include <isc/print.h>
+
#include <isc/stdio.h>
#include <isc/thread.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isc/unix/socket.c b/usr.sbin/bind/lib/isc/unix/socket.c
index 5ad9c0e1a01..e86c2a09cd1 100644
--- a/usr.sbin/bind/lib/isc/unix/socket.c
+++ b/usr.sbin/bind/lib/isc/unix/socket.c
@@ -53,7 +53,7 @@
#include <isc/net.h>
#include <isc/once.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/region.h>
#include <isc/resource.h>
#include <isc/socket.h>
diff --git a/usr.sbin/bind/lib/isc/unix/strerror.c b/usr.sbin/bind/lib/isc/unix/strerror.c
index 08643c70540..95c91294ee3 100644
--- a/usr.sbin/bind/lib/isc/unix/strerror.c
+++ b/usr.sbin/bind/lib/isc/unix/strerror.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: strerror.c,v 1.3 2019/12/17 01:46:37 sthen Exp $ */
+/* $Id: strerror.c,v 1.4 2020/01/09 13:47:14 florian Exp $ */
/*! \file */
@@ -25,7 +25,7 @@
#include <isc/mutex.h>
#include <isc/once.h>
-#include <isc/print.h>
+
#include <isc/strerror.h>
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isc/unix/time.c b/usr.sbin/bind/lib/isc/unix/time.c
index b27e3baa804..056c35cbcdb 100644
--- a/usr.sbin/bind/lib/isc/unix/time.c
+++ b/usr.sbin/bind/lib/isc/unix/time.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: time.c,v 1.7 2020/01/07 19:08:10 florian Exp $ */
+/* $Id: time.c,v 1.8 2020/01/09 13:47:14 florian Exp $ */
/*! \file */
@@ -30,7 +30,7 @@
#include <isc/log.h>
#include <isc/platform.h>
-#include <isc/print.h>
+
#include <isc/strerror.h>
#include <isc/string.h>
#include <isc/time.h>
diff --git a/usr.sbin/bind/lib/isccfg/aclconf.c b/usr.sbin/bind/lib/isccfg/aclconf.c
index aa01b30bbec..47815be93c6 100644
--- a/usr.sbin/bind/lib/isccfg/aclconf.c
+++ b/usr.sbin/bind/lib/isccfg/aclconf.c
@@ -17,7 +17,7 @@
#include <config.h>
#include <isc/mem.h>
-#include <isc/print.h>
+
#include <isc/string.h> /* Required for HP/UX (and others?) */
#include <isc/util.h>
diff --git a/usr.sbin/bind/lib/isccfg/parser.c b/usr.sbin/bind/lib/isccfg/parser.c
index ecf17cd6c42..6f45bb5c005 100644
--- a/usr.sbin/bind/lib/isccfg/parser.c
+++ b/usr.sbin/bind/lib/isccfg/parser.c
@@ -29,7 +29,7 @@
#include <isc/net.h>
#include <isc/netaddr.h>
#include <isc/netscope.h>
-#include <isc/print.h>
+
#include <isc/string.h>
#include <isc/sockaddr.h>
#include <isc/symtab.h>
@@ -848,7 +848,7 @@ void
cfg_print_uint64(cfg_printer_t *pctx, const cfg_obj_t *obj) {
char buf[32];
- snprintf(buf, sizeof(buf), "%" ISC_PRINT_QUADFORMAT "u",
+ snprintf(buf, sizeof(buf), "%llu",
obj->value.uint64);
cfg_print_cstr(pctx, buf);
}