REORG: include: split buf.h into haproxy/buf-t.h and haproxy/buf.h
File buf.h is one common cause of pain in the dependencies. Many files in
the code need it to get the struct buffer definition, and a few also need
the inlined functions to manipulate a buffer, but the file used to depend
on a long chain only for BUG_ON() (addressed by last commit).
Now buf.h is split into buf-t.h which only contains the type definitions,
and buf.h for all inlined functions. Callers who don't care can continue
to use buf.h but files in types/ must only use buf-t.h. sys/types.h had
to be added to buf.h to get ssize_t as used by b_move(). It's worth noting
that ssize_t is only supposed to be a size_t supporting -1, so b_move()
ought to be rethought regarding this.
The files were moved to haproxy/ and all their users were updated
accordingly. A dependency issue was addressed on fcgi whose C file didn't
include buf.h.
diff --git a/include/types/checks.h b/include/types/checks.h
index 4b81770..6d07c9a 100644
--- a/include/types/checks.h
+++ b/include/types/checks.h
@@ -20,7 +20,7 @@
#include <import/ist.h>
#include <common/mini-clist.h>
#include <common/regex.h>
-#include <common/buf.h>
+#include <haproxy/buf-t.h>
#include <types/connection.h>
#include <types/obj_type.h>
diff --git a/include/types/http_htx.h b/include/types/http_htx.h
index 02b6b3b..4123e7e 100644
--- a/include/types/http_htx.h
+++ b/include/types/http_htx.h
@@ -25,7 +25,7 @@
#include <import/ebistree.h>
-#include <common/buf.h>
+#include <haproxy/buf-t.h>
#include <common/http.h>
#include <common/htx.h>
#include <import/ist.h>
diff --git a/include/types/ring.h b/include/types/ring.h
index f3b3987..f508444 100644
--- a/include/types/ring.h
+++ b/include/types/ring.h
@@ -23,7 +23,7 @@
#define _TYPES_RING_H
#include <haproxy/api-t.h>
-#include <common/buf.h>
+#include <haproxy/buf-t.h>
#include <import/ist.h>
/* The code below handles circular buffers with single-producer and multiple
diff --git a/include/types/sample.h b/include/types/sample.h
index 2292b36..bb6b092 100644
--- a/include/types/sample.h
+++ b/include/types/sample.h
@@ -26,7 +26,7 @@
#include <sys/socket.h>
#include <netinet/in.h>
-#include <common/buf.h>
+#include <haproxy/buf-t.h>
#include <common/http.h>
#include <common/mini-clist.h>