Fix: integer endianness metadata generation
authorMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 2 May 2016 16:32:48 +0000 (12:32 -0400)
committerMathieu Desnoyers <mathieu.desnoyers@efficios.com>
Mon, 2 May 2016 16:37:02 +0000 (12:37 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-events.c

index 1f2863945a74f977fcc38b2635020064b80f84aa..9c8cde8f976adbf38fbccfb360675dc8a73bca59 100644 (file)
@@ -50,6 +50,7 @@
 #include <lttng-events.h>
 #include <lttng-tracer.h>
 #include <lttng-abi-old.h>
+#include <lttng-endian.h>
 #include <wrapper/vzalloc.h>
 
 #define METADATA_CACHE_DEFAULT_SIZE 4096
@@ -1682,7 +1683,7 @@ int _lttng_field_statedump(struct lttng_session *session,
                                        ? "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;" : "",
@@ -1719,7 +1720,7 @@ int _lttng_field_statedump(struct lttng_session *session,
                                        ? "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;" : "",
@@ -1745,7 +1746,7 @@ int _lttng_field_statedump(struct lttng_session *session,
                                        ? "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;" : "",
@@ -1773,7 +1774,7 @@ int _lttng_field_statedump(struct lttng_session *session,
                                        ? "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;" : "",
@@ -2111,7 +2112,7 @@ int _lttng_session_metadata_statedump(struct lttng_session *session)
                CTF_SPEC_MAJOR,
                CTF_SPEC_MINOR,
                uuid_s,
-#ifdef __BIG_ENDIAN
+#if __BYTE_ORDER == __BIG_ENDIAN
                "be"
 #else
                "le"
This page took 0.027758 seconds and 4 git commands to generate.