REORG: include: move cfgparse.h to haproxy/cfgparse.h
There's no point splitting the file in two since only cfgparse uses the
types defined there. A few call places were updated and cleaned up. All
of them were in C files which register keywords.
There is nothing left in common/ now so this directory must not be used
anymore.
diff --git a/contrib/prometheus-exporter/service-prometheus.c b/contrib/prometheus-exporter/service-prometheus.c
index bc968d9..9375f0a 100644
--- a/contrib/prometheus-exporter/service-prometheus.c
+++ b/contrib/prometheus-exporter/service-prometheus.c
@@ -17,7 +17,7 @@
#include <haproxy/applet.h>
#include <haproxy/backend.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/frontend.h>
#include <haproxy/global.h>
#include <haproxy/http.h>
diff --git a/include/common/cfgparse.h b/include/haproxy/cfgparse.h
similarity index 96%
rename from include/common/cfgparse.h
rename to include/haproxy/cfgparse.h
index 86bceb6..447c057 100644
--- a/include/common/cfgparse.h
+++ b/include/haproxy/cfgparse.h
@@ -1,8 +1,8 @@
/*
- * include/common/cfgparse.h
+ * include/haproxy/cfgparse.h
* Configuration parsing functions.
*
- * 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,8 +19,8 @@
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*/
-#ifndef _COMMON_CFGPARSE_H
-#define _COMMON_CFGPARSE_H
+#ifndef _HAPROXY_CFGPARSE_H
+#define _HAPROXY_CFGPARSE_H
#include <haproxy/api.h>
#include <haproxy/list-t.h>
@@ -148,7 +148,7 @@
#define REGISTER_CONFIG_POSTPARSER(name, parser) \
INITCALL2(STG_REGISTER, cfg_register_postparser, (name), (parser))
-#endif /* _COMMON_CFGPARSE_H */
+#endif /* _HAPROXY_CFGPARSE_H */
/*
* Local variables:
diff --git a/src/51d.c b/src/51d.c
index 12f40ea..68195cd 100644
--- a/src/51d.c
+++ b/src/51d.c
@@ -1,7 +1,7 @@
#include <stdio.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/chunk.h>
#include <haproxy/buf-t.h>
#include <haproxy/errors.h>
diff --git a/src/activity.c b/src/activity.c
index 92bce33..17eb13c 100644
--- a/src/activity.c
+++ b/src/activity.c
@@ -11,7 +11,7 @@
*/
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/channel.h>
#include <haproxy/cli.h>
#include <haproxy/stream_interface.h>
diff --git a/src/cache.c b/src/cache.c
index ba96ede..56368f3 100644
--- a/src/cache.c
+++ b/src/cache.c
@@ -12,6 +12,7 @@
#include <haproxy/action-t.h>
#include <haproxy/api.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/channel.h>
#include <haproxy/cli.h>
#include <haproxy/filters.h>
@@ -27,7 +28,6 @@
#include <import/sha1.h>
-#include <common/cfgparse.h>
#include <haproxy/hash.h>
#include <haproxy/htx.h>
#include <haproxy/net_helper.h>
diff --git a/src/cfgparse-global.c b/src/cfgparse-global.c
index 8126172..d6d7243 100644
--- a/src/cfgparse-global.c
+++ b/src/cfgparse-global.c
@@ -11,7 +11,7 @@
#include <fcntl.h>
#include <unistd.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/compression.h>
#include <haproxy/global.h>
diff --git a/src/cfgparse-listen.c b/src/cfgparse-listen.c
index cdb6840..0544df4 100644
--- a/src/cfgparse-listen.c
+++ b/src/cfgparse-listen.c
@@ -11,11 +11,11 @@
#include <fcntl.h>
#include <unistd.h>
-#include <common/cfgparse.h>
#include <haproxy/uri_auth.h>
#include <haproxy/acl.h>
#include <haproxy/capture-t.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/check.h>
#include <haproxy/compression-t.h>
#include <haproxy/connection.h>
diff --git a/src/cfgparse-ssl.c b/src/cfgparse-ssl.c
index 831bdb4..144cef8 100644
--- a/src/cfgparse-ssl.c
+++ b/src/cfgparse-ssl.c
@@ -33,7 +33,7 @@
#include <haproxy/api.h>
#include <haproxy/base64.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/listener.h>
#include <haproxy/openssl-compat.h>
#include <haproxy/ssl_sock.h>
diff --git a/src/cfgparse.c b/src/cfgparse.c
index a983e5a..0bb4f2b 100644
--- a/src/cfgparse.c
+++ b/src/cfgparse.c
@@ -39,7 +39,7 @@
#include <haproxy/backend.h>
#include <haproxy/api.h>
#include <haproxy/capture.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/channel.h>
#include <haproxy/check.h>
#include <haproxy/chunk.h>
diff --git a/src/check.c b/src/check.c
index 308a86e..f8df0e9 100644
--- a/src/check.c
+++ b/src/check.c
@@ -32,7 +32,7 @@
#include <haproxy/action.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/check.h>
#include <haproxy/chunk.h>
#include <haproxy/dns.h>
diff --git a/src/cli.c b/src/cli.c
index c39cbb6..b6249dd 100644
--- a/src/cli.c
+++ b/src/cli.c
@@ -28,7 +28,7 @@
#include <haproxy/applet-t.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/channel.h>
#include <haproxy/check.h>
#include <haproxy/cli.h>
diff --git a/src/compression.c b/src/compression.c
index cd548fc..7d4720e 100644
--- a/src/compression.c
+++ b/src/compression.c
@@ -27,8 +27,8 @@
#endif /* USE_ZLIB */
#include <haproxy/api.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/dynbuf.h>
-#include <common/cfgparse.h>
#include <haproxy/stream.h>
#include <haproxy/thread.h>
#include <haproxy/pool.h>
diff --git a/src/connection.c b/src/connection.c
index 3c9b21e..e27ba74 100644
--- a/src/connection.c
+++ b/src/connection.c
@@ -13,7 +13,7 @@
#include <errno.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/connection.h>
#include <haproxy/frontend.h>
#include <haproxy/namespace.h>
diff --git a/src/da.c b/src/da.c
index 6090851..a47fc30 100644
--- a/src/da.c
+++ b/src/da.c
@@ -1,7 +1,7 @@
#include <stdio.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/errors.h>
#include <haproxy/http.h>
#include <haproxy/http_ana.h>
diff --git a/src/dns.c b/src/dns.c
index 8eddde9..9ba1873 100644
--- a/src/dns.c
+++ b/src/dns.c
@@ -21,7 +21,7 @@
#include <haproxy/action.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/check.h>
#include <haproxy/channel.h>
#include <haproxy/cli.h>
diff --git a/src/fcgi-app.c b/src/fcgi-app.c
index 434fc02..1833557 100644
--- a/src/fcgi-app.c
+++ b/src/fcgi-app.c
@@ -12,8 +12,8 @@
#include <haproxy/acl.h>
#include <haproxy/api.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/chunk.h>
-#include <common/cfgparse.h>
#include <haproxy/errors.h>
#include <haproxy/fcgi-app.h>
#include <haproxy/filters.h>
diff --git a/src/filters.c b/src/filters.c
index f0bfcf5..1d4119b 100644
--- a/src/filters.c
+++ b/src/filters.c
@@ -12,7 +12,7 @@
#include <haproxy/api.h>
#include <haproxy/buf-t.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/compression.h>
#include <haproxy/errors.h>
#include <haproxy/filters.h>
diff --git a/src/flt_http_comp.c b/src/flt_http_comp.c
index 30b5aad..6641249 100644
--- a/src/flt_http_comp.c
+++ b/src/flt_http_comp.c
@@ -11,13 +11,13 @@
*/
#include <haproxy/api.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/compression.h>
#include <haproxy/dynbuf.h>
#include <haproxy/filters.h>
#include <haproxy/http.h>
#include <haproxy/http_ana-t.h>
#include <haproxy/http_htx.h>
-#include <common/cfgparse.h>
#include <haproxy/htx.h>
#include <haproxy/list.h>
#include <haproxy/proxy-t.h>
diff --git a/src/flt_spoe.c b/src/flt_spoe.c
index 25c075b..a53bcd9 100644
--- a/src/flt_spoe.c
+++ b/src/flt_spoe.c
@@ -16,7 +16,7 @@
#include <haproxy/action-t.h>
#include <haproxy/arg.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/filters.h>
#include <haproxy/freq_ctr.h>
#include <haproxy/frontend.h>
diff --git a/src/h1_htx.c b/src/h1_htx.c
index f6f21f2..e32d845 100644
--- a/src/h1_htx.c
+++ b/src/h1_htx.c
@@ -11,7 +11,7 @@
*/
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/global.h>
#include <haproxy/h1.h>
#include <haproxy/h1_htx.h>
diff --git a/src/haproxy.c b/src/haproxy.c
index 043625f..f066f5f 100644
--- a/src/haproxy.c
+++ b/src/haproxy.c
@@ -84,7 +84,7 @@
#include <import/sha1.h>
#include <haproxy/base64.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/chunk.h>
#include <haproxy/cli.h>
#include <haproxy/connection.h>
diff --git a/src/hlua.c b/src/hlua.c
index ef41e7d..fd5ba06 100644
--- a/src/hlua.c
+++ b/src/hlua.c
@@ -26,7 +26,7 @@
#include <import/ebpttree.h>
#include <haproxy/arg.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/channel.h>
#include <haproxy/cli.h>
#include <haproxy/connection.h>
diff --git a/src/http_act.c b/src/http_act.c
index a688acb..f83b32b 100644
--- a/src/http_act.c
+++ b/src/http_act.c
@@ -19,7 +19,7 @@
#include <haproxy/acl.h>
#include <haproxy/action.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/chunk.h>
#include <haproxy/global.h>
#include <haproxy/http.h>
diff --git a/src/http_htx.c b/src/http_htx.c
index d5d8747..e3e21d7 100644
--- a/src/http_htx.c
+++ b/src/http_htx.c
@@ -20,7 +20,7 @@
#include <haproxy/regex.h>
#include <haproxy/sample.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/h1.h>
#include <haproxy/http.h>
#include <haproxy/http_htx.h>
diff --git a/src/http_rules.c b/src/http_rules.c
index e4506f9..d2bb4f2 100644
--- a/src/http_rules.c
+++ b/src/http_rules.c
@@ -19,7 +19,7 @@
#include <haproxy/acl.h>
#include <haproxy/action.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/chunk.h>
#include <haproxy/global.h>
#include <haproxy/http.h>
diff --git a/src/listener.c b/src/listener.c
index a7ff803..82eb2e7 100644
--- a/src/listener.c
+++ b/src/listener.c
@@ -20,7 +20,7 @@
#include <haproxy/acl.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/connection.h>
#include <haproxy/errors.h>
#include <haproxy/global.h>
diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c
index dc4bab1..b03210f 100644
--- a/src/mux_fcgi.c
+++ b/src/mux_fcgi.c
@@ -11,7 +11,7 @@
*/
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/connection.h>
#include <haproxy/fcgi.h>
#include <haproxy/fcgi-app.h>
diff --git a/src/mux_h1.c b/src/mux_h1.c
index cffdd60..5a66f7d 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -11,7 +11,7 @@
*/
#include <haproxy/api.h>
#include <haproxy/istbuf.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/connection.h>
#include <haproxy/h1.h>
#include <haproxy/h1_htx.h>
diff --git a/src/mux_h2.c b/src/mux_h2.c
index 44a4332..102e74e 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -13,7 +13,7 @@
#include <import/eb32tree.h>
#include <haproxy/api.h>
#include <haproxy/istbuf.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/connection.h>
#include <haproxy/h1.h>
#include <haproxy/h2.h>
diff --git a/src/mworker-prog.c b/src/mworker-prog.c
index f6e61ed..d0b9446 100644
--- a/src/mworker-prog.c
+++ b/src/mworker-prog.c
@@ -21,7 +21,7 @@
#include <unistd.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/errors.h>
#include <haproxy/global.h>
#include <haproxy/log.h>
diff --git a/src/mworker.c b/src/mworker.c
index 9dd9f33..e2b154e 100644
--- a/src/mworker.c
+++ b/src/mworker.c
@@ -18,7 +18,7 @@
#include <sys/wait.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/cli.h>
#include <haproxy/fd.h>
#include <haproxy/global.h>
diff --git a/src/pool.c b/src/pool.c
index 78809bb..82ca79a 100644
--- a/src/pool.c
+++ b/src/pool.c
@@ -13,11 +13,11 @@
#include <haproxy/applet-t.h>
#include <haproxy/api.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/channel.h>
#include <haproxy/cli.h>
#include <haproxy/global.h>
-#include <common/cfgparse.h>
#include <haproxy/thread.h>
#include <haproxy/pool.h>
#include <haproxy/list.h>
diff --git a/src/proxy.c b/src/proxy.c
index e13c4ed..ba8a07d 100644
--- a/src/proxy.c
+++ b/src/proxy.c
@@ -19,7 +19,7 @@
#include <haproxy/applet-t.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/cli.h>
#include <haproxy/errors.h>
#include <haproxy/filters.h>
diff --git a/src/server.c b/src/server.c
index 32aa72e..0d9b533 100644
--- a/src/server.c
+++ b/src/server.c
@@ -14,12 +14,12 @@
#include <ctype.h>
#include <errno.h>
+#include <import/xxhash.h>
+
#include <haproxy/applet-t.h>
#include <haproxy/backend.h>
#include <haproxy/api.h>
-#include <import/xxhash.h>
-
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/check.h>
#include <haproxy/cli.h>
#include <haproxy/connection.h>
diff --git a/src/sink.c b/src/sink.c
index b6e1b85..5a4980b 100644
--- a/src/sink.c
+++ b/src/sink.c
@@ -19,7 +19,7 @@
*/
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/cli.h>
#include <import/ist.h>
#include <haproxy/list.h>
diff --git a/src/stats.c b/src/stats.c
index 558e48f..b42ae7a 100644
--- a/src/stats.c
+++ b/src/stats.c
@@ -27,7 +27,7 @@
#include <haproxy/applet-t.h>
#include <haproxy/backend.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/channel.h>
#include <haproxy/check.h>
#include <haproxy/cli.h>
diff --git a/src/stick_table.c b/src/stick_table.c
index 821ab98..0bdc62d 100644
--- a/src/stick_table.c
+++ b/src/stick_table.c
@@ -15,7 +15,7 @@
#include <errno.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/cli.h>
#include <haproxy/global.h>
#include <haproxy/http_rules.h>
diff --git a/src/stream.c b/src/stream.c
index ecc65ac..09f6f19 100644
--- a/src/stream.c
+++ b/src/stream.c
@@ -22,7 +22,7 @@
#include <haproxy/backend.h>
#include <haproxy/api.h>
#include <haproxy/capture.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/channel.h>
#include <haproxy/check.h>
#include <haproxy/cli.h>
diff --git a/src/tcp_rules.c b/src/tcp_rules.c
index 5966fce..5f8c74d 100644
--- a/src/tcp_rules.c
+++ b/src/tcp_rules.c
@@ -14,7 +14,7 @@
#include <haproxy/arg-t.h>
#include <haproxy/api.h>
#include <haproxy/capture-t.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/channel.h>
#include <haproxy/connection.h>
#include <haproxy/global.h>
diff --git a/src/thread.c b/src/thread.c
index b0cbd34..c58669f 100644
--- a/src/thread.c
+++ b/src/thread.c
@@ -23,7 +23,7 @@
#include <sys/cpuset.h>
#endif
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/thread.h>
#include <haproxy/tools.h>
#include <haproxy/global.h>
diff --git a/src/vars.c b/src/vars.c
index 53afe1a..d58e1a3 100644
--- a/src/vars.c
+++ b/src/vars.c
@@ -2,7 +2,7 @@
#include <haproxy/arg.h>
#include <haproxy/api.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/check.h>
#include <haproxy/global.h>
#include <haproxy/http.h>
diff --git a/src/wurfl.c b/src/wurfl.c
index 57e794e..9a1d858 100644
--- a/src/wurfl.c
+++ b/src/wurfl.c
@@ -3,7 +3,7 @@
#include <haproxy/api.h>
#include <haproxy/buf-t.h>
-#include <common/cfgparse.h>
+#include <haproxy/cfgparse.h>
#include <haproxy/chunk.h>
#include <haproxy/errors.h>
#include <haproxy/global.h>