Browse code

Another attempt to fix compilation on PPC

git-svn-id: file:///home/git/hedgehog.fhcrc.org/bioconductor/trunk/madman/Rpacks/mzR@57578 bc3139a8-67e5-0310-9ffc-ced21a209358

Steffen Neumann authored on 21/08/2011 19:55:58
Showing1 changed files

... ...
@@ -26,7 +26,7 @@
26 26
 
27 27
 
28 28
 #include "boost/static_assert.hpp"
29
-
29
+#include <endian.h>
30 30
 
31 31
 namespace pwiz {
32 32
 namespace util {
... ...
@@ -41,6 +41,13 @@ namespace util {
41 41
 #define PWIZ_MSVC
42 42
 #endif
43 43
 
44
+#ifdef __BYTE_ORDER
45
+#if __BYTE_ORDER == __BIG_ENDIAN //if both are not defined it is TRUE!
46
+#define PWIZ_BIG_ENDIAN
47
+#elif __BYTE_ORDER == __LITTLE_ENDIAN
48
+#define PWIZ_LITTLE_ENDIAN
49
+#endif
50
+#endif
44 51
 
45 52
 #if (defined(PWIZ_GCC) && defined(__BYTE_ORDER) && __BYTE_ORDER==__LITTLE_ENDIAN) || \
46 53
     (defined(__DARWIN_BYTE_ORDER) && __DARWIN_BYTE_ORDER==__DARWIN_LITTLE_ENDIAN) || \
... ...
@@ -52,7 +59,7 @@ namespace util {
52 59
 #endif
53 60
 
54 61
 
55
-#if (defined(PWIZ_GCC) && defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN || defined(__ppc__) || defined(__POWERPC__) || defined(_M_PPC) )
62
+#if (defined(PWIZ_GCC) && defined(__BYTE_ORDER) && __BYTE_ORDER==__BIG_ENDIAN)
56 63
 #define PWIZ_BIG_ENDIAN
57 64
 #endif
58 65