From 98aa1a4eb129278fb1fb23f8db4145a40e5b3abf Mon Sep 17 00:00:00 2001 From: Cedric BAIL Date: Tue, 19 Dec 2017 09:54:45 -0800 Subject: [PATCH] eina: fixup EAPI definition. --- src/lib/eina/eina_internal.h | 42 +++++++++++++++++++++++++++++++++++- 1 file changed, 41 insertions(+), 1 deletion(-) diff --git a/src/lib/eina/eina_internal.h b/src/lib/eina/eina_internal.h index 391ad944f3..acf55fe347 100644 --- a/src/lib/eina/eina_internal.h +++ b/src/lib/eina/eina_internal.h @@ -1,5 +1,5 @@ #ifndef EINA_INTERNAL_H -#define EINA_INTERNAL_H +# define EINA_INTERNAL_H /* * eina_internal.h @@ -8,9 +8,49 @@ * not stable API. */ +#ifdef EAPI +# undef EAPI +#endif + +#ifdef _WIN32 +# ifdef EFL_EINA_BUILD +# ifdef DLL_EXPORT +# define EAPI __declspec(dllexport) +# else +# define EAPI +# endif /* ! DLL_EXPORT */ +# else +# define EAPI __declspec(dllimport) +# endif /* ! EFL_EINA_BUILD */ +# define EAPI_WEAK +#else +# ifdef __GNUC__ +# if __GNUC__ >= 4 +# define EAPI __attribute__ ((visibility("default"))) +# define EAPI_WEAK __attribute__ ((weak)) +# else +# define EAPI +# define EAPI_WEAK +# endif +# else +/** + * @def EAPI + * @brief Used to export functions (by changing visibility). + */ +# define EAPI +# endif +#endif + /** * @brief Cancels all pending promise/futures. + * + * Internal function. Do not use. + * + * @internal */ EAPI void __eina_promise_cancel_all(void); +#undef EAPI +#define EAPI + #endif