]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move hlua.h to haproxy/hlua{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Thu, 4 Jun 2020 07:20:54 +0000 (09:20 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:57 +0000 (10:18 +0200)
This one required a few more includes as it uses list and ebpt_node.
It still references lots of types/ files for now.

contrib/modsecurity/modsec_wrapper.c
include/haproxy/hlua-t.h [moved from include/types/hlua.h with 82% similarity]
include/haproxy/hlua.h [moved from include/proto/hlua.h with 62% similarity]
include/types/applet.h
include/types/stream.h
src/debug.c
src/haproxy.c
src/hlua.c
src/hlua_fcn.c
src/stream.c
src/tools.c

index 056da542acd34f3cb9e211542deb5af796b00a14..6306b0b94388bf392280173a932ed05156a7de94 100644 (file)
 #include <stdio.h>
 #include <stdarg.h>
 
+#include <haproxy/hlua.h>
 #include <haproxy/time.h>
 
 #include <types/global.h>
 #include <types/stream.h>
 
 #include <proto/arg.h>
-#include <proto/hlua.h>
 #include <proto/log.h>
 #include <proto/spoe.h>
 
similarity index 82%
rename from include/types/hlua.h
rename to include/haproxy/hlua-t.h
index 990f9bc715f0b34a6c76e02f69de1c66c9745fa4..a49de51196e1c84bfa078b4052d37c4982c11272 100644 (file)
@@ -1,11 +1,35 @@
-#ifndef _TYPES_HLUA_H
-#define _TYPES_HLUA_H
+/*
+ * include/haproxy/hlua-t.h
+ * Lua core types definitions
+ *
+ * Copyright (C) 2015-2016 Thierry Fournier <tfournier@arpalert.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
+
+#ifndef _HAPROXY_HLUA_T_H
+#define _HAPROXY_HLUA_T_H
 
 #ifdef USE_LUA
 
 #include <lua.h>
 #include <lauxlib.h>
 
+#include <import/ebpttree.h>
+
+#include <haproxy/list-t.h>
 #include <haproxy/regex-t.h>
 #include <haproxy/xref-t.h>
 
@@ -168,6 +192,7 @@ struct hlua_addr {
 };
 
 #else /* USE_LUA */
+/************************ For use when Lua is disabled ********************/
 
 /* Empty struct for compilation compatibility */
 struct hlua { };
@@ -176,4 +201,4 @@ struct hlua_rule { };
 
 #endif /* USE_LUA */
 
-#endif /* _TYPES_HLUA_H */
+#endif /* _HAPROXY_HLUA_T_H */
similarity index 62%
rename from include/proto/hlua.h
rename to include/haproxy/hlua.h
index 32468b77bae892fd7dd7515f34068460b1e3d933..5d1153bb4c2c173fae4b836bfe4000fdb1684210 100644 (file)
@@ -1,11 +1,30 @@
-#ifndef _PROTO_HLUA_H
-#define _PROTO_HLUA_H
+/*
+ * include/haproxy/hlua.h
+ * Lua core management functions
+ *
+ * Copyright (C) 2015-2016 Thierry Fournier <tfournier@arpalert.org>
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation, version 2.1
+ * exclusively.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
+ */
 
-#ifdef USE_LUA
+#ifndef _HAPROXY_HLUA_H
+#define _HAPROXY_HLUA_H
 
-#include <lua.h>
+#include <haproxy/hlua-t.h>
 
-#include <types/hlua.h>
+#ifdef USE_LUA
 
 /* The following macros are used to set flags. */
 #define HLUA_SET_RUN(__hlua)         do {(__hlua)->flags |= HLUA_RUN;} while(0)
@@ -33,6 +52,8 @@ struct task *hlua_process_task(struct task *task, void *context, unsigned short
 
 #else /* USE_LUA */
 
+/************************ For use when Lua is disabled ********************/
+
 #define HLUA_IS_RUNNING(__hlua) 0
 
 #define HLUA_INIT(__hlua)
@@ -44,4 +65,4 @@ static inline void hlua_ctx_destroy(struct hlua *lua) { }
 
 #endif /* USE_LUA */
 
-#endif /* _PROTO_HLUA_H */
+#endif /* _HAPROXY_HLUA_H */
index d6b34a3737ee0d57f2fd802553fdcb959845d807..a67827bd2f32feca6258e2e20d56d8d150d222e4 100644 (file)
@@ -26,8 +26,8 @@
 #include <haproxy/buf.h>
 #include <haproxy/dynbuf-t.h>
 #include <haproxy/freq_ctr-t.h>
+#include <haproxy/hlua-t.h>
 #include <haproxy/xref-t.h>
-#include <types/hlua.h>
 #include <types/obj_type.h>
 #include <types/proxy.h>
 #include <types/stream.h>
index 08e0f1255a02ee8f9c732dd9a69725458f235503..c7db75e25358d3e053cdf88abb95a4976a019f23 100644 (file)
 
 #include <haproxy/api-t.h>
 #include <haproxy/dynbuf-t.h>
+#include <haproxy/hlua-t.h>
 #include <haproxy/list-t.h>
 
 #include <types/channel.h>
 #include <types/filters.h>
-#include <types/hlua.h>
 #include <types/obj_type.h>
 #include <types/http_ana.h>
 #include <types/proxy.h>
index bf2bc1a14893251764ad44b51aac01c1dbd00c03..18fed01625f52f2d9272cdafe02169ee45ac23fb 100644 (file)
@@ -22,6 +22,7 @@
 #include <haproxy/api.h>
 #include <haproxy/buf.h>
 #include <haproxy/debug.h>
+#include <haproxy/hlua.h>
 #include <haproxy/thread.h>
 #include <import/ist.h>
 #include <haproxy/net_helper.h>
@@ -32,7 +33,6 @@
 
 #include <proto/cli.h>
 #include <haproxy/fd.h>
-#include <proto/hlua.h>
 #include <proto/stream_interface.h>
 #include <proto/task.h>
 
index 3f2dd130838526f0e9d53faca665c682e6ba4ebd..1ec9d83135a078cd3d63139bd2cbf09fb94c515b 100644 (file)
@@ -86,6 +86,7 @@
 #include <haproxy/chunk.h>
 #include <haproxy/dynbuf.h>
 #include <haproxy/errors.h>
+#include <haproxy/hlua.h>
 #include <haproxy/pool.h>
 #include <haproxy/list.h>
 #include <haproxy/namespace.h>
 #include <proto/connection.h>
 #include <haproxy/fd.h>
 #include <proto/filters.h>
-#include <proto/hlua.h>
 #include <proto/http_rules.h>
 #include <proto/listener.h>
 #include <proto/log.h>
index daf2a8f06fd572902f15f370fa5f4eb0676ce931..22d2938259de6f67694fb358be2922c1428fdd19 100644 (file)
 #include <haproxy/regex.h>
 #include <haproxy/xref.h>
 #include <haproxy/h1.h>
+#include <haproxy/hlua.h>
 #include <haproxy/tools.h>
 
 #include <types/cli.h>
-#include <types/hlua.h>
 #include <types/proxy.h>
 #include <types/stats.h>
 
@@ -43,7 +43,6 @@
 #include <proto/cli.h>
 #include <proto/connection.h>
 #include <proto/stats.h>
-#include <proto/hlua.h>
 #include <proto/hlua_fcn.h>
 #include <proto/http_fetch.h>
 #include <proto/http_rules.h>
index b759f11dec01de0146315c2669cabdc03900ce3d..36a54e4d326b07320ae1af29f72ccfc2fe48c444 100644 (file)
@@ -18,6 +18,7 @@
 #include <lua.h>
 #include <lualib.h>
 
+#include <haproxy/hlua-t.h>
 #include <haproxy/http.h>
 #include <haproxy/net_helper.h>
 #include <haproxy/regex.h>
@@ -25,7 +26,6 @@
 #include <common/uri_auth.h>
 
 #include <types/cli.h>
-#include <types/hlua.h>
 #include <types/proxy.h>
 #include <types/stats.h>
 
index c87316be898edb06a0bb4f48c1dc02d48b901861..e2e78802bb1cb123dbc35aeed71bfad2a91171f2 100644 (file)
@@ -18,6 +18,7 @@
 #include <common/cfgparse.h>
 #include <haproxy/dict.h>
 #include <haproxy/dynbuf.h>
+#include <haproxy/hlua.h>
 #include <haproxy/istbuf.h>
 #include <haproxy/thread.h>
 #include <haproxy/htx.h>
@@ -45,7 +46,6 @@
 #include <proto/filters.h>
 #include <haproxy/freq_ctr.h>
 #include <proto/frontend.h>
-#include <proto/hlua.h>
 #include <proto/http_rules.h>
 #include <proto/listener.h>
 #include <proto/log.h>
index 2b947933eabacf03b6318a28f4e2962f76c5e163..ecdbe1f1634fff89017c02038b4a304285a77d63 100644 (file)
 
 #include <haproxy/api.h>
 #include <haproxy/chunk.h>
+#include <haproxy/hlua.h>
 #include <haproxy/namespace.h>
 #include <haproxy/tools.h>
 #include <types/global.h>
 #include <proto/applet.h>
 #include <proto/dns.h>
-#include <proto/hlua.h>
 #include <proto/listener.h>
 #include <haproxy/proto_udp.h>
 #include <proto/ssl_sock.h>