[Ffmpeg-devel] [PATCH] [Visibility] Try 2: libpostproc public functions
Diego Biurrun
diego
Wed Sep 20 09:18:42 CEST 2006
On Tue, Sep 19, 2006 at 04:36:43PM +0200, Diego 'Flameeyes' Petten? wrote:
> Okay this is the second try, with the EXPORTED definition replaced with a
> per-library EXPORTED_FOO define, that allows export/import of symbols.
>
> The #if block must be replicated once per library (this means that right now I
> have four of them locally.. haven't touched libswscale yet), I can avoid
> duplicating it from a single library, but I need it different on every run to
> allow use of protected visibility for internal symbols.
I still think there has to be a way to do this from configure/config.h
...
> --- libpostproc/postprocess.h (revision 6289)
> +++ libpostproc/postprocess.h (working copy)
> @@ -19,6 +19,18 @@
> #ifndef NEWPOSTPROCESS_H
> #define NEWPOSTPROCESS_H
>
> +#ifndef EXPORTED_POSTPROC
> +# if defined(__GNUC__) && (__GNUC__ >= 4)
> +# ifdef BUILD_POSTPROC
> +# define EXPORTED_POSTPROC __attribute__((visibility("protected")))
> +# else
> +# define EXPORTED_POSTPROC __attribute__((visibility("default")))
> +# endif
You'll never reach the else since you compile with -DBUILD_POSTPROC ..
Diego
More information about the ffmpeg-devel
mailing list