Move includes to code files.

git-svn-id: file:///svn/unbound/trunk@2035 be551aaa-1e26-0410-a405-d3ace91eadb9
This commit is contained in:
Wouter Wijngaards 2010-03-12 15:17:48 +00:00
parent e56a5b72cb
commit 147d47eee7
64 changed files with 166 additions and 44 deletions

View file

@ -653,26 +653,6 @@
#include <ws2tcpip.h>
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
#endif
#ifdef HAVE_OPENSSL_RAND_H
#include <openssl/rand.h>
#endif
#ifdef HAVE_OPENSSL_CONF_H
#include <openssl/conf.h>
#endif
#ifdef HAVE_OPENSSL_ENGINE_H
#include <openssl/engine.h>
#endif
#ifdef HAVE_ATTR_FORMAT
@ -819,8 +799,6 @@ struct sockaddr_storage;
#include "compat/fake-rfc2553.h"
#endif
#include "ldns/ldns.h"
#ifdef UNBOUND_ALLOC_STATS
# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)

View file

@ -703,26 +703,6 @@ dnl includes
#ifdef HAVE_WS2TCPIP_H
#include <ws2tcpip.h>
#endif
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
#endif
#ifdef HAVE_OPENSSL_RAND_H
#include <openssl/rand.h>
#endif
#ifdef HAVE_OPENSSL_CONF_H
#include <openssl/conf.h>
#endif
#ifdef HAVE_OPENSSL_ENGINE_H
#include <openssl/engine.h>
#endif
]
AHX_CONFIG_FORMAT_ATTRIBUTE
@ -771,8 +751,6 @@ struct sockaddr_storage;
#include "compat/fake-rfc2553.h"
#endif
#include "ldns/ldns.h"
#ifdef UNBOUND_ALLOC_STATS
# define malloc(s) unbound_stat_malloc_log(s, __FILE__, __LINE__, __func__)
# define calloc(n,s) unbound_stat_calloc_log(n, s, __FILE__, __LINE__, __func__)

View file

@ -40,6 +40,7 @@
* to text format.
*/
#include "config.h"
#include "ldns/ldns.h"
#include "daemon/cachedump.h"
#include "daemon/remote.h"
#include "daemon/worker.h"

View file

@ -40,6 +40,22 @@
*/
#include "config.h"
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
#endif
#ifdef HAVE_OPENSSL_RAND_H
#include <openssl/rand.h>
#endif
#ifdef HAVE_OPENSSL_CONF_H
#include <openssl/conf.h>
#endif
#ifdef HAVE_OPENSSL_ENGINE_H
#include <openssl/engine.h>
#endif
#include "ldns/ldns.h"
#include "daemon/daemon.h"
#include "daemon/worker.h"
#include "daemon/remote.h"

View file

@ -43,6 +43,11 @@
* Both the server and the client(control tool) have their own keys.
*/
#include "config.h"
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
#endif
#include <ctype.h>
#include "ldns/ldns.h"
#include "daemon/remote.h"
#include "daemon/worker.h"
#include "daemon/daemon.h"

View file

@ -45,6 +45,9 @@
#ifndef DAEMON_REMOTE_H
#define DAEMON_REMOTE_H
#ifdef HAVE_OPENSSL_SSL_H
#include "openssl/ssl.h"
#endif
struct config_file;
struct listen_list;
struct listen_port;

View file

@ -40,6 +40,7 @@
* numbers. These 'statistics' may be of interest to the operator.
*/
#include "config.h"
#include "ldns/wire2host.h"
#include "daemon/stats.h"
#include "daemon/worker.h"
#include "daemon/daemon.h"

View file

@ -43,6 +43,7 @@
#ifndef DAEMON_STATS_H
#define DAEMON_STATS_H
#include "util/timehist.h"
#include "ldns/buffer.h"
struct worker;
struct config_file;
struct comm_point;

View file

@ -41,6 +41,9 @@
*/
#include "config.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#include "util/log.h"
#include "daemon/daemon.h"
#include "daemon/remote.h"

View file

@ -40,6 +40,7 @@
* pending requests.
*/
#include "config.h"
#include "ldns/wire2host.h"
#include "util/log.h"
#include "util/net_help.h"
#include "util/random.h"

View file

@ -5,6 +5,7 @@
- ldns tarball updated.
- Fix python use when multithreaded.
- Fix solaris python compile.
- Include less in config.h and include per code file for ldns, ssl.
11 March 2010: Wouter
- another memory allocation option: --enable-alloc-nonregional.

View file

