From 900f1522b444e8391250683d48855ceb3d23f225 Mon Sep 17 00:00:00 2001 From: Jason Ish Date: Thu, 23 Apr 2020 16:46:05 -0600 Subject: [PATCH] plugins: config.h: move into src and rename to autoconf.h While fixing files that include config.h, just remove the include if possible. --- .gitignore | 1 + configure.ac | 2 +- src/runmode-af-packet.c | 1 - src/runmode-netmap.c | 1 - src/runmode-nflog.c | 1 - src/runmode-unittests.c | 1 - src/source-af-packet.c | 1 - src/source-nfq.c | 1 - src/source-pfring.h | 2 -- src/suricata-common.h | 2 +- src/suricata.c | 1 - src/tests/fuzz/onefile.c | 2 +- src/threads.h | 4 ---- src/util-bpf.c | 1 - src/util-conf.c | 1 - src/util-ebpf.c | 2 +- src/util-host-info.c | 1 - src/util-misc.c | 1 - src/util-runmodes.c | 1 - src/util-running-modes.c | 1 - 20 files changed, 5 insertions(+), 23 deletions(-) diff --git a/.gitignore b/.gitignore index b3828bfb92..4bdfb76e2f 100644 --- a/.gitignore +++ b/.gitignore @@ -15,6 +15,7 @@ Makefile m4/ TAGS aclocal.m4 +autoconf.h autom4te.cache/ build/* compile diff --git a/configure.ac b/configure.ac index b79efa200d..4fc1b559fc 100644 --- a/configure.ac +++ b/configure.ac @@ -1,6 +1,6 @@ AC_INIT([suricata],[6.0.0-dev]) m4_ifndef([AM_SILENT_RULES], [m4_define([AM_SILENT_RULES],[])])AM_SILENT_RULES([yes]) - AC_CONFIG_HEADERS([config.h]) + AC_CONFIG_HEADERS([src/autoconf.h]) AC_CONFIG_SRCDIR([src/suricata.c]) AC_CONFIG_MACRO_DIR(m4) AM_INIT_AUTOMAKE([tar-ustar subdir-objects]) diff --git a/src/runmode-af-packet.c b/src/runmode-af-packet.c index ee50e06ffe..09f47f6e80 100644 --- a/src/runmode-af-packet.c +++ b/src/runmode-af-packet.c @@ -31,7 +31,6 @@ */ #include "suricata-common.h" -#include "config.h" #include "tm-threads.h" #include "conf.h" #include "runmodes.h" diff --git a/src/runmode-netmap.c b/src/runmode-netmap.c index 12636934a1..27bb845ad1 100644 --- a/src/runmode-netmap.c +++ b/src/runmode-netmap.c @@ -31,7 +31,6 @@ */ #include "suricata-common.h" -#include "config.h" #include "tm-threads.h" #include "conf.h" #include "runmodes.h" diff --git a/src/runmode-nflog.c b/src/runmode-nflog.c index 56e242aed1..48a9177ca2 100644 --- a/src/runmode-nflog.c +++ b/src/runmode-nflog.c @@ -21,7 +21,6 @@ * \author Giuseppe Longo */ #include "suricata-common.h" -#include "config.h" #include "tm-threads.h" #include "conf.h" #include "runmodes.h" diff --git a/src/runmode-unittests.c b/src/runmode-unittests.c index 67c504cc43..a8d8c1ef73 100644 --- a/src/runmode-unittests.c +++ b/src/runmode-unittests.c @@ -21,7 +21,6 @@ */ #include "suricata-common.h" -#include "config.h" #include "util-unittest.h" #include "runmode-unittests.h" diff --git a/src/source-af-packet.c b/src/source-af-packet.c index 4ef99dc341..fdf7647d42 100644 --- a/src/source-af-packet.c +++ b/src/source-af-packet.c @@ -33,7 +33,6 @@ #define PCAP_DONT_INCLUDE_PCAP_BPF_H 1 #define SC_PCAP_DONT_INCLUDE_PCAP_H 1 #include "suricata-common.h" -#include "config.h" #include "suricata.h" #include "decode.h" #include "packet-queue.h" diff --git a/src/source-nfq.c b/src/source-nfq.c index e07c7c27f0..bb04aa3226 100644 --- a/src/source-nfq.c +++ b/src/source-nfq.c @@ -37,7 +37,6 @@ #include "tmqh-packetpool.h" #include "conf.h" -#include "config.h" #include "conf-yaml-loader.h" #include "source-nfq-prototypes.h" #include "action-globals.h" diff --git a/src/source-pfring.h b/src/source-pfring.h index da173cea79..31fb745c90 100644 --- a/src/source-pfring.h +++ b/src/source-pfring.h @@ -26,8 +26,6 @@ #define PFRING_IFACE_NAME_LENGTH 48 -#include - typedef struct PfringThreadVars_ PfringThreadVars; /* PfringIfaceConfig flags */ diff --git a/src/suricata-common.h b/src/suricata-common.h index e9d52a080e..a5468a096e 100644 --- a/src/suricata-common.h +++ b/src/suricata-common.h @@ -37,7 +37,7 @@ #define __USE_GNU #if HAVE_CONFIG_H -#include +#include #endif #ifndef CLS diff --git a/src/suricata.c b/src/suricata.c index e771009e3f..335710cacb 100644 --- a/src/suricata.c +++ b/src/suricata.c @@ -22,7 +22,6 @@ */ #include "suricata-common.h" -#include "config.h" #if HAVE_GETOPT_H #include diff --git a/src/tests/fuzz/onefile.c b/src/tests/fuzz/onefile.c index e5d34ab182..ef86d921af 100644 --- a/src/tests/fuzz/onefile.c +++ b/src/tests/fuzz/onefile.c @@ -1,7 +1,7 @@ #include #include #include -#include "config.h" +#include "autoconf.h" int LLVMFuzzerTestOneInput(const uint8_t *Data, size_t Size); diff --git a/src/threads.h b/src/threads.h index bca76d7365..535622f6a7 100644 --- a/src/threads.h +++ b/src/threads.h @@ -27,10 +27,6 @@ #ifndef __THREADS_H__ #define __THREADS_H__ -#if HAVE_CONFIG_H -#include -#endif - #if defined(TLS_C11) #define thread_local _Thread_local #elif defined(TLS_GNU) diff --git a/src/util-bpf.c b/src/util-bpf.c index a61ec7f23c..934aca9ad2 100644 --- a/src/util-bpf.c +++ b/src/util-bpf.c @@ -23,7 +23,6 @@ #include "suricata-common.h" -#include "config.h" #include "suricata.h" #include "util-bpf.h" diff --git a/src/util-conf.c b/src/util-conf.c index a5fc0e2c95..a135b4b388 100644 --- a/src/util-conf.c +++ b/src/util-conf.c @@ -23,7 +23,6 @@ */ #include "suricata-common.h" -#include "config.h" #include "conf.h" #include "runmodes.h" #include "util-conf.h" diff --git a/src/util-ebpf.c b/src/util-ebpf.c index 958cf75f96..d7c0484c92 100644 --- a/src/util-ebpf.c +++ b/src/util-ebpf.c @@ -54,7 +54,7 @@ #include #include #include -#include "config.h" +#include "autoconf.h" #define BPF_MAP_MAX_COUNT 16 diff --git a/src/util-host-info.c b/src/util-host-info.c index f481c41a6a..0f02d98190 100644 --- a/src/util-host-info.c +++ b/src/util-host-info.c @@ -25,7 +25,6 @@ */ #include "suricata-common.h" -#include "config.h" #include "util-host-info.h" #include "util-byte.h" diff --git a/src/util-misc.c b/src/util-misc.c index 761960b928..2190d5aae2 100644 --- a/src/util-misc.c +++ b/src/util-misc.c @@ -22,7 +22,6 @@ */ #include "suricata-common.h" -#include "config.h" #include "suricata.h" #include "util-byte.h" #include "util-debug.h" diff --git a/src/util-runmodes.c b/src/util-runmodes.c index 889a459ca6..c002395df0 100644 --- a/src/util-runmodes.c +++ b/src/util-runmodes.c @@ -25,7 +25,6 @@ */ #include "suricata-common.h" -#include "config.h" #include "tm-threads.h" #include "conf.h" #include "runmodes.h" diff --git a/src/util-running-modes.c b/src/util-running-modes.c index 42c9102764..b4f52ea6da 100644 --- a/src/util-running-modes.c +++ b/src/util-running-modes.c @@ -21,7 +21,6 @@ */ #include "suricata-common.h" -#include "config.h" #include "app-layer-detect-proto.h" #include "app-layer.h" #include "app-layer-parser.h"