Commit 06c53cf5 authored by Jan Včelák's avatar Jan Včelák 🚀

make all include paths relative to /src

parent acb74804
......@@ -6,9 +6,9 @@ bin_PROGRAMS = kdig khost knsupdate knsec3hash
noinst_LTLIBRARIES = libknot.la libknotd.la libknots.la
# $(YACC) will generate header file
AM_CPPFLAGS = -I$(top_srcdir)/src/libknot -DSYSCONFDIR='"$(sysconfdir)"' \
-DSBINDIR='"$(sbindir)"' -DCONFIG_DIR='"${config_dir}"' \
-DSTORAGE_DIR='"${storage_dir}"' -DRUN_DIR='"${run_dir}"'
AM_CPPFLAGS = -DSYSCONFDIR='"$(sysconfdir)"' -DSBINDIR='"$(sbindir)"' \
-DCONFIG_DIR='"${config_dir}"' -DSTORAGE_DIR='"${storage_dir}"' \
-DRUN_DIR='"${run_dir}"'
AM_YFLAGS = -d
libknotd_la_YFLAGS = -pcf_ -d
libknotd_la_LFLAGS = # TODO: reentrant parser, prefix
......
......@@ -15,8 +15,8 @@
*/
#include <config.h>
#include "base32hex.h"
#include "errcode.h"
#include "common/base32hex.h"
#include "common/errcode.h"
#include <stdlib.h> // malloc
#include <stdint.h> // uint8_t
......
......@@ -15,8 +15,8 @@
*/
#include <config.h>
#include "base64.h"
#include "errcode.h"
#include "common/base64.h"
#include "common/errcode.h"
#include <stdlib.h> // malloc
#include <stdint.h> // uint8_t
......
#ifndef DSFMT_PARAMS_H
#define DSFMT_PARAMS_H
#include "dSFMT.h"
#include "common/dSFMT.h"
/*----------------------
the parameters of DSFMT
......@@ -55,7 +55,7 @@
#endif
#if DSFMT_MEXP == 521
#include "dSFMT-params521.h"
#include "common/dSFMT-params521.h"
#elif DSFMT_MEXP == 1279
#include "dSFMT-params1279.h"
#elif DSFMT_MEXP == 2203
......
......@@ -16,7 +16,7 @@
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
#include "dSFMT-params.h"
#include "common/dSFMT-params.h"
/** dsfmt internal state vector */
dsfmt_t dsfmt_global_data;
......
......@@ -19,7 +19,7 @@
#include <string.h>
#include <time.h>
#include "common/fdset.h"
#include "common.h"
#include "libknot/common.h"
/* Workarounds for clock_gettime() not available on some platforms. */
#ifdef HAVE_CLOCK_GETTIME
......
......@@ -8,8 +8,8 @@
#include <config.h>
#include <assert.h>
#include <string.h>
#include "ahtable.h"
#include "murmurhash3.h"
#include "common/hattrie/ahtable.h"
#include "common/hattrie/murmurhash3.h"
enum {
AH_SORTED = 0x01,/* sorted iteration */
......
......@@ -26,8 +26,8 @@ extern "C" {
#include <stdlib.h>
#include <stdbool.h>
#include <stdint.h>
#include "common.h"
#include "hat-trie.h"
#include "libknot/common.h"
#include "common/hattrie/hat-trie.h"
typedef unsigned char* slot_t;
......
......@@ -9,8 +9,8 @@
#include <stdint.h>
#include <assert.h>
#include <string.h>
#include "hat-trie.h"
#include "ahtable.h"
#include "common/hattrie/hat-trie.h"
#include "common/hattrie/ahtable.h"
/* number of child nodes for used alphabet */
#define NODE_CHILDS (TRIE_MAXCHAR+1)
......
......@@ -24,7 +24,7 @@ extern "C" {
#include <stdlib.h>
#include <stdbool.h>
#include "common.h"
#include "libknot/common.h"
#include "common/mempattern.h"
/* Hat-trie defines. */
......
......@@ -2,7 +2,7 @@
* by its author, Austin Appleby. */
#include <config.h>
#include "murmurhash3.h"
#include "common/hattrie/murmurhash3.h"
static inline uint32_t fmix(uint32_t h)
{
......
......@@ -38,7 +38,7 @@
***/
#include <config.h>
#include "heap.h"
#include "common/heap.h"
#include <string.h>
#include <stdlib.h>
......
......@@ -9,8 +9,8 @@ This file is licensed under the GPL v3
#include <stdlib.h>
#include <stdarg.h>
#include <string.h>
#include "common.h"
#include "tap.h"
#include "libknot/common.h"
#include "common/libtap/tap.h"
static int expected_tests = NO_PLAN;
static int failed_tests;
......
......@@ -21,7 +21,7 @@
#include <sys/resource.h>
#include <stdarg.h>
#include "mempattern.h"
#include "common/mempattern.h"
#include "common/log.h"
#include "common/slab/alloc-common.h"
......
......@@ -12,7 +12,7 @@
#undef LOCAL_DEBUG
#include "mempool.h"
#include "common/mempool.h"
#include "common/mempattern.h"
#include <string.h>
......
......@@ -17,7 +17,7 @@
#include <config.h>
#include <stdio.h>
#include <ctype.h>
#include "print.h"
#include "common/print.h"
void array_printf(const uint8_t *data, const unsigned length,
printf_t print_handler, const char type)
......
......@@ -26,9 +26,9 @@
#include <stdlib.h>
#endif
#include "common.h"
#include "prng.h"
#include "dSFMT.h"
#include "libknot/common.h"
#include "common/prng.h"
#include "common/dSFMT.h"
/*! \brief TLS unique key for each thread seed. */
static pthread_key_t tls_prng_key;
......
......@@ -17,7 +17,7 @@
#include <config.h>
#include <stdio.h>
#include "ref.h"
#include "common/ref.h"
void ref_init(ref_t *p, ref_destructor_t dtor)
{
......
......@@ -33,7 +33,7 @@
#include "libknot/binary.h"
#include "libknot/edns.h"
#include "knot/conf/conf.h"
#include "libknotd_la-cf-parse.h" /* Automake generated header. */
#include "knot/conf/libknotd_la-cf-parse.h" /* Automake generated header. */
extern int cf_lex (YYSTYPE *lvalp, void *scanner);
extern void cf_error(void *scanner, const char *format, ...);
......
......@@ -16,7 +16,7 @@
#include <config.h>
#include <sys/stat.h>
#include "remote.h"
#include "knot/ctl/remote.h"
#include "common/log.h"
#include "common/fdset.h"
#include "common/prng.h"
......
......@@ -26,7 +26,7 @@
#include <cap-ng.h>
#endif /* HAVE_CAP_NG_H */
#include "common.h"
#include "libknot/common.h"
#include "common/evqueue.h"
#include "knot/knot.h"
#include "knot/server/server.h"
......
......@@ -25,9 +25,9 @@
#include <sys/mman.h>
#include "common/crc.h"
#include "common.h"
#include "libknot/common.h"
#include "knot/other/debug.h"
#include "journal.h"
#include "knot/server/journal.h"
/*! \brief Infinite file size limit. */
#define FSLIMIT_INF (~((size_t)0))
......
......@@ -17,8 +17,8 @@
#include <config.h>
#include <assert.h>
#include "estimator.h"
#include "dname.h"
#include "knot/zone/estimator.h"
#include "libknot/dname.h"
#include "common/lists.h"
#include "libknot/zone/node.h"
#include "common/hattrie/ahtable.h"
......
......@@ -32,7 +32,7 @@
#include "common/mempattern.h"
#include "libknot/rdata.h"
#include "semantic-check.h"
#include "knot/zone/semantic-check.h"
static char *error_messages[(-ZC_ERR_UNKNOWN) + 1] = {
[-ZC_ERR_MISSING_SOA] = "SOA record missing in zone!",
......
......@@ -22,14 +22,14 @@
#include <ctype.h>
#include <inttypes.h>
#include "common.h"
#include "libknot/common.h"
#include "common/mempattern.h"
#include "dname.h"
#include "consts.h"
#include "util/tolower.h"
#include "util/debug.h"
#include "util/utils.h"
#include "util/wire.h"
#include "libknot/dname.h"
#include "libknot/consts.h"
#include "libknot/util/tolower.h"
#include "libknot/util/debug.h"
#include "libknot/util/utils.h"
#include "libknot/util/wire.h"
/*----------------------------------------------------------------------------*/
......
......@@ -27,13 +27,13 @@
#include <string.h>
#include <time.h>
#include "binary.h"
#include "common.h"
#include "common/getline.h"
#include "dname.h"
#include "key.h"
#include "sig0.h"
#include "tsig.h"
#include "libknot/binary.h"
#include "libknot/common.h"
#include "libknot/dname.h"
#include "libknot/dnssec/key.h"
#include "libknot/dnssec/sig0.h"
#include "libknot/tsig.h"
#include "zscanner/zscanner.h"
/*!
......
......@@ -29,9 +29,9 @@
#include <stdint.h>
#include <time.h>
#include "dname.h"
#include "binary.h"
#include "tsig.h"
#include "libknot/dname.h"
#include "libknot/binary.h"
#include "libknot/tsig.h"
/*----------------------------------------------------------------------------*/
......
......@@ -22,13 +22,13 @@
#include <stdint.h>
#include <stdlib.h>
#include "common.h"
#include "common/descriptor.h"
#include "common/memdup.h"
#include "libknot/common.h"
#include "libknot/dnssec/algorithm.h"
#include "libknot/dnssec/nsec3.h"
#include "libknot/rdata.h"
#include "util/tolower.h"
#include "libknot/util/tolower.h"
/*!
* \brief Compute NSEC3 SHA1 hash.
......
......@@ -33,7 +33,7 @@
#include <string.h>
#include "libknot/dnssec/algorithm.h"
#include "rrset.h"
#include "libknot/rrset.h"
/*---------------------------------------------------------------------------*/
......
......@@ -18,9 +18,9 @@
#include <assert.h>
#include <time.h>
#include "common/errcode.h"
#include "sig0.h"
#include "sign.h"
#include "util/wire.h"
#include "libknot/dnssec/sig0.h"
#include "libknot/dnssec/sign.h"
#include "libknot/util/wire.h"
/*!
* \brief Lifetime fudge of the SIG(0) packets in seconds.
......
......@@ -15,12 +15,6 @@
*/
#include <config.h>
#include "common.h"
#include "common/descriptor.h"
#include "common/errcode.h"
#include "libknot/dnssec/algorithm.h"
#include "libknot/dnssec/key.h"
#include "libknot/dnssec/sign.h"
#include <assert.h>
#include <openssl/dsa.h>
#include <openssl/opensslconf.h>
......@@ -29,6 +23,12 @@
#endif
#include <openssl/evp.h>
#include <openssl/rsa.h>
#include "common/descriptor.h"
#include "common/errcode.h"
#include "libknot/common.h"
#include "libknot/dnssec/algorithm.h"
#include "libknot/dnssec/key.h"
#include "libknot/dnssec/sign.h"
struct algorithm_functions;
typedef struct algorithm_functions algorithm_functions_t;
......
......@@ -19,13 +19,13 @@
#include <time.h>
#include "knot/conf/conf.h"
#include "knot/server/zones.h"
#include "libknot/dnssec/policy.h"
#include "libknot/dnssec/zone-events.h"
#include "libknot/dnssec/zone-keys.h"
#include "libknot/dnssec/zone-nsec.h"
#include "libknot/dnssec/zone-sign.h"
#include "libknot/dnssec/zone-keys.h"
#include "libknot/dnssec/policy.h"
#include "libknot/zone/zone.h"
#include "libknot/util/debug.h"
#include "libknot/zone/zone.h"
static uint32_t time_now(void)
{
......
......@@ -22,16 +22,16 @@
#include <time.h>
#include "common/descriptor.h"
#include "common/errcode.h"
#include "common/hattrie/hat-trie.h"
#include "common/hattrie/ahtable.h"
#include "common/hattrie/hat-trie.h"
#include "libknot/dname.h"
#include "libknot/rdata.h"
#include "libknot/dnssec/zone-sign.h"
#include "libknot/dnssec/key.h"
#include "libknot/dnssec/policy.h"
#include "libknot/dnssec/rrset-sign.h"
#include "libknot/dnssec/sign.h"
#include "libknot/dnssec/zone-keys.h"
#include "libknot/dnssec/zone-sign.h"
#include "libknot/rdata.h"
#include "libknot/rrset.h"
#include "libknot/updates/changesets.h"
#include "libknot/util/debug.h"
......
......@@ -19,10 +19,10 @@
#include <stdlib.h>
#include <assert.h>
#include "edns.h"
#include "common.h"
#include "libknot/edns.h"
#include "libknot/common.h"
#include "common/descriptor.h"
#include "util/debug.h"
#include "libknot/util/debug.h"
/*! \brief Various EDNS constatns. */
enum knot_edns_consts {
......
......@@ -29,8 +29,8 @@
#include <stdint.h>
#include "util/utils.h"
#include "rrset.h"
#include "libknot/util/utils.h"
#include "libknot/rrset.h"
/*----------------------------------------------------------------------------*/
/*! \brief Structure representing one OPT RR Option. */
......
......@@ -27,23 +27,23 @@
#ifndef _KNOT_LIBKNOT_H_
#define _KNOT_LIBKNOT_H_
#include "consts.h"
#include "dname.h"
#include "edns.h"
#include "packet/packet.h"
#include "packet/query.h"
#include "packet/response.h"
#include "rrset.h"
#include "rrset-dump.h"
#include "tsig.h"
#include "tsig-op.h"
#include "util/tolower.h"
#include "util/utils.h"
#include "util/wire.h"
#include "zone/node.h"
#include "zone/zone.h"
#include "zone/zonedb.h"
#include "rdata.h"
#include "libknot/consts.h"
#include "libknot/dname.h"
#include "libknot/edns.h"
#include "libknot/packet/packet.h"
#include "libknot/packet/query.h"
#include "libknot/packet/response.h"
#include "libknot/rrset.h"
#include "libknot/rrset-dump.h"
#include "libknot/tsig.h"
#include "libknot/tsig-op.h"
#include "libknot/util/tolower.h"
#include "libknot/util/utils.h"
#include "libknot/util/wire.h"
#include "libknot/zone/node.h"
#include "libknot/zone/zone.h"
#include "libknot/zone/zonedb.h"
#include "libknot/rdata.h"
#endif
......
......@@ -17,10 +17,10 @@
#include <config.h>
#include <strings.h>
#include "chaos.h"
#include "libknot/nameserver/chaos.h"
#include "common/descriptor.h"
#include "packet/packet.h"
#include "packet/response.h"
#include "libknot/packet/packet.h"
#include "libknot/packet/response.h"
/*!
* \brief Get a string result for a given TXT query.
......
......@@ -29,8 +29,8 @@
#include <stdlib.h>
#include <stdint.h>
#include "name-server.h"
#include "packet/packet.h"
#include "libknot/nameserver/name-server.h"
#include "libknot/packet/packet.h"
/*!
* \brief Create a response for a given query in the CHAOS class.
......
......@@ -21,22 +21,22 @@
#include <urcu.h>
#include "nameserver/name-server.h"
#include "updates/xfr-in.h"
#include "libknot/nameserver/name-server.h"
#include "libknot/updates/xfr-in.h"
#include "libknot.h"
#include "libknot/libknot.h"
#include "common/errcode.h"
#include "common.h"
#include "libknot/common.h"
#include "common/lists.h"
#include "util/debug.h"
#include "packet/packet.h"
#include "packet/response.h"
#include "packet/query.h"
#include "consts.h"
#include "libknot/util/debug.h"
#include "libknot/packet/packet.h"
#include "libknot/packet/response.h"
#include "libknot/packet/query.h"
#include "libknot/consts.h"
#include "common/descriptor.h"
#include "updates/changesets.h"
#include "updates/ddns.h"
#include "tsig-op.h"
#include "libknot/updates/changesets.h"
#include "libknot/updates/ddns.h"
#include "libknot/tsig-op.h"
#include "libknot/rdata.h"
#include "libknot/dnssec/zone-nsec.h"
......
......@@ -39,14 +39,14 @@
#include <string.h>
#include <sys/time.h>
#include "zone/zonedb.h"
#include "edns.h"
#include "consts.h"
#include "tsig.h"
#include "packet/packet.h"
#include "libknot/zone/zonedb.h"
#include "libknot/edns.h"
#include "libknot/consts.h"
#include "libknot/tsig.h"
#include "libknot/packet/packet.h"
#include "common/sockaddr.h"
#include "common/lists.h"
#include "updates/changesets.h"
#include "libknot/updates/changesets.h"
struct conf_t;
struct server_t;
......
......@@ -18,12 +18,12 @@
#include <assert.h>
#include <stdlib.h>
#include "packet/packet.h"
#include "util/debug.h"
#include "common.h"
#include "libknot/packet/packet.h"
#include "libknot/util/debug.h"
#include "libknot/common.h"
#include "common/descriptor.h"
#include "util/wire.h"
#include "tsig.h"
#include "libknot/util/wire.h"
#include "libknot/tsig.h"
/*----------------------------------------------------------------------------*/
/* Non-API functions */
......
......@@ -30,11 +30,11 @@
#include <stdint.h>
#include <string.h>
#include "dname.h"
#include "rrset.h"
#include "edns.h"
#include "zone/node.h"
#include "zone/zone.h"
#include "libknot/dname.h"
#include "libknot/rrset.h"
#include "libknot/edns.h"
#include "libknot/zone/node.h"
#include "libknot/zone/zone.h"
/*----------------------------------------------------------------------------*/
......
......@@ -16,8 +16,8 @@
#include <config.h>
#include <stdlib.h>
#include "packet/query.h"
#include "util/wire.h"
#include "libknot/packet/query.h"
#include "libknot/util/wire.h"
#include "libknot/common.h"
/*----------------------------------------------------------------------------*/
......
......@@ -30,10 +30,10 @@
#include <stdint.h>
#include <string.h>
#include "packet/packet.h"
#include "dname.h"
#include "rrset.h"
#include "edns.h"
#include "libknot/packet/packet.h"
#include "libknot/dname.h"
#include "libknot/rrset.h"
#include "libknot/edns.h"
/*----------------------------------------------------------------------------*/
/*!
......
......@@ -18,13 +18,13 @@
#include <stdlib.h>
#include <stdint.h>
#include "packet/response.h"
#include "util/wire.h"
#include "common.h"
#include "util/debug.h"
#include "rrset.h"
#include "packet/packet.h"
#include "edns.h"
#include "libknot/packet/response.h"
#include "libknot/util/wire.h"
#include "libknot/common.h"
#include "libknot/util/debug.h"
#include "libknot/rrset.h"
#include "libknot/packet/packet.h"
#include "libknot/edns.h"
/*----------------------------------------------------------------------------*/
......
......@@ -30,11 +30,11 @@
#include <stdint.h>
#include <string.h>
#include "packet/packet.h"
#include "libknot/packet/packet.h"
#include "dname.h"
#include "rrset.h"
#include "edns.h"
#include "libknot/dname.h"
#include "libknot/rrset.h"
#include "libknot/edns.h"
/*!
* \brief Holds information about compressed domain name.
......
......@@ -28,9 +28,9 @@
#define _KNOT_RDATA_H_
#include "common/descriptor.h"
#include "dname.h"
#include "rrset.h"
#include "util/utils.h"
#include "libknot/dname.h"
#include "libknot/rrset.h"
#include "libknot/util/utils.h"
static inline
const knot_dname_t *knot_rdata_cname_name(const knot_rrset_t *rrset)
......
......@@ -22,16 +22,16 @@
#include <stdio.h>
#include <stdlib.h>
#include "consts.h"
#include "common.h"
#include "libknot/consts.h"
#include "libknot/common.h"
#include "common/mempattern.h"
#include "rrset.h"
#include "libknot/rrset.h"
#include "libknot/rrset-dump.h"
#include "common/descriptor.h"
#include "util/debug.h"
#include "util/utils.h"
#include "packet/response.h"
#include "util/wire.h"
#include "libknot/util/debug.h"
#include "libknot/util/utils.h"
#include "libknot/packet/response.h"
#include "libknot/util/wire.h"
#include "libknot/dname.h"
#include "libknot/rdata.h"
......
......@@ -31,7 +31,7 @@
#include <stdint.h>
#include <stdbool.h>
#include "dname.h"
#include "libknot/dname.h"
/*----------------------------------------------------------------------------*/
/*!
......
......@@ -22,13 +22,13 @@
#include <time.h>
#include <inttypes.h>
#include "common.h"
#include "libknot/common.h"
#include "common/descriptor.h"
#include "tsig.h"
#include "tsig-op.h"
#include "util/wire.h"
#include "util/debug.h"
#include "consts.h"
#include "libknot/tsig.h"
#include "libknot/tsig-op.h"