From dcc048a14a361260fe588ee24650370065feb73a Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 4 Jun 2020 19:11:43 +0200 Subject: [PATCH] REORG: include: move acl.h to haproxy/acl.h{,-t}.h The files were moved almost as-is, just dropping arg-t and auth-t from acl-t but keeping arg-t in acl.h. It was useful to revisit the call places since a handful of files used to continue to include acl.h while they did not need it at all. Struct stream was only made a forward declaration since not otherwise needed. --- include/{types/acl.h => haproxy/acl-t.h} | 21 ++++++++------------- include/{proto => haproxy}/acl.h | 13 ++++++++----- include/types/fcgi-app.h | 2 +- include/types/proxy.h | 3 ++- src/acl.c | 2 +- src/auth.c | 1 - src/backend.c | 2 +- src/cfgparse-listen.c | 2 +- src/cfgparse.c | 2 +- src/compression.c | 1 - src/fcgi-app.c | 2 +- src/flt_spoe.c | 2 +- src/frontend.c | 2 +- src/haproxy.c | 3 +-- src/http_acl.c | 2 +- src/http_act.c | 2 +- src/http_ana.c | 2 +- src/http_rules.c | 2 +- src/listener.c | 2 +- src/payload.c | 2 +- src/peers.c | 1 - src/ssl_sample.c | 2 +- src/ssl_sock.c | 1 - src/stream.c | 2 +- src/tcp_rules.c | 2 +- 25 files changed, 36 insertions(+), 42 deletions(-) rename include/{types/acl.h => haproxy/acl-t.h} (95%) rename include/{proto => haproxy}/acl.h (97%) diff --git a/include/types/acl.h b/include/haproxy/acl-t.h similarity index 95% rename from include/types/acl.h rename to include/haproxy/acl-t.h index d9f408435..3e3762c4e 100644 --- a/include/types/acl.h +++ b/include/haproxy/acl-t.h @@ -1,8 +1,8 @@ /* - * include/types/acl.h + * include/haproxy/acl-t.h * This file provides structures and types for ACLs. * - * Copyright (C) 2000-2012 Willy Tarreau - w@1wt.eu + * Copyright (C) 2000-2020 Willy Tarreau - w@1wt.eu * * This library is free software; you can redistribute it and/or * modify it under the terms of the GNU Lesser General Public @@ -19,19 +19,18 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _TYPES_ACL_H -#define _TYPES_ACL_H +#ifndef _HAPROXY_ACL_T_H +#define _HAPROXY_ACL_T_H -#include +#include + +#include #include #include -#include -#include #include #include -#include /* ACL test result. * @@ -70,10 +69,6 @@ enum acl_cond_pol { ACL_COND_UNLESS, /* negative condition (after 'unless') */ }; -/* some dummy declarations to silent the compiler */ -struct proxy; -struct stream; - /* * ACL keyword: Associates keywords with parsers, methods to retrieve the value and testers. */ @@ -157,7 +152,7 @@ struct acl_cond { int line; /* line in the config file where the condition is declared */ }; -#endif /* _TYPES_ACL_H */ +#endif /* _HAPROXY_ACL_T_H */ /* * Local variables: diff --git a/include/proto/acl.h b/include/haproxy/acl.h similarity index 97% rename from include/proto/acl.h rename to include/haproxy/acl.h index 56ae22899..fcf50a5fc 100644 --- a/include/proto/acl.h +++ b/include/haproxy/acl.h @@ -1,5 +1,5 @@ /* - * include/proto/acl.h + * include/haproxy/acl.h * This file provides interface definitions for ACL manipulation. * * Copyright (C) 2000-2013 Willy Tarreau - w@1wt.eu @@ -19,11 +19,14 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _PROTO_ACL_H -#define _PROTO_ACL_H +#ifndef _HAPROXY_ACL_H +#define _HAPROXY_ACL_H +#include +#include #include -#include + +struct stream; /* * FIXME: we need destructor functions too ! @@ -144,7 +147,7 @@ void acl_unregister_keywords(struct acl_kw_list *kwl); int init_acl(); -#endif /* _PROTO_ACL_H */ +#endif /* _HAPROXY_ACL_H */ /* * Local variables: diff --git a/include/types/fcgi-app.h b/include/types/fcgi-app.h index c82f39a38..b314d69e0 100644 --- a/include/types/fcgi-app.h +++ b/include/types/fcgi-app.h @@ -22,6 +22,7 @@ #ifndef _TYPES_HTTP_FCGI_H #define _TYPES_HTTP_FCGI_H +#include #include #include #include @@ -30,7 +31,6 @@ #include -#include #include #define FCGI_APP_FL_KEEP_CONN 0x00000001 /* Keep the connection alive */ diff --git a/include/types/proxy.h b/include/types/proxy.h index 7579d8a27..53d9e3c0d 100644 --- a/include/types/proxy.h +++ b/include/types/proxy.h @@ -27,6 +27,7 @@ #include #include +#include #include #include #include @@ -39,7 +40,7 @@ #include #include -#include +#include #include #include #include diff --git a/src/acl.c b/src/acl.c index c0b698550..ea0a54dc1 100644 --- a/src/acl.c +++ b/src/acl.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -23,7 +24,6 @@ #include -#include #include #include #include diff --git a/src/auth.c b/src/auth.c index fe21a458d..faac16d4e 100644 --- a/src/auth.c +++ b/src/auth.c @@ -32,7 +32,6 @@ #include #include -#include #include struct userlist *userlist = NULL; /* list of all existing userlists */ diff --git a/src/backend.c b/src/backend.c index b7c47ccf8..f78742771 100644 --- a/src/backend.c +++ b/src/backend.c @@ -19,6 +19,7 @@ #include #include +#include #include #include #include @@ -40,7 +41,6 @@ #include -#include #include #include #include diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c index 51e118c4d..0c6fa35b7 100644 --- a/src/cfgparse-listen.c +++ b/src/cfgparse-listen.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -25,7 +26,6 @@ #include #include -#include #include #include #include diff --git a/src/cfgparse.c b/src/cfgparse.c index 3de138f71..376430f26 100644 --- a/src/cfgparse.c +++ b/src/cfgparse.c @@ -33,6 +33,7 @@ #include #include +#include #include #include #include @@ -66,7 +67,6 @@ #include #include -#include #include #include #include diff --git a/src/compression.c b/src/compression.c index 081bf03be..f77292cf4 100644 --- a/src/compression.c +++ b/src/compression.c @@ -35,7 +35,6 @@ #include #include -#include #include #include #include diff --git a/src/fcgi-app.c b/src/fcgi-app.c index 0db8e795a..dda4b3a99 100644 --- a/src/fcgi-app.c +++ b/src/fcgi-app.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include @@ -23,7 +24,6 @@ #include -#include #include #include #include diff --git a/src/flt_spoe.c b/src/flt_spoe.c index 1ffa4a780..7d36a8e0c 100644 --- a/src/flt_spoe.c +++ b/src/flt_spoe.c @@ -12,6 +12,7 @@ #include #include +#include #include #include #include @@ -31,7 +32,6 @@ #include #include -#include #include #include #include diff --git a/src/frontend.c b/src/frontend.c index 050a08fb8..068e8d69f 100644 --- a/src/frontend.c +++ b/src/frontend.c @@ -22,6 +22,7 @@ #include +#include #include #include #include @@ -32,7 +33,6 @@ #include -#include #include #include #include diff --git a/src/haproxy.c b/src/haproxy.c index 504add976..b420df938 100644 --- a/src/haproxy.c +++ b/src/haproxy.c @@ -78,6 +78,7 @@ #include #endif +#include #include #include #include @@ -116,9 +117,7 @@ #include #include #include -#include -#include #include #include #include diff --git a/src/http_acl.c b/src/http_acl.c index 0b6adfdb0..17a818e10 100644 --- a/src/http_acl.c +++ b/src/http_acl.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -25,7 +26,6 @@ #include #include -#include #include diff --git a/src/http_act.c b/src/http_act.c index 356d57287..844eeafbf 100644 --- a/src/http_act.c +++ b/src/http_act.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -34,7 +35,6 @@ #include -#include #include #include #include diff --git a/src/http_ana.c b/src/http_ana.c index edfacc4ff..855529378 100644 --- a/src/http_ana.c +++ b/src/http_ana.c @@ -10,6 +10,7 @@ * */ +#include #include #include #include @@ -25,7 +26,6 @@ #include -#include #include #include #include diff --git a/src/http_rules.c b/src/http_rules.c index 955c04f78..6864e5ea3 100644 --- a/src/http_rules.c +++ b/src/http_rules.c @@ -16,6 +16,7 @@ #include #include +#include #include #include #include @@ -28,7 +29,6 @@ #include -#include #include #include #include diff --git a/src/listener.c b/src/listener.c index 6a13b1c5b..ab0a4a726 100644 --- a/src/listener.c +++ b/src/listener.c @@ -18,6 +18,7 @@ #include #include +#include #include #include #include @@ -31,7 +32,6 @@ #include -#include #include #include #include diff --git a/src/payload.c b/src/payload.c index 5664ec7dd..c4f8b2cf9 100644 --- a/src/payload.c +++ b/src/payload.c @@ -13,13 +13,13 @@ #include #include +#include #include #include #include #include #include #include -#include #include #include #include diff --git a/src/peers.c b/src/peers.c index f576eaae2..cba840d55 100644 --- a/src/peers.c +++ b/src/peers.c @@ -35,7 +35,6 @@ #include -#include #include #include #include diff --git a/src/ssl_sample.c b/src/ssl_sample.c index 509b0c575..8314f3da3 100644 --- a/src/ssl_sample.c +++ b/src/ssl_sample.c @@ -20,6 +20,7 @@ #include #include +#include #include #include #include @@ -30,7 +31,6 @@ #include -#include #include #include diff --git a/src/ssl_sock.c b/src/ssl_sock.c index 12e95758d..5cad3d656 100644 --- a/src/ssl_sock.c +++ b/src/ssl_sock.c @@ -72,7 +72,6 @@ #include #include -#include #include #include #include diff --git a/src/stream.c b/src/stream.c index 5a70ccadc..ce41a2962 100644 --- a/src/stream.c +++ b/src/stream.c @@ -14,6 +14,7 @@ #include #include +#include #include #include #include @@ -41,7 +42,6 @@ #include #include -#include #include #include #include diff --git a/src/tcp_rules.c b/src/tcp_rules.c index 9b4977d9d..85073691d 100644 --- a/src/tcp_rules.c +++ b/src/tcp_rules.c @@ -9,6 +9,7 @@ * 2 of the License, or (at your option) any later version. * */ +#include #include #include #include @@ -24,7 +25,6 @@ #include -#include #include #include #include