2
0
mirror of https://gitlab.isc.org/isc-projects/bind9 synced 2025-08-22 10:10:06 +00:00

Use #pragma once as header guards

Unify the header guard style and replace the inconsistent include guards
with #pragma once.

The #pragma once is widely and very well supported in all compilers that
BIND 9 supports, and #pragma once was already in use in several new or
refactored headers.

Using simpler method will also allow us to automate header guard checks
as this is simpler to programatically check.

For reference, here are the reasons for the change taken from
Wikipedia[1]:

> In the C and C++ programming languages, #pragma once is a non-standard
> but widely supported preprocessor directive designed to cause the
> current source file to be included only once in a single compilation.
>
> Thus, #pragma once serves the same purpose as include guards, but with
> several advantages, including: less code, avoidance of name clashes,
> and sometimes improvement in compilation speed. On the other hand,
> #pragma once is not necessarily available in all compilers and its
> implementation is tricky and might not always be reliable.

1. https://en.wikipedia.org/wiki/Pragma_once
This commit is contained in:
Ondřej Surý 2021-10-05 16:49:47 +02:00 committed by Evan Hunt
parent 46fc798e66
commit f3635bcc14
328 changed files with 337 additions and 1260 deletions

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef CHECK_TOOL_H
#define CHECK_TOOL_H
#pragma once
/*! \file */
@ -49,5 +48,3 @@ extern bool dochecksrv;
extern dns_zoneopt_t zone_options;
ISC_LANG_ENDDECLS
#endif /* ifndef CHECK_TOOL_H */

View File