@ -40,6 +40,9 @@
* Keep track of forward zones and config settings.
*/
#include "config.h"
#include "ldns/rdata.h"
#include "ldns/dname.h"
#include "ldns/rr.h"
#include "iterator/iter_fwd.h"
#include "iterator/iter_delegpt.h"
#include "util/regional.h"

View file

@ -40,6 +40,8 @@
* Keep track of stub and root hints, and read those from config.
*/
#include "config.h"
#include "ldns/dname.h"
#include "ldns/rr.h"
#include "iterator/iter_hints.h"
#include "iterator/iter_delegpt.h"
#include "util/regional.h"

View file

@ -41,6 +41,7 @@
*/
#include "config.h"
#include "ldns/dname.h"
#include "iterator/iter_priv.h"
#include "util/regional.h"
#include "util/log.h"

View file

@ -43,6 +43,7 @@
#ifndef ITERATOR_ITER_PRIV_H
#define ITERATOR_ITER_PRIV_H
#include "util/rbtree.h"
#include "ldns/buffer.h"
struct iter_env;
struct config_file;
struct regional;

View file

@ -40,6 +40,7 @@
* one of the response types.
*/
#include "config.h"
#include "ldns/packet.h"
#include "iterator/iter_resptype.h"
#include "iterator/iter_delegpt.h"
#include "services/cache/dns.h"

View file

@ -42,6 +42,7 @@
#ifndef ITERATOR_ITER_SCRUB_H
#define ITERATOR_ITER_SCRUB_H
#include "ldns/buffer.h"
struct msg_parse;
struct query_info;
struct regional;

View file

@ -43,6 +43,7 @@
#ifndef ITERATOR_ITER_UTILS_H
#define ITERATOR_ITER_UTILS_H
#include "iterator/iter_resptype.h"
#include "ldns/buffer.h"
struct iter_env;
struct iter_hints;
struct iter_forwards;

View file

@ -41,6 +41,7 @@
*/
#include "config.h"
#include "ldns/ldns.h"
#include "iterator/iterator.h"
#include "iterator/iter_utils.h"
#include "iterator/iter_hints.h"

View file

@ -44,6 +44,7 @@
/* include the public api first, it should be able to stand alone */
#include "libunbound/unbound.h"
#include "config.h"
#include <ctype.h>
#include "libunbound/context.h"
#include "libunbound/libworker.h"
#include "util/locks.h"

View file

@ -42,6 +42,8 @@
* returns from the procedure when done.
*/
#include "config.h"
#include <ldns/dname.h>
#include <ldns/wire2host.h>
#include "libunbound/libworker.h"
#include "libunbound/context.h"
#include "libunbound/unbound.h"

View file

@ -44,6 +44,7 @@
#endif
#include "config.h"
#include "ldns/ldns.h"
#undef _POSIX_C_SOURCE
#undef _XOPEN_SOURCE

View file

@ -39,6 +39,7 @@
* This file contains the infrastructure cache.
*/
#include "config.h"
#include "ldns/rr.h"
#include "services/cache/infra.h"
#include "util/storage/slabhash.h"
#include "util/storage/lookup3.h"

View file

@ -39,6 +39,8 @@
* This file contains functions to enable local zone authority service.
*/
#include "config.h"
#include "ldns/dname.h"
#include "ldns/host2wire.h"
#include "services/localzone.h"
#include "util/regional.h"
#include "util/config_file.h"

View file

@ -43,6 +43,7 @@
* send back to clients.
*/
#include "config.h"
#include "ldns/wire2host.h"
#include "services/mesh.h"
#include "services/outbound_list.h"
#include "services/cache/dns.h"

View file

@ -39,6 +39,7 @@
* This file contains functions to help maintain a stack of modules.
*/
#include "config.h"
#include <ctype.h>
#include "services/modstack.h"
#include "util/module.h"
#include "util/fptr_wlist.h"

View file

@ -40,6 +40,8 @@
* wait for the pending answer events.
*/
#include "config.h"
#include <ctype.h>
#include "ldns/wire2host.h"
#include "services/outside_network.h"
#include "services/listen_dnsport.h"
#include "services/cache/infra.h"

View file

@ -52,6 +52,9 @@
#include "iterator/iter_fwd.h"
#include "validator/validator.h"
#include "services/localzone.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#ifdef HAVE_PWD_H
#include <pwd.h>
#endif

View file

@ -42,6 +42,18 @@
*/
#include "config.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#ifdef HAVE_OPENSSL_SSL_H
#include <openssl/ssl.h>
#endif
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
#endif
#ifdef HAVE_OPENSSL_RAND_H
#include <openssl/rand.h>
#endif
#include "util/log.h"
#include "util/config_file.h"
#include "util/locks.h"

