summary refs log tree commit diff
path: root/pkgs/development/libraries/libdevil/il_endian.h.patch
blob: c220e6802fd9ff8a26c62294d18ecd8a9bd46437 (plain) (blame)
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
27
Source: http://sourceforge.net/p/resil/tickets/8/
--- devil-1.7.8.orig/src-IL/include/il_endian.h.orig	2009-03-08 01:10:08.000000000 -0600
+++ devil-1.7.8/src-IL/include/il_endian.h	2013-11-03 01:52:37.000000000 -0600
@@ -19,9 +19,13 @@
 	#ifndef __BIG_ENDIAN__
 	#define __BIG_ENDIAN__ 1
 	#endif
+#else
+	#ifndef __LITTLE_ENDIAN__
+	#define __LITTLE_ENDIAN__ 1
+	#endif
 #endif
 
-#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __BIG_ENDIAN__) \
+#if (defined(__BYTE_ORDER__) && __BYTE_ORDER__ == __ORDER_BIG_ENDIAN__) \
   || (defined(__BIG_ENDIAN__) && !defined(__LITTLE_ENDIAN__))
  	#undef __LITTLE_ENDIAN__
 	#define Short(s) iSwapShort(s)
@@ -39,8 +43,6 @@
 	#define BigDouble(d)  
 #else
 	#undef __BIG_ENDIAN__
-	#undef __LITTLE_ENDIAN__  // Not sure if it's defined by any compiler...
-	#define __LITTLE_ENDIAN__
 	#define Short(s)  
 	#define UShort(s)  
 	#define Int(i)