# HG changeset patch # User mru # Date 1278800515 0 # Node ID 41878f66798fa312f5d02d46772780f1132c1550 # Parent f8db9a2bae0545bee2ad8e3dd539e4accffef358 Make bswap.h safe to install as public API diff -r f8db9a2bae05 -r 41878f66798f bswap.h --- a/bswap.h Sat Jul 10 22:12:30 2010 +0000 +++ b/bswap.h Sat Jul 10 22:21:55 2010 +0000 @@ -27,8 +27,12 @@ #define AVUTIL_BSWAP_H #include +#include "libavutil/avconfig.h" +#include "attributes.h" + +#ifdef HAVE_AV_CONFIG_H + #include "config.h" -#include "attributes.h" #if ARCH_ARM # include "arm/bswap.h" @@ -42,6 +46,8 @@ # include "x86/bswap.h" #endif +#endif /* HAVE_AV_CONFIG_H */ + #define AV_BSWAP16C(x) (((x) << 8 & 0xff00) | ((x) >> 8 & 0x00ff)) #define AV_BSWAP32C(x) (AV_BSWAP16C(x) << 16 | AV_BSWAP16C((x) >> 16)) #define AV_BSWAP64C(x) (AV_BSWAP32C(x) << 32 | AV_BSWAP32C((x) >> 32)) @@ -88,7 +94,7 @@ // be2ne ... big-endian to native-endian // le2ne ... little-endian to native-endian -#if HAVE_BIGENDIAN +#if AV_HAVE_BIGENDIAN #define av_be2ne16(x) (x) #define av_be2ne32(x) (x) #define av_be2ne64(x) (x)