aboutsummaryrefslogtreecommitdiffstats
path: root/include/serd
diff options
context:
space:
mode:
authorDavid Robillard <d@drobilla.net>2021-01-02 13:23:00 +0100
committerDavid Robillard <d@drobilla.net>2021-01-02 14:13:19 +0100
commit2f0a55007f9dda3371b7aa42b54b4786740ac0c0 (patch)
treea7a31e5edfc4e51447a26a0aeca12c73aa4c8709 /include/serd
parent4a54d784af0bec03fdc1f9889157a8c653969db9 (diff)
downloadserd-2f0a55007f9dda3371b7aa42b54b4786740ac0c0.tar.gz
serd-2f0a55007f9dda3371b7aa42b54b4786740ac0c0.tar.bz2
serd-2f0a55007f9dda3371b7aa42b54b4786740ac0c0.zip
Use SERD_STATIC instead of SERD_SHARED to control visibility
For consistency, this seems to be the most common convention.
Diffstat (limited to 'include/serd')
-rw-r--r--include/serd/serd.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/include/serd/serd.h b/include/serd/serd.h
index 32a60f29..88cd659a 100644
--- a/include/serd/serd.h
+++ b/include/serd/serd.h
@@ -25,11 +25,11 @@
#include <stdint.h>
#include <stdio.h>
-#if defined(SERD_SHARED) && defined(SERD_INTERNAL) && defined(_WIN32)
+#if defined(_WIN32) && !defined(SERD_STATIC) && defined(SERD_INTERNAL)
# define SERD_API __declspec(dllexport)
-#elif defined(SERD_SHARED) && defined(_WIN32)
+#elif defined(_WIN32) && !defined(SERD_STATIC)
# define SERD_API __declspec(dllimport)
-#elif defined(SERD_SHARED) && defined(__GNUC__)
+#elif defined(__GNUC__)
# define SERD_API __attribute__((visibility("default")))
#else
# define SERD_API