From 0e9afe968a0ca9bd79868168a939950e156c441d Mon Sep 17 00:00:00 2001 From: Andreas Gravgaard Andersen Date: Tue, 28 Sep 2021 09:09:08 +0200 Subject: [PATCH] ENH: re-apply ITK symbol export definitions BUG: avoid redefining definition --- Modules/ThirdParty/Expat/src/expat/expat.h | 12 ++++++++++++ Modules/ThirdParty/Expat/src/expat/expat_external.h | 2 -- 2 files changed, 12 insertions(+), 2 deletions(-) diff --git a/Modules/ThirdParty/Expat/src/expat/expat.h b/Modules/ThirdParty/Expat/src/expat/expat.h index b7d6d354801..574f1bea803 100644 --- a/Modules/ThirdParty/Expat/src/expat/expat.h +++ b/Modules/ThirdParty/Expat/src/expat/expat.h @@ -43,6 +43,18 @@ #include #include "expat_external.h" +#include "expatDllConfig.h" + +#if defined(_WIN32) && !defined(ITK_EXPAT_STATIC) +# if defined(ITKEXPAT_EXPORTS) +# define XMLPARSEAPI(type) __declspec( dllexport ) type __cdecl +# else +# define XMLPARSEAPI(type) __declspec( dllimport ) type __cdecl +# endif +#else +# define XMLPARSEAPI(type) type +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/Modules/ThirdParty/Expat/src/expat/expat_external.h b/Modules/ThirdParty/Expat/src/expat/expat_external.h index 8829f770910..851e1d5008a 100644 --- a/Modules/ThirdParty/Expat/src/expat/expat_external.h +++ b/Modules/ThirdParty/Expat/src/expat/expat_external.h @@ -122,8 +122,6 @@ # define XML_ATTR_ALLOC_SIZE(x) #endif -#define XMLPARSEAPI(type) XMLIMPORT type XMLCALL - #ifdef __cplusplus extern "C" { #endif