CLEANUP: tree-wide: only include ebtree-t from type files

No need to include the full tree management code, type files only
need the definitions. Doing so reduces the whole code size by around
3.6% and the build time is down to just 6s.
This commit is contained in:
Willy Tarreau 2021-10-06 18:31:48 +02:00
parent 9b7a617a0e
commit 1db546eecd
28 changed files with 28 additions and 38 deletions

View File

@ -15,7 +15,7 @@
#ifndef _HAPROXY_CHECKS_T_H
#define _HAPROXY_CHECKS_T_H
#include <import/ebpttree.h>
#include <import/ebtree-t.h>
#include <import/ist.h>
#include <haproxy/api-t.h>
#include <haproxy/buf-t.h>

View File

@ -28,7 +28,7 @@
#include <netinet/ip.h>
#include <netinet/ip6.h>
#include <import/ebmbtree.h>
#include <import/ebtree-t.h>
#include <import/ist.h>
#include <haproxy/api-t.h>

View File

@ -27,7 +27,7 @@
#ifndef _HAPROXY_DICT_T_H
#define _HAPROXY_DICT_T_H
#include <import/ebpttree.h>
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
#include <haproxy/thread-t.h>

View File

@ -22,7 +22,7 @@
#ifndef _HAPROXY_DNS_T_H
#define _HAPROXY_DNS_T_H
#include <import/eb32tree.h>
#include <import/ebtree-t.h>
#include <haproxy/connection-t.h>
#include <haproxy/buf-t.h>

View File

@ -22,7 +22,7 @@
#ifndef _HAPROXY_HTTP_FCGI_T_H
#define _HAPROXY_HTTP_FCGI_T_H
#include <import/ebpttree.h>
#include <import/ebtree-t.h>
#include <import/ist.h>
#include <haproxy/acl-t.h>

View File

@ -27,7 +27,7 @@
#include <lua.h>
#include <lauxlib.h>
#include <import/ebpttree.h>
#include <import/ebtree-t.h>
#include <haproxy/proxy-t.h>
#include <haproxy/regex-t.h>

View File

