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 084b15e..21b744d 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 0372ebf..0ba8555 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 cb2ea90..b8124e3 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 1e68944..461a5d1 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 10cb178..542d586 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 fa694b5..3d33834 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 e96193e..c437981 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 e5b1aeb..cfb274c 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 e5064be..258a6ab 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 0e12e1b..f7b746e 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 70839ee..66cabee 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 8907249..4dc86d2 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 b86ae31..fe46577 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 27305b2..32802d4 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 0c712e5..6d2a968 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 ce92765..7ce73db 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 38a6ca9..5ef47c3 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 2667449..8f6a1ec 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 13b4cbf..f174073 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 97c0d9e..463e24b 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 fbd3cb7..80c9864 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 2589a52..7f13f3d 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 7ec8aa9..dc7a376 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 6772b98..6a23971 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 f1f9d23..d8527b0 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 415a490..5081d98 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 29cb4cc..dcd6e3d 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 30a28a2..6e83594 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; -- 1.7.10.4