[Ffmpeg-devel] [PATCH] [Visibility] Try 2: libpostproc public functions

Diego 'Flameeyes' Pettenò flameeyes
Wed Sep 20 09:27:50 CEST 2006


On Wednesday 20 September 2006 09:18, Diego Biurrun wrote:
> I still think there has to be a way to do this from configure/config.h
I'm open to suggestion, but I don't think that using config.h would be a good 
idea, because it's (correctly) not installed, while the headers where 
visibility is set are (and the attributes should apply if FFmpeg is being 
used by a project that has its own -fvisibility too).
This is also why I didn't go with a HAVE_VISIBILITY defined during configure.

> > --- 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 ..
When building libpostproc, yes. But when postprocess.h is included by another 
project, BUILD_POSTPROC is not defined, and the value for EXPORTED_POSTPROC 
gets defined to the default visibility attribute.

By the way, Luca proposed renaming EXPORTED to VISIBLE, any problem with that?

-- 
Diego "Flameeyes" Petten? - http://farragut.flameeyes.is-a-geek.org/
Gentoo/Alt lead, Gentoo/FreeBSD, Video, AMD64, Sound, PAM, KDE
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
URL: <http://lists.mplayerhq.hu/pipermail/ffmpeg-devel/attachments/20060920/3d009abd/attachment.pgp>



More information about the ffmpeg-devel mailing list