summaryrefslogtreecommitdiff
blob: a22d07fb09f189419d4f70a5a43593ed375cdf08 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
--- duke3d/source/buildengine/platform.h	2003-08-07 12:06:17.000000000 +0200
+++ duke3d.new/source/buildengine/platform.h	2004-08-24 18:35:05.292291088 +0200
@@ -5,6 +5,7 @@
 #include "win32_compat.h"
 #elif (defined PLATFORM_UNIX)
 #include "unix_compat.h"
+#include <endian.h>
 #elif (defined PLATFORM_DOS)
 #include "doscmpat.h"
 #else
@@ -60,9 +61,15 @@
 #define BUILDSWAP_INTEL16(x) _swap16(x)
 #define BUILDSWAP_INTEL32(x) _swap32(x)
 #else
+#if __BYTE_ORDER == __LITTLE_ENDIAN
 #define PLATFORM_LITTLEENDIAN 1
 #define BUILDSWAP_INTEL16(x) (x)
 #define BUILDSWAP_INTEL32(x) (x)
+#else
+#define PLATFORM_BIGENDIAN 1
+#define BUILDSWAP_INTEL16(x) _swap16(x)
+#define BUILDSWAP_INTEL32(x) _swap32(x)
+#endif
 #endif
 
 extern int has_altivec;  /* PowerPC-specific. */