diff options
author | Cedric BAIL <cedric@osg.samsung.com> | 2015-04-28 14:21:27 +0200 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2015-05-07 09:53:10 +0200 |
commit | 0dfb263a28691f70dd4fe385e2bdbe2b65cdbcf9 (patch) | |
tree | a0136224b256de6636f2a84b913707ea17eaee85 | |
parent | 48dea342409fffcdd824b5d0ed00a180782b3459 (diff) | |
download | efl-0dfb263a28691f70dd4fe385e2bdbe2b65cdbcf9.tar.gz |
eina: remove the need to order the header correctly for Windows.
-rw-r--r-- | src/lib/eina/Eina.h | 3 | ||||
-rw-r--r-- | src/lib/eina/eina_module.h | 4 | ||||
-rw-r--r-- | src/lib/eina/eina_types.h | 22 |
3 files changed, 27 insertions, 2 deletions
diff --git a/src/lib/eina/Eina.h b/src/lib/eina/Eina.h index 672c094313..b0b24ee09e 100644 --- a/src/lib/eina/Eina.h +++ b/src/lib/eina/Eina.h @@ -265,6 +265,9 @@ extern "C" { #include <eina_matrix.h> #include <eina_crc.h> +#undef EAPI +#define EAPI + #ifdef __cplusplus } #endif diff --git a/src/lib/eina/eina_module.h b/src/lib/eina/eina_module.h index 834dfa8d83..d1030b9681 100644 --- a/src/lib/eina/eina_module.h +++ b/src/lib/eina/eina_module.h @@ -96,14 +96,14 @@ typedef void (*Eina_Module_Shutdown)(void); * declares the given function as the module initializer (__eina_module_init). * It must be of signature #Eina_Module_Init */ -#define EINA_MODULE_INIT(f) EAPI Eina_Module_Init __eina_module_init = &f +#define EINA_MODULE_INIT(f) EXPORTAPI Eina_Module_Init __eina_module_init = &f /** * @def EINA_MODULE_SHUTDOWN * declares the given function as the module shutdownializer * (__eina_module_shutdown). It must be of signature #Eina_Module_Shutdown */ -#define EINA_MODULE_SHUTDOWN(f) EAPI Eina_Module_Shutdown __eina_module_shutdown = &f +#define EINA_MODULE_SHUTDOWN(f) EXPORTAPI Eina_Module_Shutdown __eina_module_shutdown = &f extern EAPI Eina_Error EINA_ERROR_WRONG_MODULE; extern EAPI Eina_Error EINA_ERROR_MODULE_INIT_FAILED; diff --git a/src/lib/eina/eina_types.h b/src/lib/eina/eina_types.h index 0c92ae414d..2e0c4d789f 100644 --- a/src/lib/eina/eina_types.h +++ b/src/lib/eina/eina_types.h @@ -61,6 +61,28 @@ # endif #endif +#ifdef _WIN32 +# ifdef DLL_EXPORT +# define EXPORTAPI __declspec(dllexport) +# else +# define EXPORTAPI +# endif /* ! DLL_EXPORT */ +#else +# ifdef __GNUC__ +# if __GNUC__ >= 4 +# define EXPORTAPI __attribute__ ((visibility("default"))) +# else +# define EXPORTAPI +# endif +# else +/** + * @def EAPI + * @brief Used to export functions(by changing visibility). + */ +# define EXPORTAPI +# endif +#endif + #include "eina_config.h" #ifdef EINA_UNUSED |