From d2ad57c35266c29ae9cbdaf475786c5744afeaff Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Wed, 3 Jun 2020 19:43:35 +0200 Subject: [PATCH] REORG: include: move ring to haproxy/ring{,-t}.h Some includes were wrong in the type definition but beyond this no change was needed. --- include/{types/ring.h => haproxy/ring-t.h} | 11 ++++++----- include/{proto => haproxy}/ring.h | 12 ++++++------ include/types/log.h | 2 +- src/log.c | 2 +- src/ring.c | 2 +- src/sink.c | 2 +- 6 files changed, 16 insertions(+), 15 deletions(-) rename include/{types/ring.h => haproxy/ring-t.h} (96%) rename include/{proto => haproxy}/ring.h (87%) diff --git a/include/types/ring.h b/include/haproxy/ring-t.h similarity index 96% rename from include/types/ring.h rename to include/haproxy/ring-t.h index b512b07d2..e1f9468dc 100644 --- a/include/types/ring.h +++ b/include/haproxy/ring-t.h @@ -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 @@ -19,12 +19,13 @@ * 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 #include -#include +#include +#include /* 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: diff --git a/include/proto/ring.h b/include/haproxy/ring.h similarity index 87% rename from include/proto/ring.h rename to include/haproxy/ring.h index 6f393fe43..aa3a3c6d5 100644 --- a/include/proto/ring.h +++ b/include/haproxy/ring.h @@ -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 * @@ -19,12 +19,12 @@ * 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 #include -#include +#include 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: diff --git a/include/types/log.h b/include/types/log.h index cfafb919a..28992db13 100644 --- a/include/types/log.h +++ b/include/types/log.h @@ -28,7 +28,7 @@ #include #include #include -#include +#include #define NB_LOG_FACILITIES 24 #define NB_LOG_LEVELS 8 diff --git a/src/log.c b/src/log.c index b036c9990..08a84ced0 100644 --- a/src/log.c +++ b/src/log.c @@ -39,7 +39,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/ring.c b/src/ring.c index ee72bb157..097225158 100644 --- a/src/ring.c +++ b/src/ring.c @@ -24,7 +24,7 @@ #include #include #include -#include +#include #include /* Creates and returns a ring buffer of size bytes. Returns NULL on diff --git a/src/sink.c b/src/sink.c index b5ecdde9a..4801fcbe9 100644 --- a/src/sink.c +++ b/src/sink.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include #include #include