From c46936ce487d063310db4ba1219e008f618780d8 Mon Sep 17 00:00:00 2001 From: Connor Olding Date: Sun, 10 Nov 2013 12:42:27 -0800 Subject: [PATCH] move DLL decl to the logical place, clang x86 fix --- crap_util.h | 5 ----- ladspa.h | 8 +++++++- 2 files changed, 7 insertions(+), 6 deletions(-) diff --git a/crap_util.h b/crap_util.h index 1b58ada..9996589 100644 --- a/crap_util.h +++ b/crap_util.h @@ -1,8 +1,3 @@ -#ifdef WIN32 -__declspec(dllexport) const LADSPA_Descriptor * -ladspa_descriptor(unsigned long Index); -#endif - #ifndef M_PI #define M_PI 3.14159265358979323846264338327 #endif diff --git a/ladspa.h b/ladspa.h index ea74cca..439be95 100644 --- a/ladspa.h +++ b/ladspa.h @@ -107,10 +107,16 @@ typedef struct _LADSPA_Descriptor { void (*deactivate)(LADSPA_Handle Instance); void (*cleanup)(LADSPA_Handle Instance); } LADSPA_Descriptor; +#ifdef WIN32 +// weird clang bug workaround +#if (__clang__ != 1) || (_X86_ != 1) +__declspec(dllexport) +#endif +#endif const LADSPA_Descriptor * ladspa_descriptor(unsigned long Index); typedef const LADSPA_Descriptor * (*LADSPA_Descriptor_Function)(unsigned long Index); #ifdef __cplusplus } #endif -#endif +#endif