aboutsummaryrefslogtreecommitdiffhomepage
path: root/midimonster.h
diff options
context:
space:
mode:
Diffstat (limited to 'midimonster.h')
-rw-r--r--midimonster.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/midimonster.h b/midimonster.h
index 3922b03..1192d6a 100644
--- a/midimonster.h
+++ b/midimonster.h
@@ -5,6 +5,7 @@
#include <stdint.h>
#include <inttypes.h>
+/* API call attributes and visibilities */
#ifndef MM_API
#ifdef _WIN32
#define MM_API __attribute__((dllimport))
@@ -13,6 +14,15 @@
#endif
#endif
+/* Some build systems may apply the -fvisibility=hidden parameter from the core build to the backends, so mark the init function visible */
+#ifndef MM_PLUGIN_API
+ #ifdef _WIN32
+ #define MM_PLUGIN_API __attribute__((dllexport))
+ #else
+ #define MM_PLUGIN_API __attribute__((visibility ("default")))
+ #endif
+#endif
+
/* Straight-forward min / max macros */
#define max(a,b) (((a) > (b)) ? (a) : (b))
#define min(a,b) (((a) < (b)) ? (a) : (b))