diff options
author | Sebastian Pipping <sebastian@pipping.org> | 2022-03-16 23:12:07 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-03-16 23:12:07 +0100 |
commit | a259209a57f7123d4bc422336ce0d420d41f4f5e (patch) | |
tree | f866e6ee962e3d45fc90189ee872e52f072219c0 | |
parent | 02be378fde47bf3972b21651bd2685464e1375b8 (diff) | |
parent | cd0b303abc3f9bc48809c322a368c4a2cc5b7396 (diff) | |
download | uriparser-a259209a57f7123d4bc422336ce0d420d41f4f5e.tar.gz |
Merge pull request #141 from uriparser/issue-139-fix-symbol-visibility
Fix symbol visibility for non-MSVC static library build (fixes #139)
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | THANKS | 1 | ||||
-rw-r--r-- | include/uriparser/UriBase.h | 26 |
3 files changed, 17 insertions, 15 deletions
@@ -2,6 +2,11 @@ NOTE: uriparser is looking for help with a few things: https://github.com/uriparser/uriparser/labels/help%20wanted If you can help, please get in touch. Thanks! +xxxx-xx-xx -- x.x.x + + * Fixed: Fix symbol visibility for -DBUILD_SHARED_LIBS=OFF (GitHub #139, + GitHub #141); thanks to Mariusz Zaborski for the report! + 2022-01-06 -- 0.9.6 >>>>>>>>>>>>> SECURITY >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>> @@ -36,6 +36,7 @@ Kouhei Sutou Kurt Schwehr Marc Novakowski Marcin Juszkiewicz +Mariusz Zaborski Martin Michlmayr Michael Anthony Puls II Michelino Chionchio 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 |