3
0
Fork 0
forked from mirrors/nixpkgs
nixpkgs/pkgs/development/libraries/libdevil/il_endian.h.patch

28 lines
889 B
Diff
Raw Normal View History

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)