summaryrefslogtreecommitdiff
path: root/usr.bin
diff options
context:
space:
mode:
Diffstat (limited to 'usr.bin')
-rw-r--r--usr.bin/dig/dig.h6
-rw-r--r--usr.bin/dig/lib/dns/rdata.c4
-rw-r--r--usr.bin/dig/lib/dns/tsig.c4
-rw-r--r--usr.bin/dig/lib/isc/error.c6
-rw-r--r--usr.bin/dig/lib/isc/include/isc/buffer.h4
-rw-r--r--usr.bin/dig/lib/isc/include/isc/error.h8
-rw-r--r--usr.bin/dig/lib/isc/include/isc/formatcheck.h39
-rw-r--r--usr.bin/dig/lib/isc/include/isc/log.h12
-rw-r--r--usr.bin/dig/lib/isc/log.c4
-rw-r--r--usr.bin/dig/lib/isc/unix/socket.c4
-rw-r--r--usr.bin/dig/lib/isccfg/include/isccfg/cfg.h4
-rw-r--r--usr.bin/dig/lib/isccfg/parser.c4
12 files changed, 30 insertions, 69 deletions
diff --git a/usr.bin/dig/dig.h b/usr.bin/dig/dig.h
index 5adfe3a0419..b2ce401e19b 100644
--- a/usr.bin/dig/dig.h
+++ b/usr.bin/dig/dig.h
@@ -23,7 +23,7 @@
#include <isc/boolean.h>
#include <isc/buffer.h>
-#include <isc/formatcheck.h>
+
#include <isc/list.h>
#include <isc/time.h>
#include <isc/sockaddr.h>
@@ -268,10 +268,10 @@ get_reverse(char *reverse, size_t len, char *value, isc_boolean_t ip6_int,
__dead void
fatal(const char *format, ...)
-ISC_FORMAT_PRINTF(1, 2);
+__attribute__((__format__(__printf__, 1, 2)));
void
-debug(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
+debug(const char *format, ...) __attribute__((__format__(__printf__, 1, 2)));
void
check_result(isc_result_t result, const char *msg);
diff --git a/usr.bin/dig/lib/dns/rdata.c b/usr.bin/dig/lib/dns/rdata.c
index a2116e1e60a..d62e2a98b16 100644
--- a/usr.bin/dig/lib/dns/rdata.c
+++ b/usr.bin/dig/lib/dns/rdata.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: rdata.c,v 1.6 2020/02/13 16:55:20 florian Exp $ */
+/* $Id: rdata.c,v 1.7 2020/02/13 16:57:55 florian Exp $ */
/*! \file */
@@ -198,7 +198,7 @@ atob_tobuffer(isc_lex_t *lexer, isc_buffer_t *target);
static void
default_fromtext_callback(dns_rdatacallbacks_t *callbacks, const char *, ...)
- ISC_FORMAT_PRINTF(2, 3);
+ __attribute__((__format__(__printf__, 2, 3)));
static void
fromtext_error(void (*callback)(dns_rdatacallbacks_t *, const char *, ...),
diff --git a/usr.bin/dig/lib/dns/tsig.c b/usr.bin/dig/lib/dns/tsig.c
index 049ece42338..51ad1de63e5 100644
--- a/usr.bin/dig/lib/dns/tsig.c
+++ b/usr.bin/dig/lib/dns/tsig.c
@@ -15,7 +15,7 @@
*/
/*
- * $Id: tsig.c,v 1.5 2020/02/13 16:55:20 florian Exp $
+ * $Id: tsig.c,v 1.6 2020/02/13 16:57:55 florian Exp $
*/
/*! \file */
@@ -91,7 +91,7 @@ tsig_verify_tcp(isc_buffer_t *source, dns_message_t *msg);
static void
tsig_log(dns_tsigkey_t *key, int level, const char *fmt, ...)
- ISC_FORMAT_PRINTF(3, 4);
+ __attribute__((__format__(__printf__, 3, 4)));
static void
tsigkey_free(dns_tsigkey_t *key);
diff --git a/usr.bin/dig/lib/isc/error.c b/usr.bin/dig/lib/isc/error.c
index fb8d1724d03..92840b3dc5f 100644
--- a/usr.bin/dig/lib/isc/error.c
+++ b/usr.bin/dig/lib/isc/error.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: error.c,v 1.3 2020/02/12 13:05:04 jsg Exp $ */
+/* $Id: error.c,v 1.4 2020/02/13 16:57:55 florian Exp $ */
/*! \file */
@@ -28,12 +28,12 @@
/*% Default unexpected callback. */
static void
default_unexpected_callback(const char *, int, const char *, va_list)
- ISC_FORMAT_PRINTF(3, 0);
+ __attribute__((__format__(__printf__, 3, 0)));
/*% Default fatal callback. */
static void
default_fatal_callback(const char *, int, const char *, va_list)
- ISC_FORMAT_PRINTF(3, 0);
+ __attribute__((__format__(__printf__, 3, 0)));
/*% unexpected_callback */
static isc_errorcallback_t unexpected_callback = default_unexpected_callback;
diff --git a/usr.bin/dig/lib/isc/include/isc/buffer.h b/usr.bin/dig/lib/isc/include/isc/buffer.h
index 3d41e9ef3c5..1d81576b738 100644
--- a/usr.bin/dig/lib/isc/include/isc/buffer.h
+++ b/usr.bin/dig/lib/isc/include/isc/buffer.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: buffer.h,v 1.3 2020/02/13 13:53:01 jsg Exp $ */
+/* $Id: buffer.h,v 1.4 2020/02/13 16:57:55 florian Exp $ */
#ifndef ISC_BUFFER_H
#define ISC_BUFFER_H 1
@@ -108,7 +108,7 @@
#include <inttypes.h>
-#include <isc/formatcheck.h>
+
#include <isc/magic.h>
#include <isc/types.h>
diff --git a/usr.bin/dig/lib/isc/include/isc/error.h b/usr.bin/dig/lib/isc/include/isc/error.h
index 3af3a3ceb47..55d663133f7 100644
--- a/usr.bin/dig/lib/isc/include/isc/error.h
+++ b/usr.bin/dig/lib/isc/include/isc/error.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: error.h,v 1.3 2020/02/13 13:53:01 jsg Exp $ */
+/* $Id: error.h,v 1.4 2020/02/13 16:57:55 florian Exp $ */
#ifndef ISC_ERROR_H
#define ISC_ERROR_H 1
@@ -24,19 +24,19 @@
#include <sys/cdefs.h>
#include <stdarg.h>
-#include <isc/formatcheck.h>
+
typedef void (*isc_errorcallback_t)(const char *, int, const char *, va_list);
/*% unexpected error */
void
isc_error_unexpected(const char *, int, const char *, ...)
- ISC_FORMAT_PRINTF(3, 4);
+ __attribute__((__format__(__printf__, 3, 4)));
/*% fatal error */
__dead void
isc_error_fatal(const char *, int, const char *, ...)
-ISC_FORMAT_PRINTF(3, 4);
+__attribute__((__format__(__printf__, 3, 4)));
/*% runtimecheck error */
__dead void
diff --git a/usr.bin/dig/lib/isc/include/isc/formatcheck.h b/usr.bin/dig/lib/isc/include/isc/formatcheck.h
deleted file mode 100644
index 681c264f176..00000000000
--- a/usr.bin/dig/lib/isc/include/isc/formatcheck.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: formatcheck.h,v 1.1 2020/02/07 09:58:54 florian Exp $ */
-
-#ifndef ISC_FORMATCHECK_H
-#define ISC_FORMATCHECK_H 1
-
-/*! \file isc/formatcheck.h */
-
-/*%
- * ISC_FORMAT_PRINTF().
- *
- * \li fmt is the location of the format string parameter.
- * \li args is the location of the first argument (or 0 for no argument checking).
- *
- * Note:
- * \li The first parameter is 1, not 0.
- */
-#ifdef __GNUC__
-#define ISC_FORMAT_PRINTF(fmt, args) __attribute__((__format__(__printf__, fmt, args)))
-#else
-#define ISC_FORMAT_PRINTF(fmt, args)
-#endif
-
-#endif /* ISC_FORMATCHECK_H */
diff --git a/usr.bin/dig/lib/isc/include/isc/log.h b/usr.bin/dig/lib/isc/include/isc/log.h
index 8c34f22c0f0..b35e4615153 100644
--- a/usr.bin/dig/lib/isc/include/isc/log.h
+++ b/usr.bin/dig/lib/isc/include/isc/log.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: log.h,v 1.4 2020/02/13 13:53:01 jsg Exp $ */
+/* $Id: log.h,v 1.5 2020/02/13 16:57:55 florian Exp $ */
#ifndef ISC_LOG_H
#define ISC_LOG_H 1
@@ -24,7 +24,7 @@
#include <stdio.h>
#include <stdarg.h>
-#include <isc/formatcheck.h>
+
#include <isc/types.h>
@@ -525,7 +525,7 @@ isc_log_write(isc_log_t *lctx, isc_logcategory_t *category,
isc_logmodule_t *module, int level,
const char *format, ...)
-ISC_FORMAT_PRINTF(5, 6);
+__attribute__((__format__(__printf__, 5, 6)));
/*%
* Write a message to the log channels.
@@ -564,7 +564,7 @@ isc_log_vwrite(isc_log_t *lctx, isc_logcategory_t *category,
isc_logmodule_t *module, int level,
const char *format, va_list args)
-ISC_FORMAT_PRINTF(5, 0);
+__attribute__((__format__(__printf__, 5, 0)));
/*%
* Write a message to the log channels, pruning duplicates that occur within
@@ -575,7 +575,7 @@ void
isc_log_write1(isc_log_t *lctx, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *format, ...)
-ISC_FORMAT_PRINTF(5, 6);
+__attribute__((__format__(__printf__, 5, 6)));
/*%
* Write a message to the log channels, pruning duplicates that occur within
@@ -587,7 +587,7 @@ isc_log_vwrite1(isc_log_t *lctx, isc_logcategory_t *category,
isc_logmodule_t *module, int level, const char *format,
va_list args)
-ISC_FORMAT_PRINTF(5, 0);
+__attribute__((__format__(__printf__, 5, 0)));
void
isc_log_setdebuglevel(isc_log_t *lctx, unsigned int level);
diff --git a/usr.bin/dig/lib/isc/log.c b/usr.bin/dig/lib/isc/log.c
index 094579605d6..037068a7a48 100644
--- a/usr.bin/dig/lib/isc/log.c
+++ b/usr.bin/dig/lib/isc/log.c
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: log.c,v 1.6 2020/02/13 12:03:51 jsg Exp $ */
+/* $Id: log.c,v 1.7 2020/02/13 16:57:55 florian Exp $ */
/*! \file
* \author Principal Authors: DCL */
@@ -217,7 +217,7 @@ static void
isc_log_doit(isc_log_t *lctx, isc_logcategory_t *category,
isc_logmodule_t *module, int level, isc_boolean_t write_once,
const char *format, va_list args)
- ISC_FORMAT_PRINTF(6, 0);
+ __attribute__((__format__(__printf__, 6, 0)));
/*@{*/
/*!
diff --git a/usr.bin/dig/lib/isc/unix/socket.c b/usr.bin/dig/lib/isc/unix/socket.c
index 38f0f87ad7e..b3985ccbe7f 100644
--- a/usr.bin/dig/lib/isc/unix/socket.c
+++ b/usr.bin/dig/lib/isc/unix/socket.c
@@ -31,7 +31,7 @@
#include <isc/buffer.h>
#include <isc/bufferlist.h>
-#include <isc/formatcheck.h>
+
#include <isc/list.h>
#include <isc/log.h>
#include <isc/net.h>
@@ -329,7 +329,7 @@ enum {
static void
socket_log(isc__socket_t *sock, isc_sockaddr_t *address,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
- const char *fmt, ...) ISC_FORMAT_PRINTF(6, 7);
+ const char *fmt, ...) __attribute__((__format__(__printf__, 6, 7)));
static void
socket_log(isc__socket_t *sock, isc_sockaddr_t *address,
isc_logcategory_t *category, isc_logmodule_t *module, int level,
diff --git a/usr.bin/dig/lib/isccfg/include/isccfg/cfg.h b/usr.bin/dig/lib/isccfg/include/isccfg/cfg.h
index 574c0e2f79e..5633a8e85a5 100644
--- a/usr.bin/dig/lib/isccfg/include/isccfg/cfg.h
+++ b/usr.bin/dig/lib/isccfg/include/isccfg/cfg.h
@@ -14,7 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
-/* $Id: cfg.h,v 1.3 2020/02/13 13:53:01 jsg Exp $ */
+/* $Id: cfg.h,v 1.4 2020/02/13 16:57:55 florian Exp $ */
#ifndef ISCCFG_CFG_H
#define ISCCFG_CFG_H 1
@@ -32,7 +32,7 @@
*** Imports
***/
-#include <isc/formatcheck.h>
+
#include <isc/refcount.h>
#include <isc/types.h>
#include <isc/list.h>
diff --git a/usr.bin/dig/lib/isccfg/parser.c b/usr.bin/dig/lib/isccfg/parser.c
index bbf60dec064..3da419a7adc 100644
--- a/usr.bin/dig/lib/isccfg/parser.c
+++ b/usr.bin/dig/lib/isccfg/parser.c
@@ -20,7 +20,7 @@
#include <stdlib.h>
#include <string.h>
-#include <isc/formatcheck.h>
+
#include <isc/lex.h>
#include <isc/log.h>
#include <isc/symtab.h>
@@ -114,7 +114,7 @@ cfg_parse_obj(cfg_parser_t *pctx, const cfg_type_t *type, cfg_obj_t **ret);
static void
cfg_parser_error(cfg_parser_t *pctx, unsigned int flags,
- const char *fmt, ...) ISC_FORMAT_PRINTF(3, 4);
+ const char *fmt, ...) __attribute__((__format__(__printf__, 3, 4)));
static void
free_list(cfg_parser_t *pctx, cfg_obj_t *obj);