MINOR: includes: fix a lot of missing or useless includes
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.
diff --git a/include/proto/channel.h b/include/proto/channel.h
index 42bba15..da47c16 100644
--- a/include/proto/channel.h
+++ b/include/proto/channel.h
@@ -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;
diff --git a/include/types/acl.h b/include/types/acl.h
index 80b2c39..173204d 100644
--- a/include/types/acl.h
+++ b/include/types/acl.h
@@ -31,7 +31,6 @@
#include <types/pattern.h>
#include <types/proxy.h>
#include <types/server.h>
-#include <types/session.h>
#include <ebmbtree.h>
diff --git a/include/types/proxy.h b/include/types/proxy.h
index 9689460..30409f9 100644
--- a/include/types/proxy.h
+++ b/include/types/proxy.h
@@ -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 @@
#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 */
diff --git a/include/types/queue.h b/include/types/queue.h
index 922aa92..9ff8df5 100644
--- a/include/types/queue.h
+++ b/include/types/queue.h
@@ -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 ... */