From: Willy Tarreau Date: Wed, 3 Jun 2020 18:02:28 +0000 (+0200) Subject: REORG: include: move sink.h to haproxy/sink{,-t}.h X-Git-Tag: v2.2-dev9~86 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=ba2f73d40eacb4c4f9e709fbcaa5d75733c38618;p=thirdparty%2Fhaproxy.git REORG: include: move sink.h to haproxy/sink{,-t}.h 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. --- diff --git a/include/types/sink.h b/include/haproxy/sink-t.h similarity index 95% rename from include/types/sink.h rename to include/haproxy/sink-t.h index aad6ba7d16..5168fe74da 100644 --- a/include/types/sink.h +++ b/include/haproxy/sink-t.h @@ -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 @@ -19,12 +19,12 @@ * 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 #include -#include +#include +#include /* 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: diff --git a/include/proto/sink.h b/include/haproxy/sink.h similarity index 94% rename from include/proto/sink.h rename to include/haproxy/sink.h index c0c75c30f8..6b2ce613dd 100644 --- a/include/proto/sink.h +++ b/include/haproxy/sink.h @@ -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 @@ -19,11 +19,13 @@ * 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 #include -#include +#include +#include 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: diff --git a/include/proto/trace.h b/include/proto/trace.h index 3a7020512d..def25e09f4 100644 --- a/include/proto/trace.h +++ b/include/proto/trace.h @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include /* Make a string from the location of the trace producer as "file:line" */ diff --git a/include/types/trace.h b/include/types/trace.h index 2114d410f6..537ac32c7c 100644 --- a/include/types/trace.h +++ b/include/types/trace.h @@ -25,7 +25,7 @@ #include #include #include -#include +#include /* 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 diff --git a/src/log.c b/src/log.c index 08a84ced0b..77eb2c6f9d 100644 --- a/src/log.c +++ b/src/log.c @@ -41,7 +41,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/sample.c b/src/sample.c index 149ede8641..2dec9edb96 100644 --- a/src/sample.c +++ b/src/sample.c @@ -35,7 +35,7 @@ #include #include #include -#include +#include #include #include diff --git a/src/sink.c b/src/sink.c index 4801fcbe94..aa346d841b 100644 --- a/src/sink.c +++ b/src/sink.c @@ -27,7 +27,7 @@ #include #include #include -#include +#include #include struct list sink_list = LIST_HEAD_INIT(sink_list); diff --git a/src/trace.c b/src/trace.c index 4111bdbb76..c8cb4c15f8 100644 --- a/src/trace.c +++ b/src/trace.c @@ -25,7 +25,7 @@ #include #include #include -#include +#include #include struct list trace_sources = LIST_HEAD_INIT(trace_sources);