]> git.ipfire.org Git - thirdparty/haproxy.git/commitdiff
REORG: include: move ring to haproxy/ring{,-t}.h
authorWilly Tarreau <w@1wt.eu>
Wed, 3 Jun 2020 17:43:35 +0000 (19:43 +0200)
committerWilly Tarreau <w@1wt.eu>
Thu, 11 Jun 2020 08:18:57 +0000 (10:18 +0200)
Some includes were wrong in the type definition but beyond this no
change was needed.

include/haproxy/ring-t.h [moved from include/types/ring.h with 96% similarity]
include/haproxy/ring.h [moved from include/proto/ring.h with 87% similarity]
include/types/log.h
src/log.c
src/ring.c
src/sink.c

similarity index 96%
rename from include/types/ring.h
rename to include/haproxy/ring-t.h
index b512b07d29157be40c9e5b7ff5397401d0d05d09..e1f9468dc3883277654c09674531322a7cb05e2d 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * include/types/ring.h
+ * include/haproxy/ring-t.h
  * This file provides definitions for ring buffers used for disposable data.
  *
  * Copyright (C) 2000-2019 Willy Tarreau - w@1wt.eu
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _TYPES_RING_H
-#define _TYPES_RING_H
+#ifndef _HAPROXY_RING_T_H
+#define _HAPROXY_RING_T_H
 
 #include <haproxy/api-t.h>
 #include <haproxy/buf-t.h>
-#include <import/ist.h>
+#include <haproxy/list-t.h>
+#include <haproxy/thread.h>
 
 /* The code below handles circular buffers with single-producer and multiple
  * readers (up to 255). The buffer storage area must remain always allocated.
@@ -100,7 +101,7 @@ struct ring {
        int readers_count;
 };
 
-#endif /* _TYPES_RING_H */
+#endif /* _HAPROXY_RING_T_H */
 
 /*
  * Local variables:
similarity index 87%
rename from include/proto/ring.h
rename to include/haproxy/ring.h
index 6f393fe43e84221a53e7560f04a14dd08df0ee59..aa3a3c6d5e55a4b889257f306aa77ad92ef282af 100644 (file)
@@ -1,6 +1,6 @@
 /*
- * include/proto/ring.h
- * This file provides definitions for ring buffers used for disposable data.
+ * include/haproxy/ring.h
+ * Exported functions for ring buffers used for disposable data.
  *
  * Copyright (C) 2000-2019 Willy Tarreau - w@1wt.eu
  *
  * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA
  */
 
-#ifndef _PROTO_RING_H
-#define _PROTO_RING_H
+#ifndef _HAPROXY_RING_H
+#define _HAPROXY_RING_H
 
 #include <stdlib.h>
 #include <import/ist.h>
-#include <types/ring.h>
+#include <haproxy/ring-t.h>
 
 struct ring *ring_new(size_t size);
 struct ring *ring_resize(struct ring *ring, size_t size);
@@ -36,7 +36,7 @@ int ring_attach_cli(struct ring *ring, struct appctx *appctx);
 int cli_io_handler_show_ring(struct appctx *appctx);
 void cli_io_release_show_ring(struct appctx *appctx);
 
-#endif /* _PROTO_RING_H */
+#endif /* _HAPROXY_RING_H */
 
 /*
  * Local variables:
index cfafb919abc2b8f4a537daeda78e865c07269e41..28992db1347f632045db2da0e03840a7295b8b7b 100644 (file)
@@ -28,7 +28,7 @@
 #include <haproxy/api-t.h>
 #include <haproxy/thread.h>
 #include <haproxy/list-t.h>
-#include <types/ring.h>
+#include <haproxy/ring-t.h>
 
 #define NB_LOG_FACILITIES       24
 #define NB_LOG_LEVELS           8
index b036c9990966494b4c4b71da58c43cb9f95fa902..08a84ced0bafaf0be6b36fbe62854273354ac754 100644 (file)
--- a/src/log.c
+++ b/src/log.c
@@ -39,7 +39,7 @@
 #include <haproxy/fd.h>
 #include <proto/frontend.h>
 #include <proto/log.h>
-#include <proto/ring.h>
+#include <haproxy/ring.h>
 #include <proto/sample.h>
 #include <proto/sink.h>
 #include <proto/ssl_sock.h>
index ee72bb15752604e586280638500e5ab7efe85fc5..097225158de77799d5aed7af1a79d505374e048b 100644 (file)
@@ -24,7 +24,7 @@
 #include <haproxy/thread.h>
 #include <types/applet.h>
 #include <proto/cli.h>
-#include <proto/ring.h>
+#include <haproxy/ring.h>
 #include <proto/stream_interface.h>
 
 /* Creates and returns a ring buffer of size <size> bytes. Returns NULL on
index b5ecdde9a338e8f9bfa7fd8165a5787110783997..4801fcbe94ac051e29ab1a8008f5dcdd6f4dc4b8 100644 (file)
@@ -25,7 +25,7 @@
 #include <haproxy/time.h>
 #include <proto/cli.h>
 #include <proto/log.h>
-#include <proto/ring.h>
+#include <haproxy/ring.h>
 #include <proto/signal.h>
 #include <proto/sink.h>
 #include <proto/stream_interface.h>