[cairo] Cairo ported to OS/2 - Suggestions

Adam Goode adam at evdebs.org
Tue Aug 16 11:44:51 PDT 2005

On Tue, 2005-08-16 at 11:02 +0200, Doodle wrote:
> In addition to solving my problem, it would have one more advantage:
> By using the CAIRODECLSPEC defined above, it would be controlled from
> the source code which functions are exported and which are not. I think
> it's always better to let others use only those functions we let them
> to use.

And don't forget, newer versions of gcc support the hiding of
unnecessary exports when code is compiled with -fvisibility=hidden and

#if __GNUC__ > 3 ||                             \
  (__GNUC__ == 3 && (__GNUC_MINOR__ > 3 ||      \
                     (__GNUC_MINOR__ == 3)))
/* Export functions (gcc) */
#define CAIRODECLSPEC __attribute__ ((visibility("default")))
/* Import functions (gcc) */

This will give the same result as the __declspec(dllexport) on win32,
see http://www.nedprod.com/programs/gccvisibility.html for more info.

You might want to check for __ELF__, as well, since the gcc visibility
thing only works on "some" ELF targets.

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: This is a digitally signed message part
Url : http://lists.freedesktop.org/archives/cairo/attachments/20050816/4a76b71b/attachment.pgp

More information about the cairo mailing list