Make API CTF-agnostic
[babeltrace.git] / include / babeltrace / ctf-writer / serialize-internal.h
index 5728841e2405e43d28355b43fd1c9fc306d94cf4..85e2fec348bd96dbdccf139b0279fd42c89d503b 100644 (file)
 #include <sys/stat.h>
 #include <fcntl.h>
 #include <babeltrace/align-internal.h>
+#include <babeltrace/endian-internal.h>
 #include <babeltrace/common-internal.h>
 #include <babeltrace/mmap-align-internal.h>
 #include <babeltrace/types.h>
-#include <babeltrace/ctf-writer/fields.h>
 #include <babeltrace/ctf-writer/field-types.h>
-#include <babeltrace/ctf-ir/fields-internal.h>
+#include <babeltrace/ctf-writer/fields-internal.h>
+#include <babeltrace/ctf-writer/fields.h>
 #include <babeltrace/assert-internal.h>
 
 #define PACKET_LEN_INCREMENT   (bt_common_get_page_size() * 8 * CHAR_BIT)
 
+#if (BYTE_ORDER == BIG_ENDIAN)
+# define BT_CTF_MY_BYTE_ORDER  BT_CTF_BYTE_ORDER_BIG_ENDIAN
+#else
+# define BT_CTF_MY_BYTE_ORDER  BT_CTF_BYTE_ORDER_LITTLE_ENDIAN
+#endif
+
 struct bt_ctf_stream_pos {
        int fd;
        int prot;               /* mmap protection */
@@ -58,12 +65,12 @@ struct bt_ctf_stream_pos {
 };
 
 BT_HIDDEN
-int bt_ctf_field_integer_write(struct bt_field_common *field,
+int bt_ctf_field_integer_write(struct bt_ctf_field_common *field,
                struct bt_ctf_stream_pos *pos,
                enum bt_ctf_byte_order native_byte_order);
 
 BT_HIDDEN
-int bt_ctf_field_floating_point_write(struct bt_field_common *field,
+int bt_ctf_field_floating_point_write(struct bt_ctf_field_common *field,
                struct bt_ctf_stream_pos *pos,
                enum bt_ctf_byte_order native_byte_order);
 
This page took 0.024965 seconds and 4 git commands to generate.