Browse code

Make bswap.h safe to install as public API

Originally committed as revision 24171 to svn://svn.ffmpeg.org/ffmpeg/trunk

Måns Rullgård authored on 2010/07/11 07:21:55
Showing 1 changed files
... ...
@@ -27,9 +27,13 @@
27 27
 #define AVUTIL_BSWAP_H
28 28
 
29 29
 #include <stdint.h>
30
-#include "config.h"
30
+#include "libavutil/avconfig.h"
31 31
 #include "attributes.h"
32 32
 
33
+#ifdef HAVE_AV_CONFIG_H
34
+
35
+#include "config.h"
36
+
33 37
 #if   ARCH_ARM
34 38
 #   include "arm/bswap.h"
35 39
 #elif ARCH_AVR32
... ...
@@ -42,6 +46,8 @@
42 42
 #   include "x86/bswap.h"
43 43
 #endif
44 44
 
45
+#endif /* HAVE_AV_CONFIG_H */
46
+
45 47
 #define AV_BSWAP16C(x) (((x) << 8 & 0xff00)  | ((x) >> 8 & 0x00ff))
46 48
 #define AV_BSWAP32C(x) (AV_BSWAP16C(x) << 16 | AV_BSWAP16C((x) >> 16))
47 49
 #define AV_BSWAP64C(x) (AV_BSWAP32C(x) << 32 | AV_BSWAP32C((x) >> 32))
... ...
@@ -88,7 +94,7 @@ static inline uint64_t av_const av_bswap64(uint64_t x)
88 88
 // be2ne ... big-endian to native-endian
89 89
 // le2ne ... little-endian to native-endian
90 90
 
91
-#if HAVE_BIGENDIAN
91
+#if AV_HAVE_BIGENDIAN
92 92
 #define av_be2ne16(x) (x)
93 93
 #define av_be2ne32(x) (x)
94 94
 #define av_be2ne64(x) (x)