]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
MINOR: includes: fix a lot of missing or useless includes
authorThierry FOURNIER <tfournier@haproxy.com>
Tue, 16 Dec 2014 14:41:18 +0000 (15:41 +0100)
committerWilly Tarreau <w@1wt.eu>
Sat, 28 Feb 2015 22:12:32 +0000 (23:12 +0100)
These modifications are done for resolving cross-dependent
includes in the upcoming LUA code.

<proto/channel.h> misses <types/channel.h>.

<types/acl.h> doesn't use <types/session.h> because the session
is already declared in the file as undefined pointer.

appsession.c misses <unistd.h> to use "write()".

Declare undefined pointer "struct session" for <types/proxy.h>
and <types/queue.h>. These includes dont need the detail of this
struct.

include/proto/channel.h
include/types/acl.h
include/types/proxy.h
include/types/queue.h
src/appsession.c

index 42bba15b0a474d55b4f0a647ebb9133f2e6bfebe..da47c166bcbb75670a590045cbdadbaa60a7cb32 100644 (file)
@@ -32,6 +32,7 @@
 #include <common/ticks.h>
 #include <common/time.h>
 
+#include <types/channel.h>
 #include <types/global.h>
 
 extern struct pool_head *pool2_channel;
index 80b2c39a6978c6912a4f82162d6336a07b6b4bd8..173204d5c473d9c51062d9f2046d4bdbe0c350f1 100644 (file)
@@ -31,7 +31,6 @@
 #include <types/pattern.h>
 #include <types/proxy.h>
 #include <types/server.h>
-#include <types/session.h>
 
 #include <ebmbtree.h>
 
index 968946070b79220b0902ba662cef4f8e3a47af48..30409f9f037042233a64ad5f371adba77cffc99a 100644 (file)
@@ -46,7 +46,6 @@
 #include <types/obj_type.h>
 #include <types/proto_http.h>
 #include <types/sample.h>
-#include <types/session.h>
 #include <types/server.h>
 #include <types/stick_table.h>
 
@@ -186,6 +185,8 @@ enum pr_mode {
 #define STK_IS_STORE   0x00000002      /* store on request fetch */
 #define STK_ON_RSP     0x00000004      /* store on response fetch */
 
+struct session;
+
 struct error_snapshot {
        struct timeval when;            /* date of this event, (tv_sec == 0) means "never" */
        unsigned int len;               /* original length of the last invalid request/response */
index 922aa92fd05117a801ed808f962826aea883cb59..9ff8df5f94ee2ef1dd488f20af324bb402fbe705 100644 (file)
@@ -26,7 +26,8 @@
 #include <common/mini-clist.h>
 
 #include <types/server.h>
-#include <types/session.h>
+
+struct session;
 
 struct pendconn {
        struct list list;               /* chaining ... */
index c22be45ce69f2e1c3afb5e0012901337930f5eba..7b722961690ea9ab33e66e5a99b13668e2252672 100644 (file)
@@ -13,6 +13,7 @@
 
 #include <stdio.h>
 #include <string.h>
+#include <unistd.h>
 
 #include <common/appsession.h>
 #include <common/config.h>