diff options
-rw-r--r-- | NEWS | 3 | ||||
-rw-r--r-- | include/serd/serd.h | 19 |
2 files changed, 13 insertions, 9 deletions
@@ -2,6 +2,7 @@ serd (0.31.0) unstable; urgency=medium * Add Windows path separator support to serd_node_new_file_uri() * Add serd_reader_skip_until_byte() to public API + * Allow SERD_API to be defined by the user * Avoid creating test files in the current directory * Clean up code * Fix crash when trying to read chunks without starting @@ -13,7 +14,7 @@ serd (0.31.0) unstable; urgency=medium * Replace duplicated dox_to_sphinx script with sphinxygen dependency * Test header for warnings more strictly - -- David Robillard <d@drobilla.net> Sun, 11 Dec 2022 16:36:39 +0000 + -- David Robillard <d@drobilla.net> Mon, 19 Dec 2022 23:55:26 +0000 serd (0.30.16) stable; urgency=medium diff --git a/include/serd/serd.h b/include/serd/serd.h index 42e85f87..c1d1a8b1 100644 --- a/include/serd/serd.h +++ b/include/serd/serd.h @@ -12,14 +12,17 @@ #include <stdint.h> #include <stdio.h> -#if defined(_WIN32) && !defined(SERD_STATIC) && defined(SERD_INTERNAL) -# define SERD_API __declspec(dllexport) -#elif defined(_WIN32) && !defined(SERD_STATIC) -# define SERD_API __declspec(dllimport) -#elif defined(__GNUC__) -# define SERD_API __attribute__((visibility("default"))) -#else -# define SERD_API +// SERD_API must be used to decorate things in the public API +#ifndef SERD_API +# if defined(_WIN32) && !defined(SERD_STATIC) && defined(SERD_INTERNAL) +# define SERD_API __declspec(dllexport) +# elif defined(_WIN32) && !defined(SERD_STATIC) +# define SERD_API __declspec(dllimport) +# elif defined(__GNUC__) +# define SERD_API __attribute__((visibility("default"))) +# else +# define SERD_API +# endif #endif #ifdef __GNUC__ |