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 a1a506e13e.

See T3423. Thanks @vtorri for the report.
This commit is contained in:
Jean-Philippe Andre 2016-04-07 15:46:47 +09:00
parent 7de2f28b45
commit d03b45f030
1 changed files with 6 additions and 7 deletions

View File

@ -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 */