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:36:02 +0000 (12:36 -0400)
Signed-off-by: Mathieu Desnoyers <mathieu.desnoyers@efficios.com>
lttng-events.c

index ffb605106ab6f775f467a7409f507947a1cdbc95..f9a19190ffc03be47ab8f8196a49f180c1b8dbc0 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
@@ -1636,7 +1637,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;" : "",
@@ -1665,7 +1666,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;" : "",
@@ -1691,7 +1692,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;" : "",
@@ -1711,7 +1712,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;" : "",
@@ -2041,7 +2042,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.027988 seconds and 4 git commands to generate.