From 03c63a11a53041ae4c450753a9c2d7bd8ca130b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Lalinsk=C3=BD?= Date: Sat, 24 Oct 2009 11:07:41 +0000 Subject: [PATCH] Set visibility("default") for GCC on exported symbols This does nothing with the current configuration, but it's useful if you compile the library with -fvisibility=hidden Patch by Modestas Vainius git-svn-id: svn://anonsvn.kde.org/home/kde/trunk/kdesupport/taglib@1039693 283d02a7-25f6-0310-bc7c-ecb5cbfe19da --- bindings/c/tag_c.h | 2 ++ taglib/taglib_export.h | 2 ++ 2 files changed, 4 insertions(+) diff --git a/bindings/c/tag_c.h b/bindings/c/tag_c.h index 055da4e3..cb109275 100644 --- a/bindings/c/tag_c.h +++ b/bindings/c/tag_c.h @@ -35,6 +35,8 @@ extern "C" { #else #define TAGLIB_C_EXPORT __declspec(dllimport) #endif +#elif defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 1) +#define TAGLIB_C_EXPORT __attribute__ ((visibility("default"))) #else #define TAGLIB_C_EXPORT #endif diff --git a/taglib/taglib_export.h b/taglib/taglib_export.h index a6894d48..f1345e94 100644 --- a/taglib/taglib_export.h +++ b/taglib/taglib_export.h @@ -32,6 +32,8 @@ #else #define TAGLIB_EXPORT __declspec(dllimport) #endif +#elif defined(__GNUC__) && (__GNUC__ > 4 || __GNUC__ == 4 && __GNUC_MINOR__ >= 1) +#define TAGLIB_EXPORT __attribute__ ((visibility("default"))) #else #define TAGLIB_EXPORT #endif