#include <stdio.h>
#include <glib.h>
#include <stdint.h>
+#include <stdlib.h>
+#include <errno.h>
+#include <stdbool.h>
#include <babeltrace/compat/string.h>
#define PERROR_BUFLEN 200
-extern int babeltrace_verbose, babeltrace_debug;
+extern bool babeltrace_verbose, babeltrace_debug;
#define printf_verbose(fmt, args...) \
do { \
#define max(a, b) (((a) > (b)) ? (a) : (b))
#endif
+#ifndef max_t
+#define max_t(type, a, b) \
+ ((type) (a) > (type) (b) ? (type) (a) : (type) (b))
+#endif
+
+/*
+ * Memory allocation zeroed
+ */
+#define zmalloc(x) calloc(1, x)
+
/*
* BT_HIDDEN: set the hidden attribute for internal functions
*/
#define BT_CTF_MAJOR 1
#define BT_CTF_MINOR 8
+#define __STRINGIFY(x) #x
+#define TOSTRING(x) __STRINGIFY(x)
+
struct bt_trace_descriptor;
struct trace_collection {
GPtrArray *array; /* struct bt_trace_descriptor */