From: Alan T. DeKok Date: Fri, 22 Oct 2021 13:54:53 +0000 (-0400) Subject: minimize more includes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=754bea7aba8f547ff987e8c69cefb78f15af1988;p=thirdparty%2Ffreeradius-server.git minimize more includes --- diff --git a/src/lib/unlang/call.c b/src/lib/unlang/call.c index 30df6b76f5c..bea19f208ec 100644 --- a/src/lib/unlang/call.c +++ b/src/lib/unlang/call.c @@ -29,7 +29,6 @@ RCSID("$Id$") #include "call_priv.h" #include "module_priv.h" -#include "unlang_priv.h" static unlang_action_t unlang_call_resume(UNUSED rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) diff --git a/src/lib/unlang/caller.c b/src/lib/unlang/caller.c index 786add162fa..d9b3394996f 100644 --- a/src/lib/unlang/caller.c +++ b/src/lib/unlang/caller.c @@ -28,7 +28,6 @@ RCSID("$Id$") #include #include "caller_priv.h" -#include "unlang_priv.h" #include "group_priv.h" static unlang_action_t unlang_caller(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) diff --git a/src/lib/unlang/compile.c b/src/lib/unlang/compile.c index b6bc15e8321..8c78a688e79 100644 --- a/src/lib/unlang/compile.c +++ b/src/lib/unlang/compile.c @@ -26,7 +26,6 @@ RCSID("$Id$") #include #include -#include #include #include "call_priv.h" @@ -40,7 +39,6 @@ RCSID("$Id$") #include "subrequest_priv.h" #include "switch_priv.h" -#include "unlang_priv.h" #define UNLANG_IGNORE ((unlang_t *) -1) diff --git a/src/lib/unlang/condition.c b/src/lib/unlang/condition.c index 963de7b9773..014652d08e1 100644 --- a/src/lib/unlang/condition.c +++ b/src/lib/unlang/condition.c @@ -26,7 +26,6 @@ RCSID("$Id$") #include "condition_priv.h" #include "group_priv.h" -#include "unlang_priv.h" static unlang_action_t unlang_if(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) { diff --git a/src/lib/unlang/foreach.c b/src/lib/unlang/foreach.c index 03d0cdc03df..0b5706b4858 100644 --- a/src/lib/unlang/foreach.c +++ b/src/lib/unlang/foreach.c @@ -28,7 +28,6 @@ RCSID("$Id$") #include "foreach_priv.h" #include "return_priv.h" -#include "unlang_priv.h" #include "xlat_priv.h" static char const * const xlat_foreach_names[] = {"Foreach-Variable-0", diff --git a/src/lib/unlang/interpret.c b/src/lib/unlang/interpret.c index 2bf729d7abe..dc280a98c47 100644 --- a/src/lib/unlang/interpret.c +++ b/src/lib/unlang/interpret.c @@ -26,13 +26,10 @@ RCSID("$Id$") #include #include -#include -#include #include "interpret_priv.h" #include "module_priv.h" #include "parallel_priv.h" -#include "unlang_priv.h" /** The default interpreter instance for this thread */ diff --git a/src/lib/unlang/interpret_synchronous.c b/src/lib/unlang/interpret_synchronous.c index 1f3ec1970d8..aa3b5009f94 100644 --- a/src/lib/unlang/interpret_synchronous.c +++ b/src/lib/unlang/interpret_synchronous.c @@ -25,7 +25,6 @@ #include "interpret_priv.h" #include -#include typedef struct { fr_heap_t *runnable; diff --git a/src/lib/unlang/load_balance.c b/src/lib/unlang/load_balance.c index 0472c868f2e..5f3570eb98b 100644 --- a/src/lib/unlang/load_balance.c +++ b/src/lib/unlang/load_balance.c @@ -27,7 +27,6 @@ #include "load_balance_priv.h" #include "module_priv.h" -#include "unlang_priv.h" #define unlang_redundant_load_balance unlang_load_balance diff --git a/src/lib/unlang/map.c b/src/lib/unlang/map.c index 838e57be9f0..e4727b668c5 100644 --- a/src/lib/unlang/map.c +++ b/src/lib/unlang/map.c @@ -29,14 +29,10 @@ RCSID("$Id$") #include #include -#include -#include #include -#include #include "map_priv.h" -#include "unlang_priv.h" typedef enum { UNLANG_UPDATE_MAP_INIT = 0, //!< Start processing a map. diff --git a/src/lib/unlang/module.c b/src/lib/unlang/module.c index 9247830d5b4..f410b2703f4 100644 --- a/src/lib/unlang/module.c +++ b/src/lib/unlang/module.c @@ -28,12 +28,10 @@ RCSID("$Id$") #include #include -#include #include #include "module_priv.h" #include "subrequest_priv.h" -#include "unlang_priv.h" #include "tmpl.h" diff --git a/src/lib/unlang/parallel.c b/src/lib/unlang/parallel.c index e733ae68ce5..0524823974e 100644 --- a/src/lib/unlang/parallel.c +++ b/src/lib/unlang/parallel.c @@ -29,7 +29,6 @@ RCSID("$Id$") #include "module_priv.h" #include "parallel_priv.h" #include "subrequest_priv.h" -#include "unlang_priv.h" /** Cancel a specific child diff --git a/src/lib/unlang/subrequest_child.c b/src/lib/unlang/subrequest_child.c index 274a8a327c7..3b0b63bccf0 100644 --- a/src/lib/unlang/subrequest_child.c +++ b/src/lib/unlang/subrequest_child.c @@ -25,8 +25,6 @@ #include #include "interpret_priv.h" #include "subrequest_child_priv.h" -#include "subrequest_priv.h" -#include "unlang_priv.h" /** Holds a synthesised instruction that we insert into the parent request * diff --git a/src/lib/unlang/switch.c b/src/lib/unlang/switch.c index 921acd89ad5..f0e06eeb1f7 100644 --- a/src/lib/unlang/switch.c +++ b/src/lib/unlang/switch.c @@ -26,7 +26,6 @@ RCSID("$Id$") #include "group_priv.h" #include "switch_priv.h" -#include "unlang_priv.h" static unlang_action_t unlang_switch(rlm_rcode_t *p_result, request_t *request, unlang_stack_frame_t *frame) { diff --git a/src/lib/unlang/xlat_builtin.c b/src/lib/unlang/xlat_builtin.c index 811c32dfdd4..e9a54896eef 100644 --- a/src/lib/unlang/xlat_builtin.c +++ b/src/lib/unlang/xlat_builtin.c @@ -31,30 +31,24 @@ RCSID("$Id$") */ #include -#include -#include #include #include #include -#include #include #include #include #include #include -#include #ifdef HAVE_OPENSSL_EVP_H # include #endif #ifdef HAVE_REGEX_PCRE2 -# include #endif -#include static fr_rb_tree_t *xlat_root = NULL; diff --git a/src/lib/unlang/xlat_eval.c b/src/lib/unlang/xlat_eval.c index 523ba77e118..5d63d98d6e7 100644 --- a/src/lib/unlang/xlat_eval.c +++ b/src/lib/unlang/xlat_eval.c @@ -27,16 +27,11 @@ RCSID("$Id$") #include -#include -#include #include -#include -#include #include #include /* Remove when everything uses new xlat API */ -#include static bool done_init = false; diff --git a/src/lib/unlang/xlat_inst.c b/src/lib/unlang/xlat_inst.c index 192bb5f69d7..71e95a34c0f 100644 --- a/src/lib/unlang/xlat_inst.c +++ b/src/lib/unlang/xlat_inst.c @@ -30,7 +30,6 @@ RCSID("$Id$") #include #include -#include /** Holds instance data created by xlat_instantiate */ diff --git a/src/lib/unlang/xlat_tokenize.c b/src/lib/unlang/xlat_tokenize.c index 6f6181e39aa..c01774e1a38 100644 --- a/src/lib/unlang/xlat_tokenize.c +++ b/src/lib/unlang/xlat_tokenize.c @@ -33,7 +33,6 @@ RCSID("$Id$") #include #include -#include #undef XLAT_DEBUG #undef XLAT_HEXDUMP diff --git a/src/lib/util/debug.c b/src/lib/util/debug.c index dcd03eb60b1..25c822ebbc2 100644 --- a/src/lib/util/debug.c +++ b/src/lib/util/debug.c @@ -67,7 +67,6 @@ #endif #ifdef __APPLE__ -#include #include #endif diff --git a/src/lib/util/dict_ext.c b/src/lib/util/dict_ext.c index 486e3bfec24..aec85183aaa 100644 --- a/src/lib/util/dict_ext.c +++ b/src/lib/util/dict_ext.c @@ -24,9 +24,6 @@ RCSID("$Id$") #include -#include -#include -#include static fr_table_num_ordered_t const dict_attr_ext_table[] = { { L("name"), FR_DICT_ATTR_EXT_NAME }, diff --git a/src/lib/util/dl.c b/src/lib/util/dl.c index 3ef3a2ae2cd..eaeecfdd4fb 100644 --- a/src/lib/util/dl.c +++ b/src/lib/util/dl.c @@ -32,7 +32,6 @@ RCSID("$Id$") #include #include -#include #ifdef HAVE_VALGRIND_H # include diff --git a/src/lib/util/fopencookie.c b/src/lib/util/fopencookie.c index 6e943a7d923..348c07f011a 100644 --- a/src/lib/util/fopencookie.c +++ b/src/lib/util/fopencookie.c @@ -26,7 +26,6 @@ RCSID("$Id$") #ifndef HAVE_FOPENCOOKIE #include #include -#include #include "fopencookie.h" #define NEED_READ 0x01 diff --git a/src/lib/util/md4.c b/src/lib/util/md4.c index 5589504d3ad..9a4bea54d5c 100644 --- a/src/lib/util/md4.c +++ b/src/lib/util/md4.c @@ -8,7 +8,6 @@ RCSID("$Id$") #include #include -#include #include /* diff --git a/src/lib/util/md5.c b/src/lib/util/md5.c index ac9f4b6f97a..161eb85db97 100644 --- a/src/lib/util/md5.c +++ b/src/lib/util/md5.c @@ -8,7 +8,6 @@ RCSID("$Id$") #include #include -#include #include /* diff --git a/src/lib/util/print.c b/src/lib/util/print.c index 5ca29bba2f6..2a0498a143f 100644 --- a/src/lib/util/print.c +++ b/src/lib/util/print.c @@ -24,7 +24,6 @@ RCSID("$Id$") #include #include -#include #include diff --git a/src/lib/util/sha1.c b/src/lib/util/sha1.c index b4b20ac9865..6a7c25eef23 100644 --- a/src/lib/util/sha1.c +++ b/src/lib/util/sha1.c @@ -10,7 +10,6 @@ RCSID("$Id$") #include -#include #ifndef WITH_OPENSSL_SHA1 # define rol(value, bits) (((value) << (bits)) | ((value) >> (32 - (bits)))) diff --git a/src/listen/arp/proto_arp_ethernet.c b/src/listen/arp/proto_arp_ethernet.c index b2406f0a9b3..954cfda1339 100644 --- a/src/listen/arp/proto_arp_ethernet.c +++ b/src/listen/arp/proto_arp_ethernet.c @@ -24,7 +24,6 @@ */ #include #include -#include #include #include #include diff --git a/src/listen/control/radmin.c b/src/listen/control/radmin.c index 9ebc4ed3fcf..362ecda2285 100644 --- a/src/listen/control/radmin.c +++ b/src/listen/control/radmin.c @@ -73,7 +73,6 @@ DIAG_ON(strict-prototypes) #include #include -#include #include #include #include diff --git a/src/listen/tacacs/proto_tacacs.c b/src/listen/tacacs/proto_tacacs.c index deb71ac9c58..9ac29a50afa 100644 --- a/src/listen/tacacs/proto_tacacs.c +++ b/src/listen/tacacs/proto_tacacs.c @@ -25,9 +25,6 @@ #include #include -#include -#include -#include #include #include