From: Otto Moerbeek Date: Wed, 11 Feb 2026 14:48:03 +0000 (+0100) Subject: Reduce include files to much smaller set X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=4bd4e65d5a0982c4a4708e56bbd2b9998c844edc;p=thirdparty%2Fpdns.git Reduce include files to much smaller set Signed-off-by: Otto Moerbeek --- diff --git a/pdns/recursordist/lwres.cc b/pdns/recursordist/lwres.cc index f077446055..2e53937a5a 100644 --- a/pdns/recursordist/lwres.cc +++ b/pdns/recursordist/lwres.cc @@ -19,42 +19,19 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifdef HAVE_CONFIG_H #include "config.h" -#endif -#include "utility.hh" + #include "lwres.hh" -#include -#include "dnsrecords.hh" -#include -#include "misc.hh" -#include -#include -#include -#include -#include -#include "dns.hh" -#include "qtype.hh" -#include "pdnsexception.hh" #include "arguments.hh" -#include "sstuff.hh" -#include "syncres.hh" -#include "dnswriter.hh" -#include "dnsparser.hh" -#include "logger.hh" -#include "dns_random.hh" -#include -#include -#include "validate-recursor.hh" -#include "ednssubnet.hh" #include "query-local-address.hh" -#include "tcpiohandler.hh" -#include "ednsoptions.hh" #include "ednspadding.hh" #include "rec-protozero.hh" -#include "uuid-utils.hh" +#include "logging.hh" #include "rec-tcpout.hh" #include "rec-cookiestore.hh" +#include "syncres.hh" +#include "resolve-context.hh" +#include "remote_logger.hh" static bool g_cookies = false; diff --git a/pdns/recursordist/lwres.hh b/pdns/recursordist/lwres.hh index 8467514458..33617820a5 100644 --- a/pdns/recursordist/lwres.hh +++ b/pdns/recursordist/lwres.hh @@ -20,31 +20,19 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ #pragma once + #include -#include -#include -#include "misc.hh" -#include "iputils.hh" -#include -#include -#include -#include -#include -#include -#include -#include "dnsparser.hh" -#include -#undef res_mkquery -#include "pdnsexception.hh" -#include "dns.hh" -#include "namespaces.hh" -#include "remote_logger.hh" -#include "fstrm_logger.hh" -#include "resolve-context.hh" -#include "noinitvector.hh" #include "logger.hh" #include "logr.hh" +#include "pdnsexception.hh" +#include "noinitvector.hh" + +class RemoteLoggerInterface; +class RemoteLogger; +class FrameStreamLogger; +struct DNSRecord; +struct ResolveContext; // Helper to be defined by main program: queue data and log based on return value of queueData() void remoteLoggerQueueData(RemoteLoggerInterface&, const std::string&); diff --git a/pdns/recursordist/rec-main.hh b/pdns/recursordist/rec-main.hh index 7657127f6a..bcdb4dcb1e 100644 --- a/pdns/recursordist/rec-main.hh +++ b/pdns/recursordist/rec-main.hh @@ -40,6 +40,7 @@ #include "recpacketcache.hh" #include "ratelimitedlog.hh" #include "protozero-trace.hh" +#include "remote_logger.hh" #ifdef NOD_ENABLED #include "nod.hh" diff --git a/pdns/recursordist/resolve-context.hh b/pdns/recursordist/resolve-context.hh index 354d81226a..06262b7a27 100644 --- a/pdns/recursordist/resolve-context.hh +++ b/pdns/recursordist/resolve-context.hh @@ -26,7 +26,6 @@ #include #include -#include #include "dnsname.hh" diff --git a/pdns/recursordist/syncres.cc b/pdns/recursordist/syncres.cc index 8d1f23860a..c5676555af 100644 --- a/pdns/recursordist/syncres.cc +++ b/pdns/recursordist/syncres.cc @@ -19,12 +19,11 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#include -#ifdef HAVE_CONFIG_H -#include #include "config.h" -#endif + +#include +#include #include "arguments.hh" #include "aggressive_nsec.hh" @@ -42,6 +41,7 @@ #include "rec-taskqueue.hh" #include "shuffle.hh" #include "rec-nsspeeds.hh" +#include "resolve-context.hh" rec::GlobalCounters g_Counters; thread_local rec::TCounters t_Counters(g_Counters);