summaryrefslogtreecommitdiffstats
path: root/include/zix/common.h
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2020-12-31 17:29:23 +0100
committerDavid Robillard <d@drobilla.net>2020-12-31 20:15:19 +0100
commit3215d4f4f963f740bfa2886680d2c90feb132ef4 (patch)
tree531faca81d18088581bde9ee0b416cab69ae89e2 /include/zix/common.h
parentce3e4266e4f0712b27563d079b7e7b6fd8013014 (diff)
downloadzix-3215d4f4f963f740bfa2886680d2c90feb132ef4.tar.gz
zix-3215d4f4f963f740bfa2886680d2c90feb132ef4.tar.bz2
zix-3215d4f4f963f740bfa2886680d2c90feb132ef4.zip
Switch to Meson
Diffstat (limited to 'include/zix/common.h')
-rw-r--r--include/zix/common.h19
1 files changed, 6 insertions, 13 deletions
diff --git a/include/zix/common.h b/include/zix/common.h
index 0191cca..b494481 100644
--- a/include/zix/common.h
+++ b/include/zix/common.h
@@ -25,19 +25,12 @@
*/
/** @cond */
-#ifdef ZIX_SHARED
-# ifdef _WIN32
-# define ZIX_LIB_IMPORT __declspec(dllimport)
-# define ZIX_LIB_EXPORT __declspec(dllexport)
-# else
-# define ZIX_LIB_IMPORT __attribute__((visibility("default")))
-# define ZIX_LIB_EXPORT __attribute__((visibility("default")))
-# endif
-# ifdef ZIX_INTERNAL
-# define ZIX_API ZIX_LIB_EXPORT
-# else
-# define ZIX_API ZIX_LIB_IMPORT
-# endif
+#if defined(_WIN32) && !defined(ZIX_STATIC) && defined(ZIX_INTERNAL)
+# define ZIX_API __declspec(dllexport)
+#elif defined(_WIN32) && !defined(ZIX_STATIC)
+# define ZIX_API __declspec(dllimport)
+#elif defined(__GNUC__)
+# define ZIX_API __attribute__((visibility("default")))
#else
# define ZIX_API
#endif