From 3215d4f4f963f740bfa2886680d2c90feb132ef4 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Thu, 31 Dec 2020 17:29:23 +0100 Subject: Switch to Meson --- include/zix/common.h | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) (limited to 'include/zix/common.h') 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 -- cgit v1.2.1