Parcourir la source

better support for reverse-endian variants of arm/mips/microblaze

these macros are supported by more compilers
Rich Felker il y a 12 ans
Parent
commit
64251d8bbd
3 fichiers modifiés avec 12 ajouts et 0 suppressions
  1. 4 0
      arch/arm/bits/endian.h
  2. 4 0
      arch/microblaze/bits/endian.h
  3. 4 0
      arch/mips/bits/endian.h

+ 4 - 0
arch/arm/bits/endian.h

@@ -1 +1,5 @@
+#if __ARMEB__
+#define __BYTE_ORDER __BIG_ENDIAN
+#else
 #define __BYTE_ORDER __LITTLE_ENDIAN
+#endif

+ 4 - 0
arch/microblaze/bits/endian.h

@@ -1 +1,5 @@
+#if __MICROBLAZEEL__
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#else
 #define __BYTE_ORDER __BIG_ENDIAN
+#endif

+ 4 - 0
arch/mips/bits/endian.h

@@ -1 +1,5 @@
+#if _MIPSEL || __MIPSEL || __MIPSEL__
+#define __BYTE_ORDER __LITTLE_ENDIAN
+#else
 #define __BYTE_ORDER __BIG_ENDIAN
+#endif