diff options
author | Diego Biurrun <diego@biurrun.de> | 2006-01-30 00:22:41 +0000 |
---|---|---|
committer | Diego Biurrun <diego@biurrun.de> | 2006-01-30 00:22:41 +0000 |
commit | 320d060ae94eea9018ee4292cd18b506c333d377 (patch) | |
tree | cc5f4cb5a457f7781b3b3a30038ebeea6dbb173c /libavutil/common.h | |
parent | 53862e0fa6be8a0a0d750f9e8897934068dbe6d0 (diff) | |
download | ffmpeg-320d060ae94eea9018ee4292cd18b506c333d377.tar.gz |
On MinGW it is not possible to build shared and static libraries at once.
Add means to disable building the static libraries and fix a few issues
with the MinGW build.
All the hard work done by Alexander Strasser, minor changes by myself.
Originally committed as revision 4909 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'libavutil/common.h')
-rw-r--r-- | libavutil/common.h | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/libavutil/common.h b/libavutil/common.h index 09638c39e7..f4dcf310b0 100644 --- a/libavutil/common.h +++ b/libavutil/common.h @@ -247,6 +247,13 @@ static inline float floorf(float f) { #ifdef HAVE_AV_CONFIG_H +#if defined(__MINGW32__) && !defined(BUILD_AVUTIL) && defined(BUILD_SHARED_AV) +# define FF_IMPORT_ATTR __declspec(dllimport) +#else +# define FF_IMPORT_ATTR +#endif + + # include "bswap.h" // Use rip-relative addressing if compiling PIC code on x86-64. @@ -345,7 +352,7 @@ void print_stats(void); #endif /* misc math functions */ -extern const uint8_t ff_log2_tab[256]; +extern FF_IMPORT_ATTR const uint8_t ff_log2_tab[256]; static inline int av_log2(unsigned int v) { @@ -423,7 +430,7 @@ static inline int clip_uint8(int a) } /* math */ -extern const uint8_t ff_sqrt_tab[128]; +extern FF_IMPORT_ATTR const uint8_t ff_sqrt_tab[128]; int64_t ff_gcd(int64_t a, int64_t b); |