diff options
Diffstat (limited to 'libs/pbd/pbd/libpbd_visibility.h')
-rw-r--r-- | libs/pbd/pbd/libpbd_visibility.h | 35 |
1 files changed, 12 insertions, 23 deletions
diff --git a/libs/pbd/pbd/libpbd_visibility.h b/libs/pbd/pbd/libpbd_visibility.h index e2c6235f0b..0fcebd554f 100644 --- a/libs/pbd/pbd/libpbd_visibility.h +++ b/libs/pbd/pbd/libpbd_visibility.h @@ -20,37 +20,26 @@ #ifndef __libpbd_libpbd_visibility_h__ #define __libpbd_libpbd_visibility_h__ -/* _WIN32 is defined by most compilers targetting Windows, but within the - * ardour source tree, we also define COMPILER_MSVC or COMPILER_MINGW depending - * on how a Windows build is built. - */ - -#if defined _WIN32 || defined __CYGWIN__ || defined(COMPILER_MSVC) || defined(COMPILER_MINGW) +#if defined(COMPILER_MSVC) #define LIBPBD_DLL_IMPORT __declspec(dllimport) #define LIBPBD_DLL_EXPORT __declspec(dllexport) #define LIBPBD_DLL_LOCAL #else - #if __GNUC__ >= 4 - #define LIBPBD_DLL_IMPORT __attribute__ ((visibility ("default"))) - #define LIBPBD_DLL_EXPORT __attribute__ ((visibility ("default"))) - #define LIBPBD_DLL_LOCAL __attribute__ ((visibility ("hidden"))) - #else - #define LIBPBD_DLL_IMPORT - #define LIBPBD_DLL_EXPORT - #define LIBPBD_DLL_LOCAL - #endif + #define LIBPBD_DLL_IMPORT __attribute__ ((visibility ("default"))) + #define LIBPBD_DLL_EXPORT __attribute__ ((visibility ("default"))) + #define LIBPBD_DLL_LOCAL __attribute__ ((visibility ("hidden"))) #endif -#ifdef LIBPBD_DLL // libpbd is a DLL -#ifdef LIBPBD_DLL_EXPORTS // defined if we are building the libpbd DLL (instead of using it) - #define LIBPBD_API LIBPBD_DLL_EXPORT +#ifdef LIBPBD_STATIC // libpbd is a DLL + #define LIBPBD_API + #define LIBPBD_LOCAL #else + #ifdef LIBPBD_DLL_EXPORTS // defined if we are building the libpbd DLL (instead of using it) + #define LIBPBD_API LIBPBD_DLL_EXPORT + #else #define LIBPBD_API LIBPBD_DLL_IMPORT -#endif -#define LIBPBD_LOCAL LIBPBD_DLL_LOCAL -#else /* static lib, not DLL */ -#define LIBPBD_API -#define LIBPBD_LOCAL + #endif + #define LIBPBD_LOCAL LIBPBD_DLL_LOCAL #endif #endif /* __libpbd_libpbd_visibility_h__ */ |