[cairo] [cairo-commit] src/cairo-compiler-private.h src/check-def.sh src/check-plt.sh src/compiler-supports-visibility.c src/Makefile.am

Chris Wilson chris at chris-wilson.co.uk
Fri Jan 11 09:37:21 PST 2008


On Fri, 2008-01-11 at 11:50 -0500, Behdad Esfahbod wrote:
> On Fri, 2008-01-11 at 11:19 -0500, Chris Wilson wrote:
> > New commits:
> > commit 6d3ed950ea075ff2a5a569365b46c3cfc4152787
> > Author: Chris Wilson <chris at chris-wilson.co.uk>
> > Date:   Fri Jan 11 16:16:20 2008 +0000
> > 
> >     [check] Skip def/plt tests if the compiler doesn't support symbol hiding.
> >     
> >     Compile a trivial program such that it reports whether cairo is hiding
> >     its internal symbols and skip the tests that depend upon it.
> 
> This doesn't work with cross-compiling.  Write it as a shell script that
> just uses C preprocessor grep to test it.
>
> >  	@status=true; for f in $(libcairo_la_base_sources); do \
> > diff --git a/src/cairo-compiler-private.h b/src/cairo-compiler-private.h
> > index da80b89..14aef47 100644
> > --- a/src/cairo-compiler-private.h
> > +++ b/src/cairo-compiler-private.h
> > @@ -72,10 +72,13 @@ CAIRO_BEGIN_DECLS
> >  /* slim_internal.h */
> >  #if (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)) && defined(__ELF__) && !defined(__sun)
> >  #define cairo_private_no_warn	__attribute__((__visibility__("hidden")))
> > +#define CAIRO_HAS_HIDDEN_SYMBOLS 1
> >  #elif defined(__SUNPRO_C) && (__SUNPRO_C >= 0x550)
> >  #define cairo_private_no_warn	__hidden
> > +#define CAIRO_HAS_HIDDEN_SYMBOLS 1
> >  #else /* not gcc >= 3.3 and not Sun Studio >= 8 */
> >  #define cairo_private_no_warn
> > +#define CAIRO_HAS_HIDDEN_SYMBOLS 0
> 
> Common practice is to #undef instead of defining to 0.

Thanks for the review Behdad, I'll convert it to a pre-processor check.
--
Chris Wilson



More information about the cairo mailing list