From 1db546eecd3982ffc1ea92c2f542a3b01ce43137 Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 6 Oct 2021 18:31:48 +0200 Subject: [PATCH] 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. --- include/haproxy/check-t.h | 2 +- include/haproxy/connection-t.h | 2 +- include/haproxy/dict-t.h | 2 +- include/haproxy/dns-t.h | 2 +- include/haproxy/fcgi-app-t.h | 2 +- include/haproxy/hlua-t.h | 2 +- include/haproxy/lb_chash-t.h | 3 +-- include/haproxy/lb_fas-t.h | 2 +- include/haproxy/lb_fwlc-t.h | 2 +- include/haproxy/lb_fwrr-t.h | 2 +- include/haproxy/listener-t.h | 2 +- include/haproxy/mux_quic-t.h | 2 +- include/haproxy/namespace-t.h | 2 +- include/haproxy/pattern-t.h | 2 +- include/haproxy/peers-t.h | 2 +- include/haproxy/protocol-t.h | 2 +- include/haproxy/proxy-t.h | 3 +-- include/haproxy/queue-t.h | 2 +- include/haproxy/quic_frame-t.h | 2 +- include/haproxy/resolvers-t.h | 2 +- include/haproxy/server-t.h | 3 +-- include/haproxy/ssl_ckch-t.h | 2 +- include/haproxy/ssl_crtlist-t.h | 3 +-- include/haproxy/ssl_sock-t.h | 4 +--- include/haproxy/stick_table-t.h | 4 +--- include/haproxy/task-t.h | 3 +-- include/haproxy/tcpcheck-t.h | 2 +- include/haproxy/xprt_quic-t.h | 3 +-- 28 files changed, 28 insertions(+), 38 deletions(-) diff --git a/include/haproxy/check-t.h b/include/haproxy/check-t.h index 084b15eda..21b744dcb 100644 --- a/include/haproxy/check-t.h +++ b/include/haproxy/check-t.h @@ -15,7 +15,7 @@ #ifndef _HAPROXY_CHECKS_T_H #define _HAPROXY_CHECKS_T_H -#include +#include #include #include #include diff --git a/include/haproxy/connection-t.h b/include/haproxy/connection-t.h index 0372ebfcd..0ba8555ff 100644 --- a/include/haproxy/connection-t.h +++ b/include/haproxy/connection-t.h @@ -28,7 +28,7 @@ #include #include -#include +#include #include #include diff --git a/include/haproxy/dict-t.h b/include/haproxy/dict-t.h index cb2ea9003..b8124e363 100644 --- a/include/haproxy/dict-t.h +++ b/include/haproxy/dict-t.h @@ -27,7 +27,7 @@ #ifndef _HAPROXY_DICT_T_H #define _HAPROXY_DICT_T_H -#include +#include #include #include diff --git a/include/haproxy/dns-t.h b/include/haproxy/dns-t.h index 1e68944ed..461a5d19a 100644 --- a/include/haproxy/dns-t.h +++ b/include/haproxy/dns-t.h @@ -22,7 +22,7 @@ #ifndef _HAPROXY_DNS_T_H #define _HAPROXY_DNS_T_H -#include +#include #include #include diff --git a/include/haproxy/fcgi-app-t.h b/include/haproxy/fcgi-app-t.h index 10cb1785f..542d586e8 100644 --- a/include/haproxy/fcgi-app-t.h +++ b/include/haproxy/fcgi-app-t.h @@ -22,7 +22,7 @@ #ifndef _HAPROXY_HTTP_FCGI_T_H #define _HAPROXY_HTTP_FCGI_T_H -#include +#include #include #include diff --git a/include/haproxy/hlua-t.h b/include/haproxy/hlua-t.h index fa694b532..3d33834c7 100644 --- a/include/haproxy/hlua-t.h +++ b/include/haproxy/hlua-t.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include diff --git a/include/haproxy/lb_chash-t.h b/include/haproxy/lb_chash-t.h index e96193e4b..c4379819f 100644 --- a/include/haproxy/lb_chash-t.h +++ b/include/haproxy/lb_chash-t.h @@ -22,8 +22,7 @@ #ifndef _HAPROXY_LB_CHASH_T_H #define _HAPROXY_LB_CHASH_T_H -#include -#include +#include struct lb_chash { struct eb_root act; /* weighted chash entries of active servers */ diff --git a/include/haproxy/lb_fas-t.h b/include/haproxy/lb_fas-t.h index e5b1aebd4..cfb274cb2 100644 --- a/include/haproxy/lb_fas-t.h +++ b/include/haproxy/lb_fas-t.h @@ -22,7 +22,7 @@ #ifndef _HAPROXY_LB_FAS_T_H #define _HAPROXY_LB_FAS_T_H -#include +#include struct lb_fas { struct eb_root act; /* weighted least conns on the active servers */ diff --git a/include/haproxy/lb_fwlc-t.h b/include/haproxy/lb_fwlc-t.h index e5064be11..258a6ab95 100644 --- a/include/haproxy/lb_fwlc-t.h +++ b/include/haproxy/lb_fwlc-t.h @@ -22,7 +22,7 @@ #ifndef _HAPROXY_LB_FWLC_T_H #define _HAPROXY_LB_FWLC_T_H -#include +#include struct lb_fwlc { struct eb_root act; /* weighted least conns on the active servers */ diff --git a/include/haproxy/lb_fwrr-t.h b/include/haproxy/lb_fwrr-t.h index 0e12e1ba0..f7b746e83 100644 --- a/include/haproxy/lb_fwrr-t.h +++ b/include/haproxy/lb_fwrr-t.h @@ -22,7 +22,7 @@ #ifndef _HAPROXY_LB_FWRR_T_H #define _HAPROXY_LB_FWRR_T_H -#include +#include /* This structure is used to apply fast weighted round robin on a server group */ struct fwrr_group { diff --git a/include/haproxy/listener-t.h b/include/haproxy/listener-t.h index 70839eef0..66cabee9f 100644 --- a/include/haproxy/listener-t.h +++ b/include/haproxy/listener-t.h @@ -25,7 +25,7 @@ #include #include -#include +#include #include #include diff --git a/include/haproxy/mux_quic-t.h b/include/haproxy/mux_quic-t.h index 8907249b8..4dc86d2ee 100644 --- a/include/haproxy/mux_quic-t.h +++ b/include/haproxy/mux_quic-t.h @@ -32,7 +32,7 @@ #include #include -#include +#include /* Bit shift to get the stream sub ID for internal use which is obtained * shifting the stream IDs by this value, knowing that the diff --git a/include/haproxy/namespace-t.h b/include/haproxy/namespace-t.h index b86ae31a5..fe465775b 100644 --- a/include/haproxy/namespace-t.h +++ b/include/haproxy/namespace-t.h @@ -23,7 +23,7 @@ #ifndef _HAPROXY_NAMESPACE_T_H #define _HAPROXY_NAMESPACE_T_H -#include +#include #include /* the struct is just empty if namespaces are not supported */ diff --git a/include/haproxy/pattern-t.h b/include/haproxy/pattern-t.h index 27305b2d1..32802d41c 100644 --- a/include/haproxy/pattern-t.h +++ b/include/haproxy/pattern-t.h @@ -22,7 +22,7 @@ #ifndef _HAPROXY_PATTERN_T_H #define _HAPROXY_PATTERN_T_H -#include +#include #include #include diff --git a/include/haproxy/peers-t.h b/include/haproxy/peers-t.h index 0c712e5a1..6d2a9688a 100644 --- a/include/haproxy/peers-t.h +++ b/include/haproxy/peers-t.h @@ -27,7 +27,7 @@ #include #include -#include +#include #include #include diff --git a/include/haproxy/protocol-t.h b/include/haproxy/protocol-t.h index ce92765ea..7ce73db87 100644 --- a/include/haproxy/protocol-t.h +++ b/include/haproxy/protocol-t.h @@ -25,7 +25,7 @@ #include #include -#include +#include #include /* some pointer types referenced below */ diff --git a/include/haproxy/proxy-t.h b/include/haproxy/proxy-t.h index 38a6ca972..5ef47c3f4 100644 --- a/include/haproxy/proxy-t.h +++ b/include/haproxy/proxy-t.h @@ -27,8 +27,7 @@ #include #include -#include -#include +#include #include #include diff --git a/include/haproxy/queue-t.h b/include/haproxy/queue-t.h index 266744909..8f6a1ec8d 100644 --- a/include/haproxy/queue-t.h +++ b/include/haproxy/queue-t.h @@ -22,7 +22,7 @@ #ifndef _HAPROXY_QUEUE_T_H #define _HAPROXY_QUEUE_T_H -#include +#include #include struct proxy; diff --git a/include/haproxy/quic_frame-t.h b/include/haproxy/quic_frame-t.h index 13b4cbfa0..f17407319 100644 --- a/include/haproxy/quic_frame-t.h +++ b/include/haproxy/quic_frame-t.h @@ -31,7 +31,7 @@ #include -#include +#include /* QUIC frame types. */ enum quic_frame_type { diff --git a/include/haproxy/resolvers-t.h b/include/haproxy/resolvers-t.h index 97c0d9ee3..463e24bea 100644 --- a/include/haproxy/resolvers-t.h +++ b/include/haproxy/resolvers-t.h @@ -22,7 +22,7 @@ #ifndef _HAPROXY_RESOLVERS_T_H #define _HAPROXY_RESOLVERS_T_H -#include +#include #include #include diff --git a/include/haproxy/server-t.h b/include/haproxy/server-t.h index fbd3cb7cb..80c98647f 100644 --- a/include/haproxy/server-t.h +++ b/include/haproxy/server-t.h @@ -25,8 +25,7 @@ #include #include -#include -#include +#include #include #include diff --git a/include/haproxy/ssl_ckch-t.h b/include/haproxy/ssl_ckch-t.h index 2589a526e..7f13f3d7d 100644 --- a/include/haproxy/ssl_ckch-t.h +++ b/include/haproxy/ssl_ckch-t.h @@ -33,7 +33,7 @@ #define _HAPROXY_SSL_CKCH_T_H #ifdef USE_OPENSSL -#include +#include #include #include diff --git a/include/haproxy/ssl_crtlist-t.h b/include/haproxy/ssl_crtlist-t.h index 7ec8aa9f0..dc7a3764a 100644 --- a/include/haproxy/ssl_crtlist-t.h +++ b/include/haproxy/ssl_crtlist-t.h @@ -23,8 +23,7 @@ #define _HAPROXY_SSL_CRTLIST_T_H #ifdef USE_OPENSSL -#include -#include +#include /* forward declarations for structures below */ diff --git a/include/haproxy/ssl_sock-t.h b/include/haproxy/ssl_sock-t.h index 6772b9812..6a239715e 100644 --- a/include/haproxy/ssl_sock-t.h +++ b/include/haproxy/ssl_sock-t.h @@ -23,9 +23,7 @@ #define _HAPROXY_SSL_SOCK_T_H #ifdef USE_OPENSSL -#include -#include -#include +#include #include #include /* struct wait_event */ diff --git a/include/haproxy/stick_table-t.h b/include/haproxy/stick_table-t.h index f1f9d23e6..d8527b0d2 100644 --- a/include/haproxy/stick_table-t.h +++ b/include/haproxy/stick_table-t.h @@ -23,9 +23,7 @@ #ifndef _HAPROXY_STICK_TABLE_T_H #define _HAPROXY_STICK_TABLE_T_H -#include -#include -#include +#include #include #include diff --git a/include/haproxy/task-t.h b/include/haproxy/task-t.h index 415a490cb..5081d985b 100644 --- a/include/haproxy/task-t.h +++ b/include/haproxy/task-t.h @@ -24,8 +24,7 @@ #include -#include -#include +#include #include #include diff --git a/include/haproxy/tcpcheck-t.h b/include/haproxy/tcpcheck-t.h index 29cb4cc5a..dcd6e3d6e 100644 --- a/include/haproxy/tcpcheck-t.h +++ b/include/haproxy/tcpcheck-t.h @@ -18,7 +18,7 @@ #ifndef _HAPROXY_TCPCHECK_T_H #define _HAPROXY_TCPCHECK_T_H -#include +#include #include #include #include diff --git a/include/haproxy/xprt_quic-t.h b/include/haproxy/xprt_quic-t.h index 30a28a214..6e83594de 100644 --- a/include/haproxy/xprt_quic-t.h +++ b/include/haproxy/xprt_quic-t.h @@ -38,8 +38,7 @@ #include #include -#include -#include +#include typedef unsigned long long ull;