REORG: include: move trace.h to haproxy/trace{,-t}.h
Only thread-t was added to satisfy THREAD_LOCAL but the rest was OK.
diff --git a/include/types/trace.h b/include/haproxy/trace-t.h
similarity index 97%
rename from include/types/trace.h
rename to include/haproxy/trace-t.h
index 537ac32..b8295bd 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 <haproxy/api-t.h>
#include <import/ist.h>
#include <haproxy/list-t.h>
#include <haproxy/sink-t.h>
+#include <haproxy/api-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
@@ -148,7 +148,7 @@
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 def25e0..0367aa7 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 <haproxy/api.h>
-#include <haproxy/tools.h>
#include <import/ist.h>
+#include <haproxy/api.h>
#include <haproxy/list.h>
-#include <types/log.h>
#include <haproxy/sink-t.h>
-#include <types/trace.h>
+#include <haproxy/thread-t.h>
+#include <haproxy/tools.h>
+#include <haproxy/trace-t.h>
+#include <types/log.h>
/* Make a string from the location of the trace producer as "file:line" */
#define TRC_LOC _TRC_LOC(__FILE__, __LINE__)
@@ -151,7 +152,7 @@
__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 80a616b..59a95f9 100644
--- a/include/proto/stream.h
+++ b/include/proto/stream.h
@@ -32,7 +32,7 @@
#include <proto/queue.h>
#include <haproxy/stick_table.h>
#include <haproxy/task.h>
-#include <proto/trace.h>
+#include <haproxy/trace.h>
extern struct trace_source trace_strm;
diff --git a/src/mux_fcgi.c b/src/mux_fcgi.c
index ed97d6b..6346c8e 100644
--- a/src/mux_fcgi.c
+++ b/src/mux_fcgi.c
@@ -31,7 +31,7 @@
#include <proto/ssl_sock.h>
#include <proto/stream.h>
#include <proto/stream_interface.h>
-#include <proto/trace.h>
+#include <haproxy/trace.h>
/* FCGI Connection flags (32 bits) */
#define FCGI_CF_NONE 0x00000000
diff --git a/src/mux_h1.c b/src/mux_h1.c
index a5c5009..6788530 100644
--- a/src/mux_h1.c
+++ b/src/mux_h1.c
@@ -28,7 +28,7 @@
#include <haproxy/session-t.h>
#include <proto/stream.h>
#include <proto/stream_interface.h>
-#include <proto/trace.h>
+#include <haproxy/trace.h>
/*
* H1 Connection flags (32 bits)
diff --git a/src/mux_h2.c b/src/mux_h2.c
index ac40981..3497201 100644
--- a/src/mux_h2.c
+++ b/src/mux_h2.c
@@ -23,7 +23,7 @@
#include <haproxy/htx.h>
#include <haproxy/net_helper.h>
#include <haproxy/session-t.h>
-#include <proto/trace.h>
+#include <haproxy/trace.h>
#include <proto/stream.h>
#include <proto/stream_interface.h>
#include <import/eb32tree.h>
diff --git a/src/trace.c b/src/trace.c
index c8cb4c1..2c7bbb6 100644
--- a/src/trace.c
+++ b/src/trace.c
@@ -26,7 +26,7 @@
#include <proto/cli.h>
#include <proto/log.h>
#include <haproxy/sink.h>
-#include <proto/trace.h>
+#include <haproxy/trace.h>
struct list trace_sources = LIST_HEAD_INIT(trace_sources);
THREAD_LOCAL struct buffer trace_buf = { };