From 3a9b8e38a146dfdbb618d95f6db8fa919fa2e3e6 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Mon, 19 Dec 2022 18:52:32 -0500 Subject: Allow LILV_API to be defined by the user --- NEWS | 3 ++- include/lilv/lilv.h | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 9 deletions(-) diff --git a/NEWS b/NEWS index dc4b47e..41a7664 100644 --- a/NEWS +++ b/NEWS @@ -1,5 +1,6 @@ lilv (0.24.21) unstable; urgency=medium + * Allow LILV_API to be defined by the user * Clean up code * Clean up inconsistent tool command line interfaces * Convert man pages to mdoc @@ -9,7 +10,7 @@ lilv (0.24.21) unstable; urgency=medium * Replace duplicated dox_to_sphinx script with sphinxygen dependency * Switch to external zix dependency - -- David Robillard Sun, 11 Dec 2022 16:32:26 +0000 + -- David Robillard Mon, 19 Dec 2022 23:52:50 +0000 lilv (0.24.20) stable; urgency=medium diff --git a/include/lilv/lilv.h b/include/lilv/lilv.h index ae2c055..b863a14 100644 --- a/include/lilv/lilv.h +++ b/include/lilv/lilv.h @@ -14,14 +14,17 @@ #include #include -#if defined(_WIN32) && !defined(LILV_STATIC) && defined(LILV_INTERNAL) -# define LILV_API __declspec(dllexport) -#elif defined(_WIN32) && !defined(LILV_STATIC) -# define LILV_API __declspec(dllimport) -#elif defined(__GNUC__) -# define LILV_API __attribute__((visibility("default"))) -#else -# define LILV_API +// LILV_API must be used to decorate things in the public API +#ifndef LILV_API +# if defined(_WIN32) && !defined(LILV_STATIC) && defined(LILV_INTERNAL) +# define LILV_API __declspec(dllexport) +# elif defined(_WIN32) && !defined(LILV_STATIC) +# define LILV_API __declspec(dllimport) +# elif defined(__GNUC__) +# define LILV_API __attribute__((visibility("default"))) +# else +# define LILV_API +# endif #endif #if defined(__GNUC__) && \ -- cgit v1.2.1