#define _GNU_SOURCE
#include <stdio.h>
+#include <endian.h>
#include <urcu/list.h>
#include <urcu/hlist.h>
#include <pthread.h>
? "UTF8"
: "ASCII",
field->type.u.basic.integer.base,
-#ifdef __BIG_ENDIAN
+#if (BYTE_ORDER == BIG_ENDIAN)
field->type.u.basic.integer.reverse_byte_order ? " byte_order = le;" : "",
#else
field->type.u.basic.integer.reverse_byte_order ? " byte_order = be;" : "",
break;
case atype_float:
ret = lttng_metadata_printf(session,
- " floating_point { exp_dig = %u; mant_dig = %u; align = %u; } _%s;\n",
+ " floating_point { exp_dig = %u; mant_dig = %u; align = %u;%s } _%s;\n",
field->type.u.basic._float.exp_dig,
field->type.u.basic._float.mant_dig,
field->type.u.basic._float.alignment,
-#ifdef __BIG_ENDIAN
+#if (BYTE_ORDER == BIG_ENDIAN)
field->type.u.basic.integer.reverse_byte_order ? " byte_order = le;" : "",
#else
field->type.u.basic.integer.reverse_byte_order ? " byte_order = be;" : "",
? "UTF8"
: "ASCII",
elem_type->u.basic.integer.base,
-#ifdef __BIG_ENDIAN
+#if (BYTE_ORDER == BIG_ENDIAN)
elem_type->u.basic.integer.reverse_byte_order ? " byte_order = le;" : "",
#else
elem_type->u.basic.integer.reverse_byte_order ? " byte_order = be;" : "",
? "UTF8"
: "ASCII"),
length_type->u.basic.integer.base,
-#ifdef __BIG_ENDIAN
+#if (BYTE_ORDER == BIG_ENDIAN)
length_type->u.basic.integer.reverse_byte_order ? " byte_order = le;" : "",
#else
length_type->u.basic.integer.reverse_byte_order ? " byte_order = be;" : "",
? "UTF8"
: "ASCII"),
elem_type->u.basic.integer.base,
-#ifdef __BIG_ENDIAN
+#if (BYTE_ORDER == BIG_ENDIAN)
elem_type->u.basic.integer.reverse_byte_order ? " byte_order = le;" : "",
#else
elem_type->u.basic.integer.reverse_byte_order ? " byte_order = be;" : "",
CTF_VERSION_MAJOR,
CTF_VERSION_MINOR,
uuid_s,
-#ifdef __BIG_ENDIAN
+#if (BYTE_ORDER == BIG_ENDIAN)
"be"
#else
"le"
uint8_t compression_scheme; /* 0 if unused */
uint8_t encryption_scheme; /* 0 if unused */
uint8_t checksum_scheme; /* 0 if unused */
+ uint8_t major; /* CTF spec major version number */
+ uint8_t minor; /* CTF spec minor version number */
uint8_t header_end[0];
};
header->compression_scheme = 0; /* 0 if unused */
header->encryption_scheme = 0; /* 0 if unused */
header->checksum_scheme = 0; /* 0 if unused */
+ header->major = CTF_SPEC_MAJOR;
+ header->minor = CTF_SPEC_MINOR;
+
}
/*
/* Tracer properties */
#define CTF_MAGIC_NUMBER 0xC1FC1FC1
#define TSDL_MAGIC_NUMBER 0x75D11D57
+
+/* CTF specification version followed */
+#define CTF_SPEC_MAJOR 1
+#define CTF_SPEC_MINOR 8
+
+/* Tracer major/minor versions */
#define CTF_VERSION_MAJOR 0
#define CTF_VERSION_MINOR 1