diff --git a/libfaad2/bits.h b/libfaad2/bits.h index fbe2295215..809084aa84 100644 --- a/libfaad2/bits.h +++ b/libfaad2/bits.h @@ -56,9 +56,9 @@ typedef struct _bitfile } bitfile; -#if defined (_WIN32) && !defined(_WIN32_WCE) +#if defined (_WIN32) && !defined(_WIN32_WCE) && !defined(__GNUC__) #define BSWAP(a) __asm mov eax,a __asm bswap eax __asm mov a, eax -#elif defined(LINUX) || defined(DJGPP) +#elif defined(ARCH_X86) && (defined(DJGPP) || defined(__GNUC__)) #define BSWAP(a) __asm__ ( "bswapl %0\n" : "=r" (a) : "0" (a) ) #else #define BSWAP(a) \ diff --git a/libfaad2/common.h b/libfaad2/common.h index 4660e9589b..c622913ae0 100644 --- a/libfaad2/common.h +++ b/libfaad2/common.h @@ -109,7 +109,7 @@ extern "C" { #if defined(_WIN32) - +#if 0 typedef unsigned __int64 uint64_t; typedef unsigned __int32 uint32_t; typedef unsigned __int16 uint16_t; @@ -118,6 +118,9 @@ typedef __int64 int64_t; typedef __int32 int32_t; typedef __int16 int16_t; typedef __int8 int8_t; +#else +#include +#endif typedef float float32_t; diff --git a/libfaad2/config.h b/libfaad2/config.h index 5c90a4b6f3..65a76d9dbe 100644 --- a/libfaad2/config.h +++ b/libfaad2/config.h @@ -1,3 +1,9 @@ +#include "../config.h" + +#ifdef WORDS_BIGENDIAN +#define ARCH_IS_BIG_ENDIAN 1 +#endif + /* config.h. Generated automatically by configure. */ /* config.h.in. Generated automatically from configure.in by autoheader. */