@ -22,8 +22,7 @@
#ifndef _HAPROXY_LB_CHASH_T_H
#define _HAPROXY_LB_CHASH_T_H
#include <import/eb32tree.h>
#include <import/ebtree.h>
#include <import/ebtree-t.h>
struct lb_chash {
struct eb_root act; /* weighted chash entries of active servers */

View File

@ -22,7 +22,7 @@
#ifndef _HAPROXY_LB_FAS_T_H
#define _HAPROXY_LB_FAS_T_H
#include <import/ebtree.h>
#include <import/ebtree-t.h>
struct lb_fas {
struct eb_root act; /* weighted least conns on the active servers */

View File

@ -22,7 +22,7 @@
#ifndef _HAPROXY_LB_FWLC_T_H
#define _HAPROXY_LB_FWLC_T_H
#include <import/ebtree.h>
#include <import/ebtree-t.h>
struct lb_fwlc {
struct eb_root act; /* weighted least conns on the active servers */

View File

@ -22,7 +22,7 @@
#ifndef _HAPROXY_LB_FWRR_T_H
#define _HAPROXY_LB_FWRR_T_H
#include <import/ebtree.h>
#include <import/ebtree-t.h>
/* This structure is used to apply fast weighted round robin on a server group */
struct fwrr_group {

View File

@ -25,7 +25,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <import/eb32tree.h>
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
#include <haproxy/obj_type-t.h>

View File

@ -32,7 +32,7 @@
#include <haproxy/connection-t.h>
#include <haproxy/dynbuf-t.h>
#include <import/eb64tree.h>
#include <import/ebtree-t.h>
/* Bit shift to get the stream sub ID for internal use which is obtained
* shifting the stream IDs by this value, knowing that the

View File

@ -23,7 +23,7 @@
#ifndef _HAPROXY_NAMESPACE_T_H
#define _HAPROXY_NAMESPACE_T_H
#include <import/ebpttree.h>
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
/* the struct is just empty if namespaces are not supported */

View File

@ -22,7 +22,7 @@
#ifndef _HAPROXY_PATTERN_T_H
#define _HAPROXY_PATTERN_T_H
#include <import/ebmbtree.h>
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
#include <haproxy/regex-t.h>

View File

@ -27,7 +27,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <import/eb32tree.h>
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
#include <haproxy/dict-t.h>

View File

@ -25,7 +25,7 @@
#include <sys/types.h>
#include <sys/socket.h>
#include <import/eb32tree.h>
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
/* some pointer types referenced below */

View File

@ -27,8 +27,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <import/eb32tree.h>
#include <import/ebpttree.h>
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
#include <haproxy/arg-t.h>

View File

@ -22,7 +22,7 @@
#ifndef _HAPROXY_QUEUE_T_H
#define _HAPROXY_QUEUE_T_H
#include <import/eb32tree.h>
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
struct proxy;

View File

@ -31,7 +31,7 @@
#include <haproxy/list.h>
#include <import/eb64tree.h>
#include <import/ebtree-t.h>
/* QUIC frame types. */
enum quic_frame_type {

View File

@ -22,7 +22,7 @@
#ifndef _HAPROXY_RESOLVERS_T_H
#define _HAPROXY_RESOLVERS_T_H
#include <import/eb32tree.h>
#include <import/ebtree-t.h>
#include <haproxy/connection-t.h>
#include <haproxy/dns-t.h>

View File

@ -25,8 +25,7 @@
#include <netinet/in.h>
#include <arpa/inet.h>
#include <import/eb32tree.h>
#include <import/ebmbtree.h>
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
#include <haproxy/check-t.h>

View File

@ -33,7 +33,7 @@
#define _HAPROXY_SSL_CKCH_T_H
#ifdef USE_OPENSSL
#include <import/ebmbtree.h>
#include <import/ebtree-t.h>
#include <haproxy/buf-t.h>
#include <haproxy/openssl-compat.h>

View File

@ -23,8 +23,7 @@
#define _HAPROXY_SSL_CRTLIST_T_H
#ifdef USE_OPENSSL
#include <import/ebmbtree.h>
#include <import/ebpttree.h>
#include <import/ebtree-t.h>
/* forward declarations for structures below */

View File

@ -23,9 +23,7 @@
#define _HAPROXY_SSL_SOCK_T_H
#ifdef USE_OPENSSL
#include <import/eb64tree.h>
#include <import/ebmbtree.h>
#include <import/ebpttree.h>
#include <import/ebtree-t.h>
#include <haproxy/buf-t.h>
#include <haproxy/connection-t.h> /* struct wait_event */

View File

@ -23,9 +23,7 @@
#ifndef _HAPROXY_STICK_TABLE_T_H
#define _HAPROXY_STICK_TABLE_T_H
#include <import/eb32tree.h>
#include <import/ebmbtree.h>
#include <import/ebpttree.h>
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
#include <haproxy/freq_ctr-t.h>

View File

@ -24,8 +24,7 @@
#include <sys/time.h>
#include <import/eb32sctree.h>
#include <import/eb32tree.h>
#include <import/ebtree-t.h>
#include <haproxy/api-t.h>
#include <haproxy/thread-t.h>

View File

@ -18,7 +18,7 @@
#ifndef _HAPROXY_TCPCHECK_T_H
#define _HAPROXY_TCPCHECK_T_H
#include <import/ebpttree.h>
#include <import/ebtree-t.h>
#include <import/ist.h>
#include <haproxy/api-t.h>
#include <haproxy/buf-t.h>

View File

@ -38,8 +38,7 @@
#include <haproxy/quic_loss-t.h>
#include <haproxy/task.h>
#include <import/eb64tree.h>
#include <import/ebmbtree.h>
#include <import/ebtree-t.h>
typedef unsigned long long ull;