View file

@ -41,6 +41,9 @@
*/
#include "config.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
/* remove alloc checks, not in this part of the code */
#ifdef UNBOUND_ALLOC_STATS
#undef malloc

View file

@ -41,6 +41,9 @@
*/
#include "config.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#include "libunbound/unbound.h"
#include "libunbound/context.h"
#include "util/locks.h"

View file

@ -41,6 +41,13 @@
*/
#include "config.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#include <sys/time.h>
#include "util/net_help.h"
#include "util/config_file.h"
#include <signal.h>

View file

@ -69,6 +69,10 @@
*/
#include "config.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#include "ldns/ldns.h"
#include <signal.h>
#include "libunbound/unbound.h"
#ifdef HAVE_SYS_STAT_H

View file

@ -40,6 +40,10 @@
*/
#include "config.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#include "ldns/ldns.h"
#include <signal.h>
#include "util/log.h"
#include "util/locks.h"

View file

@ -40,6 +40,7 @@
*/
#include "config.h"
#include "ldns/ldns.h"
#include "util/log.h"
#include "util/data/dname.h"
#include "util/data/msgparse.h"

View file

@ -38,6 +38,7 @@
* Declarations useful for the unit tests.
*/
#include "config.h"
#include <ctype.h>
#include "testcode/readhex.h"
#include "util/log.h"

View file

@ -40,6 +40,7 @@
#ifndef TESTCODE_READHEX_H
#define TESTCODE_READHEX_H
#include "ldns/buffer.h"
/**
* Helper to convert hex string to packet buffer.

View file

@ -40,6 +40,7 @@
* construct input to test the validator with.
*/
#include "config.h"
#include "ldns/ldns.h"
#include "util/log.h"
#include "util/config_file.h"
#include "util/net_help.h"

View file

@ -40,6 +40,10 @@
*/
#include "config.h"
#ifdef HAVE_GETOPT_H
#include <getopt.h>
#endif
#include "ldns/ldns.h"
#include <signal.h>
#include "util/locks.h"
#include "util/log.h"

View file

@ -39,6 +39,7 @@
*/
#include "config.h"
#include "ldns/rr.h"
#include "util/log.h"
#include "util/data/dname.h"
#include "testcode/unitmain.h"

View file

@ -39,6 +39,8 @@
*/
#include "config.h"
#include "ldns/dname.h"
#include "ldns/host2wire.h"
#include "util/log.h"
#include "testcode/unitmain.h"
#include "util/data/dname.h"

View file

@ -40,6 +40,22 @@
*/
#include "config.h"
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
#endif
#ifdef HAVE_OPENSSL_RAND_H
#include <openssl/rand.h>
#endif
#ifdef HAVE_OPENSSL_CONF_H
#include <openssl/conf.h>
#endif
#ifdef HAVE_OPENSSL_ENGINE_H
#include <openssl/engine.h>
#endif
#include "ldns/ldns.h"
#include "util/log.h"
#include "testcode/unitmain.h"

View file

@ -39,6 +39,7 @@
*/
#include "config.h"
#include "ldns/ldns.h"
#include "util/log.h"
#include "testcode/unitmain.h"
#include "util/data/msgparse.h"

View file

@ -40,6 +40,8 @@
*/
#include "config.h"
#include <ctype.h>
#include "ldns/ldns.h"
#include "util/log.h"
#include "util/configyyrename.h"

View file

@ -40,6 +40,7 @@
*/
#include "config.h"
#include <ctype.h>
#include "util/data/dname.h"
#include "util/data/msgparse.h"
#include "util/log.h"

View file

@ -40,6 +40,7 @@
*/
#include "config.h"
#include "ldns/wire2host.h"
#include "util/data/msgencode.h"
#include "util/data/msgreply.h"
#include "util/data/msgparse.h"

View file

@ -37,6 +37,7 @@
* Routines for message parsing a packet buffer to a descriptive structure.
*/
#include "config.h"
#include "ldns/ldns.h"
#include "util/data/msgparse.h"
#include "util/net_help.h"
#include "util/data/dname.h"

View file

@ -63,6 +63,7 @@
#ifndef UTIL_DATA_MSGPARSE_H
#define UTIL_DATA_MSGPARSE_H
#include "util/storage/lruhash.h"
#include "ldns/packet.h"
struct rrset_parse;
struct rr_parse;
struct regional;

View file

@ -40,6 +40,7 @@
*/
#include "config.h"
#include "ldns/ldns.h"
#include "util/data/msgreply.h"
#include "util/storage/lookup3.h"
#include "util/log.h"

