summaryrefslogtreecommitdiffstats
path: root/slv2/types.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2010-03-05 20:11:04 +0000
committerDavid Robillard <d@drobilla.net>2010-03-05 20:11:04 +0000
commit4d2cf9582ba6c5e9cdb29b07427934b2f1e0ef02 (patch)
tree0fe2c738a54718ae1c5dc3d5a905308b58fe69d0 /slv2/types.h
parentd8437709d6f69b4952993a6794313edb38361a53 (diff)
downloadlilv-4d2cf9582ba6c5e9cdb29b07427934b2f1e0ef02.tar.gz
lilv-4d2cf9582ba6c5e9cdb29b07427934b2f1e0ef02.tar.bz2
lilv-4d2cf9582ba6c5e9cdb29b07427934b2f1e0ef02.zip
Hide symbols by default and explicitly export API (clean ABI).
git-svn-id: http://svn.drobilla.net/lad/trunk/slv2@2530 a436a847-0d15-0410-975c-d299462d15a1
Diffstat (limited to 'slv2/types.h')
-rw-r--r--slv2/types.h18
1 files changed, 18 insertions, 0 deletions
diff --git a/slv2/types.h b/slv2/types.h
index 2cf01fd..f0f6d58 100644
--- a/slv2/types.h
+++ b/slv2/types.h
@@ -26,6 +26,24 @@ extern "C" {
#include <stdint.h>
#include <stdbool.h>
+#if defined _WIN32 || defined __CYGWIN__
+ #define SLV2_LIB_IMPORT __declspec(dllimport)
+ #define SLV2_LIB_EXPORT __declspec(dllexport)
+#else
+ #define SLV2_LIB_IMPORT __attribute__ ((visibility("default")))
+ #define SLV2_LIB_EXPORT __attribute__ ((visibility("default")))
+#endif
+
+#ifdef SLV2_SHARED // Building a shared library
+ #ifdef SLV2_INTERNAL // Building SLV2 (not using it)
+ #define SLV2_API SLV2_LIB_EXPORT
+ #else
+ #define SLV2_API SLV2_LIB_IMPORT
+ #endif
+#else // Building a static library
+ #define SLV2_API
+#endif // SLV2_DLL
+
#define SLV2_NAMESPACE_LV2 "http://lv2plug.in/ns/lv2core#"
#define SLV2_PORT_CLASS_PORT "http://lv2plug.in/ns/lv2core#Port"
#define SLV2_PORT_CLASS_INPUT "http://lv2plug.in/ns/lv2core#InputPort"