@ -11,8 +11,7 @@
/*! \file */
#ifndef RNDC_OS_H
#define RNDC_OS_H 1
#pragma once
#include <stdio.h>
@ -30,5 +29,3 @@ set_user(FILE *fd, const char *user);
*/
ISC_LANG_ENDDECLS
#endif /* ifndef RNDC_OS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef RNDC_KEYGEN_H
#define RNDC_KEYGEN_H 1
#pragma once
/*! \file */
@ -38,5 +37,3 @@ int
alg_bits(dns_secalg_t alg);
ISC_LANG_ENDDECLS
#endif /* RNDC_KEYGEN_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef RNDC_UTIL_H
#define RNDC_UTIL_H 1
#pragma once
/*! \file */
@ -39,5 +38,3 @@ ISC_NORETURN void
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
ISC_LANG_ENDDECLS
#endif /* RNDC_UTIL_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DIG_H
#define DIG_H
#pragma once
/*! \file */
@ -446,5 +445,3 @@ void
dig_shutdown(void);
ISC_LANG_ENDDECLS
#endif /* ifndef DIG_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNSSECTOOL_H
#define DNSSECTOOL_H 1
#pragma once
#include <inttypes.h>
#include <stdbool.h>
@ -105,5 +104,3 @@ key_collision(dst_key_t *key, dns_name_t *name, const char *dir,
bool
isoptarg(const char *arg, char **argv, void (*usage)(void));
#endif /* DNSSEC_DNSSECTOOL_H */

View File

@ -9,12 +9,10 @@
* information regarding copyright ownership.
*/
#ifndef DLZ_DLOPEN_DRIVER_H
#define DLZ_DLOPEN_DRIVER_H
#pragma once
isc_result_t
dlz_dlopen_init(isc_mem_t *mctx);
void
dlz_dlopen_clear(void);
#endif /* ifndef DLZ_DLOPEN_DRIVER_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_BUILTIN_H
#define NAMED_BUILTIN_H 1
#pragma once
/*! \file */
@ -21,5 +20,3 @@ named_builtin_init(void);
void
named_builtin_deinit(void);
#endif /* NAMED_BUILTIN_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_CONFIG_H
#define NAMED_CONFIG_H 1
#pragma once
/*! \file */
@ -80,5 +79,3 @@ named_config_getkeyalgorithm2(const char *str, const dns_name_t **name,
isc_result_t
named_config_getdscp(const cfg_obj_t *config, isc_dscp_t *dscpp);
#endif /* NAMED_CONFIG_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_CONTROL_H
#define NAMED_CONTROL_H 1
#pragma once
/*! \file
* \brief
@ -105,5 +104,3 @@ named_controls_shutdown(named_controls_t *controls);
isc_result_t
named_control_docommand(isccc_sexpr_t *message, bool readonly,
isc_buffer_t **text);
#endif /* NAMED_CONTROL_H */

View File

@ -11,13 +11,10 @@
#include <isc/fuzz.h>
#ifndef NAMED_FUZZ_H
#define NAMED_FUZZ_H
#pragma once
void
named_fuzz_notify(void);
void
named_fuzz_setup(void);
#endif /* NAMED_FUZZ_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_GLOBALS_H
#define NAMED_GLOBALS_H 1
#pragma once
/*! \file */
@ -162,5 +161,3 @@ EXTERN dns_acl_t *named_g_mapped INIT(NULL);
#undef EXTERN
#undef INIT
#endif /* NAMED_GLOBALS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_LOG_H
#define NAMED_LOG_H 1
#pragma once
/*! \file */
@ -73,5 +72,3 @@ named_log_setunmatchedcategory(isc_logconfig_t *lcfg);
void
named_log_shutdown(void);
#endif /* NAMED_LOG_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_LOGCONF_H
#define NAMED_LOGCONF_H 1
#pragma once
/*! \file */
@ -22,5 +21,3 @@ named_logconfig(isc_logconfig_t *logconf, const cfg_obj_t *logstmt);
* Set up the logging configuration in '*logconf' according to
* the named.conf data in 'logstmt'.
*/
#endif /* NAMED_LOGCONF_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_OS_H
#define NAMED_OS_H 1
#pragma once
/*! \file */
@ -75,5 +74,3 @@ named_os_started(void);
const char *
named_os_uname(void);
#endif /* NAMED_OS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_SERVER_H
#define NAMED_SERVER_H 1
#pragma once
/*! \file */
@ -389,5 +388,3 @@ named_server_tcptimeouts(isc_lex_t *lex, isc_buffer_t **text);
isc_result_t
named_server_servestale(named_server_t *server, isc_lex_t *lex,
isc_buffer_t **text);
#endif /* NAMED_SERVER_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_SMF_GLOBALS_H
#define NAMED_SMF_GLOBALS_H 1
#pragma once
#include <libscf.h>
@ -35,5 +34,3 @@ named_smf_get_instance(char **name, int debug, isc_mem_t *mctx);
#undef EXTERN
#undef INIT
#endif /* NAMED_SMF_GLOBALS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_STATSCHANNEL_H
#define NAMED_STATSCHANNEL_H 1
#pragma once
/*! \file
* \brief
@ -48,5 +47,3 @@ named_stats_dump(named_server_t *server, FILE *fp);
/*%<
* Dump statistics counters managed by the server to the file fp.
*/
#endif /* NAMED_STATSCHANNEL_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_TKEYCONF_H
#define NAMED_TKEYCONF_H 1
#pragma once
/*! \file */
@ -40,5 +39,3 @@ named_tkeyctx_fromconfig(const cfg_obj_t *options, isc_mem_t *mctx,
*/
ISC_LANG_ENDDECLS
#endif /* NAMED_TKEYCONF_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_TSIGCONF_H
#define NAMED_TSIGCONF_H 1
#pragma once
/*! \file */
@ -38,5 +37,3 @@ named_tsigkeyring_fromconfig(const cfg_obj_t *config, const cfg_obj_t *vconfig,
*/
ISC_LANG_ENDDECLS
#endif /* NAMED_TSIGCONF_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_TYPES_H
#define NAMED_TYPES_H 1
#pragma once
/*! \file */
@ -35,5 +34,3 @@ typedef enum {
NAMED_RELOAD_IN_PROGRESS,
NAMED_RELOAD_FAILED,
} named_reload_t;
#endif /* NAMED_TYPES_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef NAMED_ZONECONF_H
#define NAMED_ZONECONF_H 1
#pragma once
/*! \file */
@ -77,5 +76,3 @@ named_zone_configure_writeable_dlz(dns_dlzdb_t *dlzdatabase, dns_zone_t *zone,
*/
ISC_LANG_ENDDECLS
#endif /* NAMED_ZONECONF_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef RNDC_UTIL_H
#define RNDC_UTIL_H 1
#pragma once
/*! \file */
@ -39,5 +38,3 @@ ISC_NORETURN void
fatal(const char *format, ...) ISC_FORMAT_PRINTF(1, 2);
ISC_LANG_ENDDECLS
#endif /* RNDC_UTIL_H */

View File

@ -4,8 +4,7 @@
* Copyright (C) 2009-2015 Red Hat ; see COPYRIGHT for license
*/
#ifndef _LD_INSTANCE_H_
#define _LD_INSTANCE_H_
#pragma once
#include <stdbool.h>
@ -45,5 +44,3 @@ load_sample_instance_zones(sample_instance_t *inst);
void
destroy_sample_instance(sample_instance_t **sample_instp);
#endif /* !_LD_INSTANCE_H_ */

View File

@ -2,8 +2,7 @@
* Copyright (C) 2014-2015 Red Hat ; see COPYRIGHT for license
*/
#ifndef LOCK_H_
#define LOCK_H_
#pragma once
#include "instance.h"
#include "util.h"
@ -13,5 +12,3 @@ run_exclusive_enter(sample_instance_t *inst, isc_result_t *statep);
void
run_exclusive_exit(sample_instance_t *inst, isc_result_t state);
#endif /* LOCK_H_ */

View File

@ -2,8 +2,7 @@
* Copyright (C) 2009--2015 Red Hat ; see COPYRIGHT for license
*/
#ifndef _LD_LOG_H_
#define _LD_LOG_H_
#pragma once
#include <isc/error.h>
#include <isc/result.h>
@ -21,5 +20,3 @@
void
log_write(int level, const char *format, ...) ISC_FORMAT_PRINTF(2, 3);
#endif /* !_LD_LOG_H_ */

View File

@ -4,8 +4,7 @@
* Copyright (C) 2009-2015 Red Hat ; see COPYRIGHT for license
*/
#ifndef _LD_UTIL_H_
#define _LD_UTIL_H_
#pragma once
#include <isc/mem.h>
@ -54,5 +53,3 @@
#define MEM_PUT_AND_DETACH(target_ptr) \
isc_mem_putanddetach(&(target_ptr)->mctx, target_ptr, \
sizeof(*(target_ptr)))
#endif /* !_LD_UTIL_H_ */

View File

@ -9,6 +9,8 @@
* information regarding copyright ownership.
*/
#pragma once
#define CONCAT(a, b) a##b
#define DNSCONF_SET_STRING(FIELD) \
void CONCAT(DNSConf_set, FIELD)(DNSConf * cfg, const char *arg) { \

View File

@ -14,6 +14,8 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
#pragma once
#include <dirent.h>
#include <sys/types.h>

View File

@ -39,8 +39,7 @@
#include <dlz_minimal.h>
#include <dlz_pthread.h>
#ifndef DLZ_DBI_H
#define DLZ_DBI_H 1
#pragma once
/*
* Types
@ -116,5 +115,3 @@ destroy_dbinstance(dbinstance_t *dbi);
char *
get_parameter_value(const char *input, const char *key);
#endif /* DLZ_DBI_H */

View File

@ -7,8 +7,7 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/.
*/
#ifndef DLZ_LIST_H
#define DLZ_LIST_H 1
#pragma once
#define DLZ_LIST(type) \
struct { \
@ -46,5 +45,3 @@
#define DLZ_LIST_PREV(elt, link) ((elt)->link.prev)
#define DLZ_LIST_NEXT(elt, link) ((elt)->link.next)
#endif /* DLZ_LIST_H */

View File

@ -23,8 +23,7 @@
* tree.
*/
#ifndef DLZ_MINIMAL_H
#define DLZ_MINIMAL_H 1
#pragma once
#include <inttypes.h>
#include <stdbool.h>
@ -287,5 +286,3 @@ dlz_subrdataset(const char *name, const char *rdatastr, void *dbdata,
isc_result_t
dlz_delrdataset(const char *name, const char *type, void *dbdata,
void *version);
#endif /* DLZ_MINIMAL_H */

View File

@ -14,8 +14,7 @@
* PERFORMANCE OF THIS SOFTWARE.
*/
#ifndef DLZ_PTHREAD_H
#define DLZ_PTHREAD_H 1
#pragma once
#ifndef PTHREADS
#define PTHREADS 1
@ -37,5 +36,3 @@
#define dlz_mutex_trylock(a) (0)
#define dlz_mutex_unlock(a) (0)
#endif /* ifdef PTHREADS */
#endif /* DLZ_PTHREAD_H */

View File

@ -15,6 +15,8 @@
* WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
*/
#pragma once
#include <dlz_minimal.h>
/* This is the only part that differs from dlz_minimal.h. */

View File

@ -9,6 +9,8 @@
* information regarding copyright ownership.
*/
#pragma once
#include <stdbool.h>
#include <stddef.h>
#include <stdint.h>

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef BIND9_CHECK_H
#define BIND9_CHECK_H 1
#pragma once
/*! \file bind9/check.h */
@ -60,5 +59,3 @@ bind9_check_key(const cfg_obj_t *config, isc_log_t *logctx);
*/
ISC_LANG_ENDDECLS
#endif /* BIND9_CHECK_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef BIND9_GETADDRESSES_H
#define BIND9_GETADDRESSES_H 1
#pragma once
/*! \file bind9/getaddresses.h */
@ -48,5 +47,3 @@ bind9_getaddresses(const char *hostname, in_port_t port, isc_sockaddr_t *addrs,
*/
ISC_LANG_ENDDECLS
#endif /* BIND9_GETADDRESSES_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DST_OPENSSL_H
#define DST_OPENSSL_H 1
#pragma once
#include <openssl/bn.h>
#include <openssl/conf.h>
@ -67,6 +66,3 @@ dst__openssl_getengine(const char *engine);
#endif /* if !defined(OPENSSL_NO_ENGINE) */
ISC_LANG_ENDDECLS
#endif /* DST_OPENSSL_H */
/*! \file */

View File

@ -24,8 +24,7 @@
*/
/*! \file */
#ifndef DST_DST_PARSE_H
#define DST_DST_PARSE_H 1
#pragma once
#include <isc/lang.h>
@ -126,5 +125,3 @@ dst__privstruct_writefile(const dst_key_t *key, const dst_private_t *priv,
const char *directory);
ISC_LANG_ENDDECLS
#endif /* DST_DST_PARSE_H */

View File

@ -22,8 +22,7 @@
* The dir stuff was shrunk to fit the needs of gen.c.
*/
#ifndef DNS_GEN_UNIX_H
#define DNS_GEN_UNIX_H 1
#pragma once
#include <dirent.h>
#include <errno.h>
@ -100,5 +99,3 @@ end_directory(isc_dir_t *dir) {
}
ISC_LANG_ENDDECLS
#endif /* DNS_GEN_UNIX_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_ACL_H
#define DNS_ACL_H 1
#pragma once
/*****
***** Module Info
@ -272,5 +271,3 @@ dns_aclelement_match(const isc_netaddr_t *reqaddr, const dns_name_t *reqsigner,
*/
ISC_LANG_ENDDECLS
#endif /* DNS_ACL_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_ADB_H
#define DNS_ADB_H 1
#pragma once
/*****
***** Module Info
@ -803,5 +802,3 @@ dns_adb_endudpfetch(dns_adb_t *adb, dns_adbaddrinfo_t *addr);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_ADB_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_BADCACHE_H
#define DNS_BADCACHE_H 1
#pragma once
/*****
***** Module Info
@ -146,5 +145,3 @@ dns_badcache_print(dns_badcache_t *bc, const char *cachename, FILE *fp);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_BADCACHE_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_BIT_H
#define DNS_BIT_H 1
#pragma once
/*! \file dns/bit.h */
@ -22,5 +21,3 @@ typedef uint64_t dns_bitset_t;
#define DNS_BIT_CLEAR(bit, bitset) (*(bitset) &= ~((dns_bitset_t)1 << (bit)))
#define DNS_BIT_CHECK(bit, bitset) \
((*(bitset) & ((dns_bitset_t)1 << (bit))) == ((dns_bitset_t)1 << (bit)))
#endif /* DNS_BIT_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_BYADDR_H
#define DNS_BYADDR_H 1
#pragma once
/*****
***** Module Info
@ -146,5 +145,3 @@ dns_byaddr_createptrname(const isc_netaddr_t *address, unsigned int options,
*/
ISC_LANG_ENDDECLS
#endif /* DNS_BYADDR_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_CACHE_H
#define DNS_CACHE_H 1
#pragma once
/*****
***** Module Info
@ -299,5 +298,3 @@ dns_cache_renderjson(dns_cache_t *cache, void *cstats0);
#endif /* HAVE_JSON_C */
ISC_LANG_ENDDECLS
#endif /* DNS_CACHE_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_CALLBACKS_H
#define DNS_CALLBACKS_H 1
#pragma once
/*! \file dns/callbacks.h */
@ -90,5 +89,3 @@ dns_rdatacallbacks_init_stdio(dns_rdatacallbacks_t *callbacks);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_CALLBACKS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_CATZ_H
#define DNS_CATZ_H 1
#pragma once
#include <inttypes.h>
#include <stdbool.h>
@ -470,5 +469,3 @@ dns_catz_get_iterator(dns_catz_zone_t *catz, isc_ht_iter_t **itp);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_CATZ_H_ */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_CERT_H
#define DNS_CERT_H 1
#pragma once
/*! \file dns/cert.h */
@ -57,5 +56,3 @@ dns_cert_totext(dns_cert_t cert, isc_buffer_t *target);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_CERT_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_CLIENT_H
#define DNS_CLIENT_H 1
#pragma once
/*****
***** Module Info
@ -290,5 +289,3 @@ dns_client_addtrustedkey(dns_client_t *client, dns_rdataclass_t rdclass,
*/
ISC_LANG_ENDDECLS
#endif /* DNS_CLIENT_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_CLIENTINFO_H
#define DNS_CLIENTINFO_H 1
#pragma once
/*****
***** Module Info
@ -77,5 +76,3 @@ void
dns_clientinfo_init(dns_clientinfo_t *ci, void *data, void *versionp);
ISC_LANG_ENDDECLS
#endif /* DNS_CLIENTINFO_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_COMPRESS_H
#define DNS_COMPRESS_H 1
#pragma once
#include <inttypes.h>
#include <stdbool.h>
@ -296,5 +295,3 @@ dns_decompress_type(dns_decompress_t *dctx);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_COMPRESS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_DB_H
#define DNS_DB_H 1
#pragma once
/*****
***** Module Info
@ -1746,5 +1745,3 @@ dns_db_setgluecachestats(dns_db_t *db, isc_stats_t *stats);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_DB_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_DBITERATOR_H
#define DNS_DBITERATOR_H 1
#pragma once
/*****
***** Module Info
@ -287,5 +286,3 @@ dns_dbiterator_setcleanmode(dns_dbiterator_t *iterator, bool mode);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_DBITERATOR_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_DIFF_H
#define DNS_DIFF_H 1
#pragma once
/*****
***** Module Info
@ -276,5 +275,3 @@ dns_diff_print(dns_diff_t *diff, FILE *file);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_DIFF_H */

View File

@ -46,8 +46,7 @@
/*! \file dns/dlz.h */
#ifndef DLZ_H
#define DLZ_H 1
#pragma once
/*****
***** Module Info
@ -330,5 +329,3 @@ dns_dlz_ssumatch(dns_dlzdb_t *dlzdatabase, const dns_name_t *signer,
*/
ISC_LANG_ENDDECLS
#endif /* DLZ_H */

View File

@ -11,8 +11,7 @@
/*! \file dns/dlz_dlopen.h */
#ifndef DLZ_DLOPEN_H
#define DLZ_DLOPEN_H
#pragma once
#include <inttypes.h>
#include <stdbool.h>
@ -153,5 +152,3 @@ dlz_dlopen_delrdataset_t(const char *name, const char *type, void *dbdata,
void *version);
ISC_LANG_ENDDECLS
#endif /* ifndef DLZ_DLOPEN_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_DNS64_H
#define DNS_DNS64_H 1
#pragma once
#include <stdbool.h>
@ -189,5 +188,3 @@ dns_dns64_findprefix(dns_rdataset_t *rdataset, isc_netprefix_t *prefix,
*/
ISC_LANG_ENDDECLS
#endif /* DNS_DNS64_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_DNSRPS_H
#define DNS_DNSRPS_H
#pragma once
#include <inttypes.h>
#include <stdbool.h>
@ -109,5 +108,3 @@ dns_dnsrps_rewrite_init(librpz_emsg_t *emsg, dns_rpz_st_t *st,
#endif /* USE_DNSRPS */
ISC_LANG_ENDDECLS
#endif /* DNS_DNSRPS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_DNSSEC_H
#define DNS_DNSSEC_H 1
#pragma once
/*! \file dns/dnssec.h */
@ -392,5 +391,3 @@ dns_dnssec_matchdskey(dns_name_t *name, dns_rdata_t *dsrdata,
*\li Other values indicate error
*/
ISC_LANG_ENDDECLS
#endif /* DNS_DNSSEC_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef _DNSTAP_H
#define _DNSTAP_H
#pragma once
/*****
***** Module Info
@ -390,5 +389,3 @@ dns_dt_close(dns_dthandle_t **handlep);
*
*\li '*handlep' is not NULL
*/
#endif /* _DNSTAP_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_DS_H
#define DNS_DS_H 1
#pragma once
#include <isc/lang.h>
@ -62,5 +61,3 @@ dns_ds_buildrdata(dns_name_t *owner, dns_rdata_t *key,
*/
ISC_LANG_ENDDECLS
#endif /* DNS_DS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_DSDIGEST_H
#define DNS_DSDIGEST_H 1
#pragma once
/*! \file dns/dsdigest.h */
@ -66,5 +65,3 @@ dns_dsdigest_format(dns_dsdigest_t typ, char *cp, unsigned int size);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_DSDIGEST_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_DYNDB_H
#define DNS_DYNDB_H
#pragma once
#include <stdbool.h>
@ -156,5 +155,3 @@ dns_dyndb_destroyctx(dns_dyndbctx_t **dctxp);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_DYNDB_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_ECS_H
#define DNS_ECS_H 1
#pragma once
#include <inttypes.h>
@ -53,5 +52,3 @@ dns_ecs_format(dns_ecs_t *ecs, char *buf, size_t size);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_ECS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_EDNS_H
#define DNS_EDNS_H 1
#pragma once
/*%
* The maximum version on EDNS supported by this build.
@ -23,5 +22,3 @@
*/
#define DNS_EDNS_VERSION 1 /* draft-andrews-edns1 */
#endif /* ifdef DRAFT_ANDREWS_EDNS1 */
#endif /* ifndef DNS_EDNS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_EVENTS_H
#define DNS_EVENTS_H 1
#pragma once
#include <isc/eventclass.h>
@ -84,5 +83,3 @@
#define DNS_EVENT_FIRSTEVENT (ISC_EVENTCLASS_DNS + 0)
#define DNS_EVENT_LASTEVENT (ISC_EVENTCLASS_DNS + 65535)
#endif /* DNS_EVENTS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_FIXEDNAME_H
#define DNS_FIXEDNAME_H 1
#pragma once
/*****
***** Module Info
@ -79,5 +78,3 @@ dns_name_t *
dns_fixedname_initname(dns_fixedname_t *fixed);
ISC_LANG_ENDDECLS
#endif /* DNS_FIXEDNAME_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_FORWARD_H
#define DNS_FORWARD_H 1
#pragma once
/*! \file dns/forward.h */
@ -118,5 +117,3 @@ dns_fwdtable_destroy(dns_fwdtable_t **fwdtablep);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_FORWARD_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_GEOIP_H
#define DNS_GEOIP_H 1
#pragma once
/*****
***** Module Info
@ -108,5 +107,3 @@ dns_geoip_match(const isc_netaddr_t *reqaddr,
ISC_LANG_ENDDECLS
#endif /* HAVE_GEOIP2 */
#endif /* DNS_GEOIP_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_IPKEYLIST_H
#define DNS_IPKEYLIST_H 1
#pragma once
#include <inttypes.h>
@ -85,5 +84,3 @@ dns_ipkeylist_resize(isc_mem_t *mctx, dns_ipkeylist_t *ipkl, unsigned int n);
* \li #ISC_R_SUCCESS if success
* \li #ISC_R_NOMEMORY if there's no memory, ipkeylist is left untouched
*/
#endif /* ifndef DNS_IPKEYLIST_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_IPTABLE_H
#define DNS_IPTABLE_H 1
#pragma once
#include <inttypes.h>
#include <stdbool.h>
@ -64,5 +63,3 @@ void
dns_iptable_detach(dns_iptable_t **tabp);
ISC_LANG_ENDDECLS
#endif /* DNS_IPTABLE_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_JOURNAL_H
#define DNS_JOURNAL_H 1
#pragma once
/*****
***** Module Info
@ -335,5 +334,3 @@ dns_journal_set_sourceserial(dns_journal_t *j, uint32_t sourceserial);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_JOURNAL_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_KASP_H
#define DNS_KASP_H 1
#pragma once
/*****
***** Module Info
@ -711,5 +710,3 @@ dns_kasp_setnsec3param(dns_kasp_t *kasp, uint8_t iter, bool optout,
*/
ISC_LANG_ENDDECLS
#endif /* DNS_KASP_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_KEYDATA_H
#define DNS_KEYDATA_H 1
#pragma once
/*****
***** Module Info
@ -45,5 +44,3 @@ dns_keydata_fromdnskey(dns_rdata_keydata_t *keydata, dns_rdata_dnskey_t *dnskey,
isc_mem_t *mctx);
ISC_LANG_ENDDECLS
#endif /* DNS_KEYDATA_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_KEYFLAGS_H
#define DNS_KEYFLAGS_H 1
#pragma once
/*! \file dns/keyflags.h */
@ -42,5 +41,3 @@ dns_keyflags_fromtext(dns_keyflags_t *flagsp, isc_textregion_t *source);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_KEYFLAGS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_KEYMGR_H
#define DNS_KEYMGR_H 1
#pragma once
/*! \file dns/keymgr.h */
@ -128,5 +127,3 @@ dns_keymgr_status(dns_kasp_t *kasp, dns_dnsseckeylist_t *keyring,
*/
ISC_LANG_ENDDECLS
#endif /* DNS_KEYMGR_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_KEYTABLE_H
#define DNS_KEYTABLE_H 1
#pragma once
/*****
***** Module Info
@ -344,5 +343,3 @@ dns_keytable_forall(dns_keytable_t *keytable,
dns_name_t *, void *),
void *arg);
ISC_LANG_ENDDECLS
#endif /* DNS_KEYTABLE_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_KEYVALUES_H
#define DNS_KEYVALUES_H 1
#pragma once
/*! \file dns/keyvalues.h */
@ -101,5 +100,3 @@
#define DNS_KEY_ED25519SIZE 32
#define DNS_KEY_ED448SIZE 57
#endif /* DNS_KEYVALUES_H */

View File

@ -32,8 +32,7 @@
* version 1.2.12
*/
#ifndef LIBRPZ_H
#define LIBRPZ_H
#pragma once
#include <inttypes.h>
#include <stdarg.h>
@ -950,5 +949,3 @@ librpz_lib_open(librpz_emsg_t *emsg, void **dl_handle, const char *path) {
#endif /* LIBRPZ_LIB_OPEN */
}
#endif /* LIBRPZ_LIB_OPEN */
#endif /* LIBRPZ_H */

View File

@ -12,8 +12,7 @@
/*! \file dns/log.h
*/
#ifndef DNS_LOG_H
#define DNS_LOG_H 1
#pragma once
#include <isc/lang.h>
#include <isc/log.h>
@ -109,5 +108,3 @@ dns_log_setcontext(isc_log_t *lctx);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_LOG_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_LOOKUP_H
#define DNS_LOOKUP_H 1
#pragma once
/*****
***** Module Info
@ -125,5 +124,3 @@ dns_lookup_destroy(dns_lookup_t **lookupp);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_LOOKUP_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_MASTER_H
#define DNS_MASTER_H 1
#pragma once
/*! \file dns/master.h */
@ -256,5 +255,3 @@ dns_master_initrawheader(dns_masterrawheader_t *header);
* values to zero.
*/
ISC_LANG_ENDDECLS
#endif /* DNS_MASTER_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_MASTERDUMP_H
#define DNS_MASTERDUMP_H 1
#pragma once
/*! \file dns/masterdump.h */
@ -356,5 +355,3 @@ void
dns_master_styledestroy(dns_master_style_t **style, isc_mem_t *mctx);
ISC_LANG_ENDDECLS
#endif /* DNS_MASTERDUMP_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_NAME_H
#define DNS_NAME_H 1
#pragma once
/*****
***** Module Info
@ -1383,5 +1382,3 @@ ISC_LANG_ENDDECLS
#define dns_name_split(n, l, p, s) DNS_NAME_SPLIT(n, l, p, s)
#endif /* DNS_NAME_USEINLINE */
#endif /* DNS_NAME_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_NCACHE_H
#define DNS_NCACHE_H 1
#pragma once
/*****
***** Module Info
@ -181,5 +180,3 @@ dns_ncache_current(dns_rdataset_t *ncacherdataset, dns_name_t *found,
*/
ISC_LANG_ENDDECLS
#endif /* DNS_NCACHE_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_NSEC_H
#define DNS_NSEC_H 1
#pragma once
/*! \file dns/nsec.h */
@ -108,5 +107,3 @@ dns_nsec_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
*/
ISC_LANG_ENDDECLS
#endif /* DNS_NSEC_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_NSEC3_H
#define DNS_NSEC3_H 1
#pragma once
#include <stdbool.h>
@ -266,5 +265,3 @@ dns_nsec3_noexistnodata(dns_rdatatype_t type, const dns_name_t *name,
dns_name_t *nearest, dns_nseclog_t logit, void *arg);
ISC_LANG_ENDDECLS
#endif /* DNS_NSEC3_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_NTA_H
#define DNS_NTA_H 1
#pragma once
/*****
***** Module Info
@ -206,5 +205,3 @@ dns_ntatable_shutdown(dns_ntatable_t *ntatable);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_NTA_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_OPCODE_H
#define DNS_OPCODE_H 1
#pragma once
/*! \file dns/opcode.h */
@ -40,5 +39,3 @@ dns_opcode_totext(dns_opcode_t opcode, isc_buffer_t *target);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_OPCODE_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_ORDER_H
#define DNS_ORDER_H 1
#pragma once
/*! \file dns/order.h */
@ -87,5 +86,3 @@ dns_order_detach(dns_order_t **orderp);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_ORDER_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_PEER_H
#define DNS_PEER_H 1
#pragma once
/*****
***** Module Info
@ -223,5 +222,3 @@ dns_peer_setednsversion(dns_peer_t *peer, uint8_t ednsversion);
isc_result_t
dns_peer_getednsversion(dns_peer_t *peer, uint8_t *ednsversion);
ISC_LANG_ENDDECLS
#endif /* DNS_PEER_H */

View File

@ -17,8 +17,7 @@
#include <dns/db.h>
#include <dns/types.h>
#ifndef DNS_PRIVATE_H
#define DNS_PRIVATE_H
#pragma once
ISC_LANG_BEGINDECLS
@ -63,5 +62,3 @@ dns_private_totext(dns_rdata_t *privaterdata, isc_buffer_t *buffer);
*/
ISC_LANG_ENDDECLS
#endif /* ifndef DNS_PRIVATE_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_RBT_H
#define DNS_RBT_H 1
#pragma once
/*! \file dns/rbt.h */
@ -992,5 +991,3 @@ dns__rbtnode_namelen(dns_rbtnode_t *node);
* and in unit tests.
*/
ISC_LANG_ENDDECLS
#endif /* DNS_RBT_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_RCODE_H
#define DNS_RCODE_H 1
#pragma once
/*! \file dns/rcode.h */
@ -104,5 +103,3 @@ dns_hashalg_fromtext(unsigned char *hashalg, isc_textregion_t *source);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_RCODE_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_RDATA_H
#define DNS_RDATA_H 1
#pragma once
/*****
***** Module Info
@ -806,5 +805,3 @@ const char *
dns_rdata_updateop(dns_rdata_t *rdata, dns_section_t section);
ISC_LANG_ENDDECLS
#endif /* DNS_RDATA_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_RDATACLASS_H
#define DNS_RDATACLASS_H 1
#pragma once
/*! \file dns/rdataclass.h */
@ -88,5 +87,3 @@ dns_rdataclass_format(dns_rdataclass_t rdclass, char *array, unsigned int size);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_RDATACLASS_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_RDATALIST_H
#define DNS_RDATALIST_H 1
#pragma once
/*****
***** Module Info
@ -117,5 +116,3 @@ dns_rdatalist_fromrdataset(dns_rdataset_t *rdataset,
*/
ISC_LANG_ENDDECLS
#endif /* DNS_RDATALIST_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_RDATASET_H
#define DNS_RDATASET_H 1
#pragma once
/*****
***** Module Info
@ -605,5 +604,3 @@ dns_trust_totext(dns_trust_t trust);
*/
ISC_LANG_ENDDECLS
#endif /* DNS_RDATASET_H */

View File

@ -9,8 +9,7 @@
* information regarding copyright ownership.
*/
#ifndef DNS_RDATASETITER_H
#define DNS_RDATASETITER_H 1
#pragma once
/*****
***** Module Info
@ -157,5 +156,3 @@ dns_rdatasetiter_current(dns_rdatasetiter_t *iterator,
*/
ISC_LANG_ENDDECLS
#endif /* DNS_RDATASETITER_H */

Some files were not shown because too many files have changed in this diff Show More