summaryrefslogtreecommitdiffhomepage
path: root/compat/linkage-macros.hpp
diff options
context:
space:
mode:
Diffstat (limited to 'compat/linkage-macros.hpp')
-rw-r--r--compat/linkage-macros.hpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/compat/linkage-macros.hpp b/compat/linkage-macros.hpp
new file mode 100644
index 00000000..b9bc9801
--- /dev/null
+++ b/compat/linkage-macros.hpp
@@ -0,0 +1,15 @@
+#pragma once
+
+#if defined _MSC_VER || defined _WIN32
+# define OTR_GENERIC_EXPORT __declspec(dllexport)
+# define OTR_GENERIC_IMPORT __declspec(dllimport)
+#else
+# define OTR_GENERIC_EXPORT __attribute__ ((visibility ("default")))
+# define OTR_GENERIC_IMPORT
+#endif
+
+#if defined _MSC_VER
+# define OTR_GENERIC_TEMPLATE
+#else
+# define OTR_GENERIC_TEMPLATE __attribute__ ((visibility ("default")))
+#endif