blob: 3bcdc1379db614e2cbcd9ad67e2ac3d52cf993f3 (
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
|
--- buildengine/platform.h.old 2003-08-07 12:06:17.000000000 +0200
+++ 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. */
|