Merge pull request #165 from metalefty/fix-for-big-endian-arches

common: fix check for big endian arches
ulab-next-nosound
jsorg71 10 years ago
commit 23b2822cfb

@ -19,10 +19,12 @@
#if !defined(ARCH_H) #if !defined(ARCH_H)
#define ARCH_H #define ARCH_H
#include <endian.h>
#if !(defined(L_ENDIAN) || defined(B_ENDIAN)) #if !(defined(L_ENDIAN) || defined(B_ENDIAN))
/* check endianess */ /* check endianess */
#if defined(__sparc__) || defined(__PPC__) || defined(__ppc__) || \ #if defined(__sparc__) || defined(__PPC__) || defined(__ppc__) || \
defined(__hppa__) defined(__hppa__) || (BYTE_ORDER == BIG_ENDIAN)
#define B_ENDIAN #define B_ENDIAN
#else #else
#define L_ENDIAN #define L_ENDIAN

Loading…
Cancel
Save