Commit 42575d33 authored by Ondřej Surý's avatar Ondřej Surý

Use config.h in the same way for same experience in all sources.

Move (and sometimes add) #include <config.h> at the top of
all *.c files.

Remove all #include ["<]config.h[">] from headers files.

Change-Id: I1df07602d0240affd95e12fccd122558300d2145
parent 8f2dd2e2
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "base32hex.h"
#include "errcode.h"
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "base64.h"
#include "errcode.h"
......
#include <config.h>
#ifndef DSFMT_PARAMS_H
#define DSFMT_PARAMS_H
......
......@@ -11,6 +11,8 @@
*
* The new BSD License is applied to this software, see LICENSE.txt
*/
#include <config.h>
#include <stdio.h>
#include <string.h>
#include <stdlib.h>
......
......@@ -28,8 +28,6 @@
* unsigned int and 64-bit unsigned int in hexadecimal format.
*/
#include <config.h>
#ifndef DSFMT_H
#define DSFMT_H
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "common/descriptor.h"
#include "libknot/util/utils.h" // knot_lookup_table_t
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "common/errcode.h"
#include "common/errors.h"
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdarg.h>
#include <stdio.h>
#include <stdlib.h>
......
......@@ -14,10 +14,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <unistd.h>
#include <config.h>
#include "common/evqueue.h"
#include "common/fdset.h"
......
......@@ -14,10 +14,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <sys/time.h>
#include <stdlib.h>
#include <stdio.h>
#include <config.h>
#include "common/evsched.h"
......
......@@ -14,12 +14,12 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <dlfcn.h>
#include <string.h>
#include <stdio.h>
#include <time.h>
#include <stdlib.h>
#include <config.h>
#include "common/fdset.h"
/* Workarounds for clock_gettime() not available on some platforms. */
......
......@@ -32,7 +32,6 @@
#ifndef _KNOTD_FDSET_H_
#define _KNOTD_FDSET_H_
#include "config.h"
#include <stddef.h>
#ifdef HAVE_SYS_SELECT_H
#include <sys/select.h>
......
......@@ -19,10 +19,9 @@
#define _WITH_GETLINE
#endif
#include <config.h>
#include "common/getline.h"
#include "config.h" // HAVE_
#include <stdio.h> // getline or fgetln
#include <stdlib.h> // free
#include <string.h> // memcpy
......
......@@ -5,6 +5,7 @@
*
*/
#include <config.h>
#include <assert.h>
#include <string.h>
#include "ahtable.h"
......
......@@ -5,6 +5,7 @@
*
*/
#include <config.h>
#include <stdint.h>
#include <assert.h>
#include <string.h>
......
/* This is MurmurHash3. The original C++ code was placed in the public domain
* by its author, Austin Appleby. */
#include <config.h>
#include "murmurhash3.h"
static inline uint32_t fmix(uint32_t h)
......
......@@ -37,6 +37,7 @@
* ------
***/
#include <config.h>
#include "heap.h"
#include <string.h>
#include <stdlib.h>
......
......@@ -16,6 +16,7 @@
#ifdef PROF_LATENCY
#include <config.h>
#include <sys/resource.h>
#include <sys/types.h>
#include <sys/socket.h>
......
......@@ -26,6 +26,7 @@
#define _BIRD_LISTS_C_
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include "common/lists.h"
......
......@@ -14,11 +14,11 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <sys/resource.h>
#include <config.h>
#include <stdarg.h>
#include "mempattern.h"
......
......@@ -8,6 +8,8 @@
* of the GNU Lesser General Public License.
*/
#include <config.h>
#undef LOCAL_DEBUG
#include "mempool.h"
......
......@@ -13,7 +13,6 @@
#include <string.h>
#include <stdint.h>
#include "config.h"
#if __GNUC__ >= 4
#define LIKE_MALLOC __attribute__((malloc)) /** Function returns a "new" pointer **/
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdio.h>
#include <ctype.h>
#include "print.h"
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdint.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -20,9 +20,10 @@
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
* THE SOFTWARE.
*/
#include <config.h>
#include "queue.h"
#include "atomic.h"
#include "config.h"
#include <stdbool.h>
#include <string.h>
#include <assert.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdio.h>
#include "ref.h"
......
......@@ -12,7 +12,7 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#include <config.h>
#include <stdio.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdlib.h>
#include <string.h>
#include <sys/types.h>
......
......@@ -29,7 +29,6 @@
#include <signal.h>
#include <stdint.h>
#include <config.h>
/*
* Common types and constants.
......
......@@ -12,8 +12,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#include <config.h>
#include <assert.h>
#include <stdarg.h>
#include <string.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdlib.h>
#include <stdbool.h>
#include <string.h>
......
......@@ -12,8 +12,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
*/
#include <config.h>
#include <assert.h>
#include <stdbool.h>
#include <stdio.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdarg.h>
#include <stdio.h>
#include <string.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "remote.h"
#include "common/log.h"
#include "common/fdset.h"
......
......@@ -27,7 +27,6 @@
#ifndef _KNOTD_REMOTE_H_
#define _KNOTD_REMOTE_H_
#include <config.h>
#include "knot/conf/conf.h"
#include "libknot/packet/packet.h"
#include "libknot/rrset.h"
......
......@@ -27,8 +27,6 @@
#ifndef _KNOTD_DEBUG_H_
#define _KNOTD_DEBUG_H_
#include "config.h" /* autoconf generated */
#ifdef KNOTD_SERVER_DEBUG
#define KNOTD_THREADS_DEBUG
#define KNOTD_JOURNAL_DEBUG
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <assert.h>
#include "knot/server/notify.h"
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <time.h>
#include <unistd.h>
#include <sys/types.h>
......
......@@ -14,8 +14,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <dlfcn.h>
#include <config.h>
#include <dlfcn.h>
#include <time.h>
#include <unistd.h>
#include <errno.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <sys/stat.h>
#include <unistd.h>
......
/* Copyright (C) 2011 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/types.h>
......
......@@ -14,11 +14,10 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include "knot/zone/zone-dump.h"
#include <config.h>
#include <inttypes.h>
#include "knot/zone/zone-dump.h"
#include "common/descriptor.h"
#include "knot/conf/conf.h"
#include "knot/server/zones.h"
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdlib.h>
#include <string.h>
......
......@@ -24,7 +24,6 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "common/errcode.h"
#include "common/mempattern.h"
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <libknot/consts.h>
knot_lookup_table_t knot_opcode_names[] = {
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdint.h>
#include <stdlib.h>
#include <assert.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <strings.h>
#include "chaos.h"
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdio.h>
#include <assert.h>
#include <sys/time.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdint.h>
#include <assert.h>
#include <stdlib.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <assert.h>
#include <stdlib.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdlib.h>
#include "packet/query.h"
#include "util/wire.h"
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdlib.h>
#include <stdint.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "libknot/rrset-dump.h"
#include <stdlib.h> // free
......
/* Copyright (C) 2011 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
/* Copyright (C) 2011 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stddef.h>
#include <string.h>
#include <stdlib.h>
......
/* Copyright (C) 2011 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "common/descriptor.h"
#include "common/errcode.h"
#include "sign/bnutils.h"
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <assert.h>
#include <ctype.h>
#include <stddef.h>
......
/* Copyright (C) 2011 CZ.NIC, z.s.p.o. <knot-dns@labs.nic.cz>
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "sign/dnssec.h"
#include "sign/sig0.h"
#include "common/errcode.h"
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <assert.h>
#include <stdint.h>
#include <openssl/hmac.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <stdint.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <string.h>
#include <stdlib.h>
#include <assert.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <assert.h>
#include <stdlib.h>
#include <inttypes.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <assert.h>
#include <urcu.h>
......
......@@ -32,7 +32,6 @@
#include <stdint.h>
#include <stdio.h>
#include "config.h" /* autoconf generated */
#include "common/log.h"
/*
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "util/tolower.h"
const uint8_t char_table[CHAR_TABLE_SIZE] = {
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <assert.h>
#include "zone/zone-contents.h"
......
......@@ -14,8 +14,8 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <assert.h>
#include <config.h>
#include <assert.h>
#include <stdlib.h>
#include <inttypes.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <assert.h>
#include <stdlib.h>
#include <stdio.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <sys/types.h>
#include <sys/socket.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "tests/common/base32hex_tests.h"
#include <stdlib.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "tests/common/base64_tests.h"
#include <stdlib.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include "tests/common/descriptor_tests.h"
#include <stdlib.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/time.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <stdlib.h>
#include <stdint.h>
#include <sys/time.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.
*/
#include <config.h>
#include <string.h>
#include <time.h>
......
......@@ -14,6 +14,7 @@
along with this program. If not, see <http://www.gnu.org/licenses/>.