View file

@ -40,6 +40,7 @@
*/
#include "config.h"
#include "ldns/wire2host.h"
#include "util/data/packed_rrset.h"
#include "util/data/dname.h"
#include "util/storage/lookup3.h"

View file

@ -42,6 +42,7 @@
#ifndef UTIL_DATA_PACKED_RRSET_H
#define UTIL_DATA_PACKED_RRSET_H
#include "util/storage/lruhash.h"
#include "ldns/rr.h"
struct alloc_cache;
struct regional;

View file

@ -41,6 +41,7 @@
#ifndef UTIL_LOG_H
#define UTIL_LOG_H
#include "ldns/buffer.h"
/**
* verbosity value:

View file

@ -41,6 +41,10 @@
*/
#include "config.h"
#ifdef HAVE_TIME_H
#include <time.h>
#endif
#include <sys/time.h>
#if defined(USE_MINI_EVENT) && !defined(USE_WINSOCK)
#include <signal.h>

View file

@ -38,6 +38,7 @@
*/
#include "config.h"
#include "ldns/ldns.h"
#include "util/net_help.h"
#include "util/log.h"
#include "util/data/dname.h"

View file

@ -39,6 +39,7 @@
* This file contains event notification functions.
*/
#include "config.h"
#include "ldns/wire2host.h"
#include "util/netevent.h"
#include "util/log.h"
#include "util/net_help.h"

View file

@ -60,6 +60,7 @@
#ifndef NET_EVENT_H
#define NET_EVENT_H
#include "ldns/buffer.h"
struct comm_point;
struct comm_reply;
struct event_base;

View file

@ -41,6 +41,7 @@
* It was modified to fit into unbound. The state table process is the same.
*/
#include "config.h"
#include "ldns/ldns.h"
#include "validator/autotrust.h"
#include "validator/val_anchor.h"
#include "validator/val_utils.h"

View file

@ -39,6 +39,9 @@
* This file contains storage for the trust anchors for the validator.
*/
#include "config.h"
#include <ctype.h>
#include "ldns/dname.h"
#include "ldns/host2wire.h"
#include "validator/val_anchor.h"
#include "validator/val_sigcrypt.h"
#include "validator/autotrust.h"

View file

@ -39,6 +39,7 @@
* This file contains functions for dealing with validator key entries.
*/
#include "config.h"
#include "ldns/ldns.h"
#include "validator/val_kentry.h"
#include "util/data/packed_rrset.h"
#include "util/data/dname.h"

View file

@ -42,6 +42,9 @@
* from cached NSEC records.
*/
#include "config.h"
#ifdef HAVE_OPENSSL_SSL_H
#include "openssl/ssl.h"
#endif
#include "validator/val_neg.h"
#include "validator/val_nsec.h"
#include "validator/val_nsec3.h"

View file

@ -41,6 +41,7 @@
* for denial of existance, and proofs for presence of types.
*/
#include "config.h"
#include "ldns/packet.h"
#include "validator/val_nsec.h"
#include "validator/val_utils.h"
#include "util/data/msgreply.h"

View file

@ -41,6 +41,10 @@
* for denial of existance, and proofs for presence of types.
*/
#include "config.h"
#include <ctype.h>
#ifdef HAVE_OPENSSL_SSL_H
#include "openssl/ssl.h"
#endif
#include "validator/val_nsec3.h"
#include "validator/validator.h"
#include "validator/val_kentry.h"

View file

@ -41,6 +41,7 @@
* bridging between RR wireformat data and crypto calls.
*/
#include "config.h"
#include "ldns/ldns.h"
#include "validator/val_sigcrypt.h"
#include "validator/validator.h"
#include "util/data/msgreply.h"
@ -55,6 +56,22 @@
#error "Need SSL library to do digital signature cryptography"
#endif
#ifdef HAVE_OPENSSL_ERR_H
#include <openssl/err.h>
#endif
#ifdef HAVE_OPENSSL_RAND_H
#include <openssl/rand.h>
#endif
#ifdef HAVE_OPENSSL_CONF_H
#include <openssl/conf.h>
#endif
#ifdef HAVE_OPENSSL_ENGINE_H
#include <openssl/engine.h>
#endif
/** return number of rrs in an rrset */
static size_t
rrset_get_count(struct ub_packed_rrset_key* rrset)

View file

@ -40,6 +40,7 @@
* According to RFC 4034.
*/
#include "config.h"
#include "ldns/ldns.h"
#include "validator/validator.h"
#include "validator/val_anchor.h"
#include "validator/val_kcache.h"