]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move sink.h to haproxy/sink{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Wed, 3 Jun 2020 18:02:28 +0000 (20:02 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:57 +0000 (10:18 +0200)
The sink files could be moved with almost no change at since they
didn't rely on anything fancy. ssize_t required sys/types.h and
thread.h was needed for the locks.

include/haproxy/sink-t.h [moved from include/types/sink.h with 95% similarity]
include/haproxy/sink.h [moved from include/proto/sink.h with 94% similarity]
include/proto/trace.h
include/types/trace.h
src/log.c
src/sample.c
src/sink.c
src/trace.c

similarity index 95%
rename from include/types/sink.h
rename to include/haproxy/sink-t.h
index aad6ba7d1690cf95e4fc1c6c5f413c62f10a5b66..5168fe74da2ed0e7722c6fad16e3b0fc36e36ee4 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/types/sink.h
+ * include/haproxy/sink-t.h
  * This file provides definitions for event sinks
  *
  * Copyright (C) 2000-2019 Willy Tarreau - w@1wt.eu
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TYPES_SINK_H
-#define _TYPES_SINK_H
+#ifndef _HAPROXY_SINK_T_H
+#define _HAPROXY_SINK_T_H
 
-#include <haproxy/api-t.h>
 #include <import/ist.h>
-#include <haproxy/api.h>
+#include <haproxy/list-t.h>
+#include <haproxy/api-t.h>
 
 /* A sink may be of 4 distinct types :
  *   - file descriptor (such as stdout)
@@ -76,7 +76,7 @@ struct sink {
        } ctx;
 };
 
-#endif /* _TYPES_SINK_H */
+#endif /* _HAPROXY_SINK_T_H */
 
 /*
  * Local variables:
similarity index 94%
rename from include/proto/sink.h
rename to include/haproxy/sink.h
index c0c75c30f89c3997934d94485954fe6f0f7d6ae8..6b2ce613dda7da26ab73bf52f98c61c5376f8059 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/proto/sink.h
+ * include/haproxy/sink.h
  * This file provides declarations for event sinks management
  *
  * Copyright (C) 2000-2019 Willy Tarreau - w@1wt.eu
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _PROTO_SINK_H
-#define _PROTO_SINK_H
+#ifndef _HAPROXY_SINK_H
+#define _HAPROXY_SINK_H
 
+#include <sys/types.h>
 #include <haproxy/list-t.h>
-#include <types/sink.h>
+#include <haproxy/sink-t.h>
+#include <haproxy/thread.h>
 
 extern struct list sink_list;
 
@@ -78,7 +80,7 @@ static inline ssize_t sink_write(struct sink *sink, const struct ist msg[], size
        return sent;
 }
 
-#endif /* _PROTO_SINK_H */
+#endif /* _HAPROXY_SINK_H */
 
 /*
  * Local variables:
index 3a7020512d1e738a3f01a0f0914481ad75544f14..def25e09f400f1fdfe0b03e24f6c32e2935082f0 100644 (file)
@@ -27,7 +27,7 @@
 #include <import/ist.h>
 #include <haproxy/list.h>
 #include <types/log.h>
-#include <types/sink.h>
+#include <haproxy/sink-t.h>
 #include <types/trace.h>
 
 /* Make a string from the location of the trace producer as "file:line" */
index 2114d410f6c60a18d99613108e53b312f57fac55..537ac32c7c948a061ca2878c2357515b88a13293 100644 (file)
@@ -25,7 +25,7 @@
 #include <haproxy/api-t.h>
 #include <import/ist.h>
 #include <haproxy/list-t.h>
-#include <types/sink.h>
+#include <haproxy/sink-t.h>
 
 /* the macros below define an optional type for each of the 4 args passed to
  * the trace() call. When such a type is set, the caller commits to exclusively
index 08a84ced0bafaf0be6b36fbe62854273354ac754..77eb2c6f9d0aedd16bde3e9218c1e30d46aa3174 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -41,7 +41,7 @@
 #include <proto/log.h>
 #include <haproxy/ring.h>
 #include <proto/sample.h>
-#include <proto/sink.h>
+#include <haproxy/sink.h>
 #include <proto/ssl_sock.h>
 #include <proto/stream.h>
 #include <proto/stream_interface.h>
index 149ede86419eb6ef39bb820daa77038984981e55..2dec9edb9661bd83da9d295aab88ac15ce46c379 100644 (file)
@@ -35,7 +35,7 @@
 #include <proto/proxy.h>
 #include <proto/protocol_buffers.h>
 #include <proto/sample.h>
-#include <proto/sink.h>
+#include <haproxy/sink.h>
 #include <proto/stick_table.h>
 #include <proto/vars.h>
 
index 4801fcbe94ac051e29ab1a8008f5dcdd6f4dc4b8..aa346d841ba91cecb98c5fd5d5bc8103b1123573 100644 (file)
@@ -27,7 +27,7 @@
 #include <proto/log.h>
 #include <haproxy/ring.h>
 #include <proto/signal.h>
-#include <proto/sink.h>
+#include <haproxy/sink.h>
 #include <proto/stream_interface.h>
 
 struct list sink_list = LIST_HEAD_INIT(sink_list);
index 4111bdbb7656246d5742b0ad1bbd1f5e7f9697ca..c8cb4c15f8ff2249d5c2e9d4a8ae943b7398c9e3 100644 (file)
@@ -25,7 +25,7 @@
 #include <haproxy/list.h>
 #include <proto/cli.h>
 #include <proto/log.h>
-#include <proto/sink.h>
+#include <haproxy/sink.h>
 #include <proto/trace.h>
 
 struct list trace_sources = LIST_HEAD_INIT(trace_sources);