diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/sord.c | 2 | ||||
-rw-r--r-- | src/zix/common.h | 18 |
2 files changed, 11 insertions, 9 deletions
@@ -7,7 +7,7 @@ #include "serd/serd.h" #include "sord/sord.h" -#define ZIX_STATIC +#define ZIX_API #include "zix/btree.c" #include "zix/btree.h" #include "zix/common.h" diff --git a/src/zix/common.h b/src/zix/common.h index 46307b1..54f2303 100644 --- a/src/zix/common.h +++ b/src/zix/common.h @@ -12,14 +12,16 @@ */ /** @cond */ -#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 +#ifndef ZIX_API +# 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 #endif #ifdef __GNUC__ |