From c6d61d762f6c76d1e0966cdc089e55da8c1735fd Mon Sep 17 00:00:00 2001 From: Willy Tarreau Date: Thu, 4 Jun 2020 19:02:42 +0200 Subject: [PATCH] REORG: include: move trace.h to haproxy/trace{,-t}.h Only thread-t was added to satisfy THREAD_LOCAL but the rest was OK. --- include/{types/trace.h => haproxy/trace-t.h} | 10 +++++----- include/{proto => haproxy}/trace.h | 17 +++++++++-------- include/proto/stream.h | 2 +- src/mux_fcgi.c | 2 +- src/mux_h1.c | 2 +- src/mux_h2.c | 2 +- src/trace.c | 2 +- 7 files changed, 19 insertions(+), 18 deletions(-) rename include/{types/trace.h => haproxy/trace-t.h} (98%) rename include/{proto => haproxy}/trace.h (97%) diff --git a/include/types/trace.h b/include/haproxy/trace-t.h similarity index 98% rename from include/types/trace.h rename to include/haproxy/trace-t.h index 537ac32c7..b8295bd52 100644 --- a/include/types/trace.h +++ b/include/haproxy/trace-t.h @@ -1,5 +1,5 @@ /* - * include/types/trace.h + * include/haproxy/trace-t.h * This file provides definitions for runtime tracing * * Copyright (C) 2000-2019 Willy Tarreau - w@1wt.eu @@ -19,13 +19,13 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _TYPES_TRACE_H -#define _TYPES_TRACE_H +#ifndef _HAPROXY_TRACE_T_H +#define _HAPROXY_TRACE_T_H -#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 @@ -148,7 +148,7 @@ struct trace_source { const void *lockon_ptr; // what to lockon when lockon is set }; -#endif /* _TYPES_TRACE_H */ +#endif /* _HAPROXY_TRACE_T_H */ /* * Local variables: diff --git a/include/proto/trace.h b/include/haproxy/trace.h similarity index 97% rename from include/proto/trace.h rename to include/haproxy/trace.h index def25e09f..0367aa73e 100644 --- a/include/proto/trace.h +++ b/include/haproxy/trace.h @@ -1,5 +1,5 @@ /* - * include/proto/trace.h + * include/haproxy/trace.h * This file provides functions for runtime tracing * * Copyright (C) 2000-2019 Willy Tarreau - w@1wt.eu @@ -19,16 +19,17 @@ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#ifndef _PROTO_TRACE_H -#define _PROTO_TRACE_H +#ifndef _HAPROXY_TRACE_H +#define _HAPROXY_TRACE_H -#include -#include #include +#include #include -#include #include -#include +#include +#include +#include +#include /* Make a string from the location of the trace producer as "file:line" */ #define TRC_LOC _TRC_LOC(__FILE__, __LINE__) @@ -151,7 +152,7 @@ static inline void trace(enum trace_level level, uint64_t mask, struct trace_sou __trace(level, mask, src, where, func, a1, a2, a3, a4, cb, msg); } -#endif /* _PROTO_TRACE_H */ +#endif /* _HAPROXY_TRACE_H */ /* * Local variables: diff --git a/include/proto/stream.h b/include/proto/stream.h index 80a616b6e..59a95f955 100644 --- a/include/proto/stream.h +++ b/include/proto/stream.h @@ -32,7 +32,7 @@ #include #include #include -#include +#include extern struct trace_source trace_strm; diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c index ed97d6b35..6346c8e70 100644 --- a/src/mux_fcgi.c +++ b/src/mux_fcgi.c @@ -31,7 +31,7 @@ #include #include #include -#include +#include /* FCGI Connection flags (32 bits) */ #define FCGI_CF_NONE 0x00000000 diff --git a/src/mux_h1.c b/src/mux_h1.c index a5c500933..678853062 100644 --- a/src/mux_h1.c +++ b/src/mux_h1.c @@ -28,7 +28,7 @@ #include #include #include -#include +#include /* * H1 Connection flags (32 bits) diff --git a/src/mux_h2.c b/src/mux_h2.c index ac4098132..3497201bc 100644 --- a/src/mux_h2.c +++ b/src/mux_h2.c @@ -23,7 +23,7 @@ #include #include #include -#include +#include #include #include #include diff --git a/src/trace.c b/src/trace.c index c8cb4c15f..2c7bbb67c 100644 --- a/src/trace.c +++ b/src/trace.c @@ -26,7 +26,7 @@ #include #include #include -#include +#include struct list trace_sources = LIST_HEAD_INIT(trace_sources); THREAD_LOCAL struct buffer trace_buf = { };