[cairo] __visibility__ bug fix

Kristian Høgsberg krh at bitplanet.net
Mon Dec 20 18:39:48 PST 2004


Carl Worth wrote:
> On Mon, 20 Dec 2004 18:03:25 +0100, David Reveman wrote:
> 
>>If you place the '*' after the __internal_linkage macro, like this:
>>
>>extern cairo_surface_t __internal_linkage *
>>cairo_function ();
>>
>>I think gcc 3.4 should be happy.
> 
> 
> Thanks. That did the trick, so these macros are all back again.
> 
> Of course, splitting up the return type with this macro does make the
> declaration look nasty. It was much easier to ignore the macro when it
> was off to the right.
> 
> I don't hiding the return type inside a macro argument would look good
> either, (extra parentheses in a function declaration are particularly
> confusing).
> 
> Am I doomed to have to learn to deal with inscrutable header files?
> 
> Any other suggestions?

What about putting it before the type?

   extern __internal_linkage cairo_gstate_t *
   _cairo_gstate_create (void);

This works for me with gcc 3.4 and 2.96, and it has the storage 
specifiers grouped together at the beginning of the line.

cheers,
Kristian



More information about the cairo mailing list