Browse Source

fix mingw shared build, and get rid of FF_IMPORT_ATTR

Originally committed as revision 7253 to svn://svn.ffmpeg.org/ffmpeg/trunk
tags/v0.5
Måns Rullgård 18 years ago
parent
commit
a77caa4dc9
3 changed files with 3 additions and 10 deletions
  1. +1
    -1
      configure
  2. +1
    -8
      libavutil/common.h
  3. +1
    -1
      libavutil/internal.h

+ 1
- 1
configure View File

@@ -1072,7 +1072,7 @@ EOF
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)' SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)'
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)' SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)'
SLIB_EXTRA_CMD="-lib /machine:i386 /def:\$(@:${SLIBSUF}=.def)" SLIB_EXTRA_CMD="-lib /machine:i386 /def:\$(@:${SLIBSUF}=.def)"
SHFLAGS="-shared -Wl,--output-def,\$(@:${SLIBSUF}=.def),--out-implib,lib\$(SLIBNAME:\$(SLIBSUF)=.dll.a)"
SHFLAGS="-shared -Wl,--output-def,\$(@:${SLIBSUF}=.def),--out-implib,lib\$(SLIBNAME:\$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc"
fi fi


# Combine FFLDFLAGS and the LDFLAGS environment variable. # Combine FFLDFLAGS and the LDFLAGS environment variable.


+ 1
- 8
libavutil/common.h View File

@@ -58,13 +58,6 @@
#define UINT64_C(c) (c ## ULL) #define UINT64_C(c) (c ## ULL)
#endif #endif


#if defined(__MINGW32__) && !defined(BUILD_AVUTIL) && defined(BUILD_SHARED_AV)
# define FF_IMPORT_ATTR __declspec(dllimport)
#else
# define FF_IMPORT_ATTR
#endif


#ifdef HAVE_AV_CONFIG_H #ifdef HAVE_AV_CONFIG_H
/* only include the following when compiling package */ /* only include the following when compiling package */
# include "internal.h" # include "internal.h"
@@ -83,7 +76,7 @@
#define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0) #define FFSWAP(type,a,b) do{type SWAP_tmp= b; b= a; a= SWAP_tmp;}while(0)


/* misc math functions */ /* misc math functions */
extern FF_IMPORT_ATTR const uint8_t ff_log2_tab[256];
extern const uint8_t ff_log2_tab[256];


static inline int av_log2(unsigned int v) static inline int av_log2(unsigned int v)
{ {


+ 1
- 1
libavutil/internal.h View File

@@ -229,7 +229,7 @@ extern const uint32_t ff_inverse[256];
# define FASTDIV(a,b) ((a)/(b)) # define FASTDIV(a,b) ((a)/(b))
#endif #endif


extern FF_IMPORT_ATTR const uint8_t ff_sqrt_tab[128];
extern const uint8_t ff_sqrt_tab[128];


static inline int ff_sqrt(int a) static inline int ff_sqrt(int a)
{ {


Loading…
Cancel
Save