summaryrefslogtreecommitdiff
path: root/games-fps/duke3d/files/20040817-endian.patch
diff options
context:
space:
mode:
Diffstat (limited to 'games-fps/duke3d/files/20040817-endian.patch')
-rw-r--r--games-fps/duke3d/files/20040817-endian.patch26
1 files changed, 26 insertions, 0 deletions
diff --git a/games-fps/duke3d/files/20040817-endian.patch b/games-fps/duke3d/files/20040817-endian.patch
new file mode 100644
index 000000000000..3bcdc1379db6
--- /dev/null
+++ b/games-fps/duke3d/files/20040817-endian.patch
@@ -0,0 +1,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. */