summaryrefslogtreecommitdiff
path: root/include/platform.h
diff options
context:
space:
mode:
Diffstat (limited to 'include/platform.h')
-rw-r--r--include/platform.h15
1 files changed, 15 insertions, 0 deletions
diff --git a/include/platform.h b/include/platform.h
index 68c7abb..b19621a 100644
--- a/include/platform.h
+++ b/include/platform.h
@@ -78,4 +78,19 @@
# endif
#endif
+/* ---- Endian Detection ------------------------------------ */
+#ifndef __APPLE__
+ #include <byteswap.h>
+ #include <endian.h>
+#endif
+
+#ifdef __BIG_ENDIAN__
+ #define BB_BIG_ENDIAN 1
+#elif __BYTE_ORDER == __BIG_ENDIAN
+ #define BB_BIG_ENDIAN 1
+#else
+ #define BB_BIG_ENDIAN 0
+#endif
+
+
#endif /* platform.h */