From d03b45f030ea1bf2fd515b179f5b81ef573de8a8 Mon Sep 17 00:00:00 2001 From: Jean-Philippe Andre Date: Thu, 7 Apr 2016 15:46:47 +0900 Subject: [PATCH] Eo: Try to fix windows build For windows, EAPI needs to be redefined as dllexport/dllimport. Since we marked all EO APIs as weak, we had two different EAPI macros: EAPI and EWAPI. Unfortunately, EWAPI was never redefined (only declared inside Eo.h). See also a1a506e13e276d8ef6e522ae9. See T3423. Thanks @vtorri for the report. --- src/lib/eo/Eo.h | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/src/lib/eo/Eo.h b/src/lib/eo/Eo.h index f964507dd3..c132bf3ff1 100644 --- a/src/lib/eo/Eo.h +++ b/src/lib/eo/Eo.h @@ -11,33 +11,32 @@ #define EOLIAN /* When used, it indicates that the function is an Eo API. */ -#define EOAPI EWAPI +#define EOAPI EAPI EAPI_WEAK +#define EWAPI EAPI EAPI_WEAK #ifdef _WIN32 # ifdef EFL_EO_BUILD # ifdef DLL_EXPORT # define EAPI __declspec(dllexport) -# define EWAPI __declspec(dllexport) # else # define EAPI -# define EWAPI # endif /* ! DLL_EXPORT */ # else # define EAPI __declspec(dllimport) -# define EWAPI __declspec(dllimport) # endif /* ! EFL_EO_BUILD */ +# define EAPI_WEAK #else # ifdef __GNUC__ # if __GNUC__ >= 4 # define EAPI __attribute__ ((visibility("default"))) -# define EWAPI __attribute__ ((visibility("default"))) __attribute__ ((weak)) +# define EAPI_WEAK __attribute__ ((weak)) # else # define EAPI -# define EWAPI +# define EAPI_WEAK # endif # else # define EAPI -# define EWAPI +# define EAPI_WEAK # endif #endif /* ! _WIN32 */