eina: remove the need to order the header correctly for Windows.

This commit is contained in:
Cedric BAIL 2015-04-28 14:21:27 +02:00
parent 48dea34240
commit 0dfb263a28
3 changed files with 27 additions and 2 deletions

View File

@ -265,6 +265,9 @@ extern "C" {
#include <eina_matrix.h>
#include <eina_crc.h>
#undef EAPI
#define EAPI
#ifdef __cplusplus
}
#endif

View File

@ -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;

View File

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