Make API CTF-agnostic
[babeltrace.git] / lib / ctf-writer / writer.c
index 0b360c378a34bac90c9e0071a09ad33468e4170f..c9909d9dfc42eb8b34424decc17cfc0983b5bbb6 100644 (file)
@@ -29,6 +29,9 @@
 #define BT_LOG_TAG "CTF-WRITER"
 #include <babeltrace/lib-logging-internal.h>
 
+#include <babeltrace/assert-internal.h>
+#include <babeltrace/compat/uuid-internal.h>
+#include <babeltrace/compiler-internal.h>
 #include <babeltrace/ctf-writer/clock-internal.h>
 #include <babeltrace/ctf-writer/field-types-internal.h>
 #include <babeltrace/ctf-writer/fields-internal.h>
 #include <babeltrace/ctf-writer/stream-internal.h>
 #include <babeltrace/ctf-writer/trace-internal.h>
 #include <babeltrace/ctf-writer/writer-internal.h>
-#include <babeltrace/ref.h>
 #include <babeltrace/endian-internal.h>
-#include <babeltrace/compiler-internal.h>
-#include <babeltrace/compat/uuid-internal.h>
-#include <babeltrace/assert-internal.h>
+#include <babeltrace/ref.h>
+#include <errno.h>
+#include <fcntl.h>
+#include <inttypes.h>
 #include <stdio.h>
 #include <stdlib.h>
 #include <sys/stat.h>
-#include <errno.h>
 #include <unistd.h>
-#include <fcntl.h>
-#include <inttypes.h>
 
 static
 void bt_ctf_writer_destroy(struct bt_object *obj);
@@ -373,7 +373,7 @@ int bt_ctf_writer_set_byte_order(struct bt_ctf_writer *writer,
        }
 
        if (byte_order == BT_CTF_BYTE_ORDER_NATIVE) {
-               byte_order = (int) BT_MY_BYTE_ORDER;
+               byte_order = BT_CTF_MY_BYTE_ORDER;
        }
 
        ret = bt_ctf_trace_set_native_byte_order(writer->trace,
@@ -429,18 +429,18 @@ end:
 }
 
 BT_HIDDEN
-const char *get_byte_order_string(enum bt_byte_order byte_order)
+const char *bt_ctf_get_byte_order_string(enum bt_ctf_byte_order byte_order)
 {
        const char *string;
 
        switch (byte_order) {
-       case BT_BYTE_ORDER_LITTLE_ENDIAN:
+       case BT_CTF_BYTE_ORDER_LITTLE_ENDIAN:
                string = "le";
                break;
-       case BT_BYTE_ORDER_BIG_ENDIAN:
+       case BT_CTF_BYTE_ORDER_BIG_ENDIAN:
                string = "be";
                break;
-       case BT_BYTE_ORDER_NATIVE:
+       case BT_CTF_BYTE_ORDER_NATIVE:
                string = "native";
                break;
        default:
This page took 0.026077 seconds and 4 git commands to generate.