scummvm random work
[patches.git] / uClibc-0.9.28.3-endian.patch
CommitLineData
5e993f12 1diff -Nru uClibc-0.9.28.3.orig/utils/bswap.h uClibc-0.9.28.3/utils/bswap.h
2--- uClibc-0.9.28.3.orig/utils/bswap.h 2007-01-28 08:46:31.000000000 +0200
3+++ uClibc-0.9.28.3/utils/bswap.h 2007-03-02 22:41:00.000000000 +0200
4@@ -3,6 +3,12 @@
5
6 #if !defined(__BYTE_ORDER) && defined(BYTE_ORDER)
7 # define __BYTE_ORDER BYTE_ORDER
8+# if !defined(__BIG_ENDIAN) && defined(BIG_ENDIAN)
9+# define __BIG_ENDIAN BIG_ENDIAN
10+# endif
11+# if !defined(__LITTLE_ENDIAN) && defined(LITTLE_ENDIAN)
12+# define __LITTLE_ENDIAN LITTLE_ENDIAN
13+# endif
14 #endif
15
16 #ifndef __BYTE_ORDER
17@@ -13,11 +19,11 @@
18 #define __BIG_ENDIAN 4321 /* most-significant byte first (IBM, net) */
19 #define __PDP_ENDIAN 3412 /* LSB first in word, MSW first in long (pdp) */
20
21-#if defined(sun386) || defined(i386)
22+#if defined(sun386) || defined(i386) || defined(__LITTLE_ENDIAN__)
23 #define __BYTE_ORDER __LITTLE_ENDIAN
24 #endif
25
26-#if defined(sparc)
27+#if defined(sparc) || defined(__BIG_ENDIAN__)
28 #define __BYTE_ORDER __BIG_ENDIAN
29 #endif
30