From e08aa83a364b67205685eb0485cca09284924519 Mon Sep 17 00:00:00 2001 From: past-due <30942300+past-due@users.noreply.github.com> Date: Thu, 5 Apr 2018 19:50:29 -0400 Subject: [PATCH] `#define UTF8PROC_STATIC` to disable DLLEXPORT `#define UTF8PROC_STATIC` to disable DLLEXPORT --- utf8proc.h | 20 ++++++++++++-------- 1 file changed, 12 insertions(+), 8 deletions(-) diff --git a/utf8proc.h b/utf8proc.h index 64155a1..3e039e6 100644 --- a/utf8proc.h +++ b/utf8proc.h @@ -120,16 +120,20 @@ typedef bool utf8proc_bool; #endif #include -#ifdef _WIN32 -# ifdef UTF8PROC_EXPORTS -# define UTF8PROC_DLLEXPORT __declspec(dllexport) +#ifdef UTF8PROC_STATIC +# define UTF8PROC_DLLEXPORT +#else +# ifdef _WIN32 +# ifdef UTF8PROC_EXPORTS +# define UTF8PROC_DLLEXPORT __declspec(dllexport) +# else +# define UTF8PROC_DLLEXPORT __declspec(dllimport) +# endif +# elif __GNUC__ >= 4 +# define UTF8PROC_DLLEXPORT __attribute__ ((visibility("default"))) # else -# define UTF8PROC_DLLEXPORT __declspec(dllimport) +# define UTF8PROC_DLLEXPORT # endif -#elif __GNUC__ >= 4 -# define UTF8PROC_DLLEXPORT __attribute__ ((visibility("default"))) -#else -# define UTF8PROC_DLLEXPORT #endif #ifdef __cplusplus