diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2022-03-16 16:45:38 +0100 |
---|---|---|
committer | Sebastian Pipping <sebastian@pipping.org> | 2022-03-16 21:08:07 +0100 |
commit | 04ae06f52862f70722545d6fb3b9d8565e441fa3 (patch) | |
tree | 7ed99820cec0913e8c87b3c2fc0037b0cac7125b | |
parent | 02be378fde47bf3972b21651bd2685464e1375b8 (diff) | |
download | uriparser-04ae06f52862f70722545d6fb3b9d8565e441fa3.tar.gz |
Fix symbol visibility for non-MSVC static library build
-rw-r--r-- | include/uriparser/UriBase.h | 26 |
1 files changed, 11 insertions, 15 deletions
diff --git a/include/uriparser/UriBase.h b/include/uriparser/UriBase.h index 089c2c6..63253ad 100644 --- a/include/uriparser/UriBase.h +++ b/include/uriparser/UriBase.h @@ -98,23 +98,19 @@ /* Import/export decorator */ -#if defined(URI_STATIC_BUILD) -# define URI_PUBLIC +#if defined(_MSC_VER) +# if defined(URI_STATIC_BUILD) +# define URI_PUBLIC +# elif defined(URI_LIBRARY_BUILD) +# define URI_PUBLIC __declspec(dllexport) +# else +# define URI_PUBLIC __declspec(dllimport) +# endif #else -# if defined(URI_LIBRARY_BUILD) -# if defined(_MSC_VER) -# define URI_PUBLIC __declspec(dllexport) -# elif defined(URI_VISIBILITY) -# define URI_PUBLIC __attribute__ ((visibility("default"))) -# else -# define URI_PUBLIC -# endif +# if ! defined(URI_LIBRARY_BUILD) || ! defined(URI_VISIBILITY) +# define URI_PUBLIC # else -# if defined(_MSC_VER) -# define URI_PUBLIC __declspec(dllimport) -# else -# define URI_PUBLIC -# endif +# define URI_PUBLIC __attribute__ ((visibility("default"))) # endif #endif |