]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
CLEANUP: stream: remove many unneeded includes from stream-t.h
authorWilly Tarreau <w@1wt.eu>
Wed, 6 Oct 2021 14:39:28 +0000 (16:39 +0200)
committerWilly Tarreau <w@1wt.eu>
Wed, 6 Oct 2021 23:41:14 +0000 (01:41 +0200)
Plenty of includes were present there only for struct pointers resulting
in them being used from many other places. The LoC reduced again by more
than 1% by cleaning this.

include/haproxy/stream-t.h
include/haproxy/stream.h

index e5482a2e86216b517b9f26ac2acb35a3b72f4d3e..3a6b9b4b88e924e262146f7a1624aadf80e2b67a 100644 (file)
 #ifndef _HAPROXY_STREAM_T_H
 #define _HAPROXY_STREAM_T_H
 
-#include <sys/time.h>
-#include <netinet/in.h>
-#include <arpa/inet.h>
-
 #include <haproxy/api-t.h>
 #include <haproxy/channel-t.h>
 #include <haproxy/dynbuf-t.h>
 #include <haproxy/filters-t.h>
-#include <haproxy/hlua-t.h>
-#include <haproxy/http_ana-t.h>
 #include <haproxy/obj_type-t.h>
-#include <haproxy/proxy-t.h>
-#include <haproxy/queue-t.h>
-#include <haproxy/server-t.h>
-#include <haproxy/session-t.h>
 #include <haproxy/stick_table-t.h>
 #include <haproxy/stream_interface-t.h>
-#include <haproxy/task-t.h>
 #include <haproxy/vars-t.h>
 
 
 #define PCLI_F_PROMPT          0x4
 #define PCLI_F_PAYLOAD         0x8
 
+struct hlua;
+struct proxy;
+struct pendconn;
+struct session;
+struct server;
+struct task;
+struct sockaddr_storage;
+
 /* some external definitions */
 struct strm_logs {
        int logwait;                    /* log fields waiting to be collected : LW_* */
index e89383da0c524a3fbf625e6866043bf6e7184469..00f8175e19011620eea7be14f2681301f3244185 100644 (file)
@@ -29,6 +29,7 @@
 #include <haproxy/obj_type.h>
 #include <haproxy/pool-t.h>
 #include <haproxy/queue.h>
+#include <haproxy/session.h>
 #include <haproxy/stick_table.h>
 #include <haproxy/stream-t.h>
 #include <haproxy/task-t.h>