[lttng-dev] [Babeltrace PATCH 04/23] Add MinGW definitions to endian.h
Ikaheimonen, JP
jp_ikaheimonen at mentor.com
Wed May 22 04:05:44 EDT 2013
---
include/babeltrace/endian.h | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/include/babeltrace/endian.h b/include/babeltrace/endian.h
index 9eee0c1..f15a44f 100644
--- a/include/babeltrace/endian.h
+++ b/include/babeltrace/endian.h
@@ -29,6 +29,22 @@
#ifdef __FreeBSD__
#include <machine/endian.h>
+#elif defined(__MINGW32__)
+#ifndef __BIG_ENDIAN
+#define __BIG_ENDIAN 4321
+#endif
+#ifndef __LITTLE_ENDIAN
+#define __LITTLE_ENDIAN 1234
+#endif
+
+#ifndef __BYTE_ORDER
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#endif
+
+#define LITTLE_ENDIAN __LITTLE_ENDIAN
+#define BIG_ENDIAN __BIG_ENDIAN
+#define PDP_ENDIAN __PDP_ENDIAN
+#define BYTE_ORDER __BYTE_ORDER
#else
#include <endian.h>
#endif
--
1.8.1.msysgit.1
More information about the lttng-dev
mailing list