summaryrefslogtreecommitdiff
blob: 467bf4441444cf4c23e8e2cec6ef4650c3ea91d2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
--- a/js/src/jscpucfg.h	2012-01-18 17:38:54.409461514 +0100
+++ b/js/src/jscpucfg.h	2012-01-18 17:38:59.522462164 +0100
@@ -77,6 +77,19 @@
 #define IS_BIG_ENDIAN 1
 #endif
 
+#elif defined(__FreeBSD__)
+#include <sys/endian.h>
+
+#if defined(BYTE_ORDER)
+#if BYTE_ORDER == LITTLE_ENDIAN
+#define IS_LITTLE_ENDIAN 1
+#undef  IS_BIG_ENDIAN
+#elif BYTE_ORDER == BIG_ENDIAN
+#undef  IS_LITTLE_ENDIAN
+#define IS_BIG_ENDIAN 1
+#endif
+#endif
+
 #elif defined(JS_HAVE_ENDIAN_H)
 #include <endian.h>