ecore: fix Windows build by properly defining EAPI in all case for internal API user.

This commit is contained in:
Cedric BAIL 2016-06-23 10:53:46 -07:00
parent 5983792368
commit c512bb68e7
5 changed files with 42 additions and 7 deletions

View File

@ -70,7 +70,8 @@ lib/ecore/ecore_thread_promise.c \
lib/ecore/ecore_throttle.c \
lib/ecore/ecore_exe.c \
lib/ecore/ecore_exe_private.h \
lib/ecore/ecore_private.h
lib/ecore/ecore_private.h \
lib/ecore/ecore_internal.h
if HAVE_WIN32
lib_ecore_libecore_la_SOURCES += lib/ecore/ecore_exe_win32.c

View File

@ -0,0 +1,36 @@
// Internal header are to be used only inside efl itself.
#ifndef _ECORE_INTERNAL_H
#define _ECORE_INTERNAL_H
#ifdef EAPI
# undef EAPI
#endif
#ifdef _WIN32
# ifdef EFL_ECORE_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif /* ! DLL_EXPORT */
# else
# define EAPI __declspec(dllimport)
# endif /* ! EFL_ECORE_BUILD */
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
#endif /* ! _WIN32 */
EAPI void ecore_loop_arguments_send(int argc, const char **argv);
#undef EAPI
#define EAPI
#endif

View File

@ -3,6 +3,8 @@
#include <assert.h>
#include "ecore_internal.h"
#ifdef EAPI
# undef EAPI
#endif
@ -149,7 +151,6 @@ EAPI void _ecore_magic_fail(const void *d,
Ecore_Magic m,
Ecore_Magic req_m,
const char *fname);
EAPI void ecore_loop_arguments_send(int argc, const char **argv);
void _ecore_time_init(void);

View File

@ -18,6 +18,7 @@
#include <Elementary.h>
#include "elm_priv.h"
#include "ecore_internal.h"
#define SEMI_BROKEN_QUICKLAUNCH 1
@ -322,9 +323,6 @@ _sys_lang_changed(void *data EINA_UNUSED, int type EINA_UNUSED, void *event EINA
return ECORE_CALLBACK_PASS_ON;
}
// To be used here only, do not copy that anywhere else for now.
EAPI void ecore_loop_arguments_send(int argc, const char **argv);
EAPI int
elm_init(int argc, char **argv)
{

View File

@ -4,8 +4,7 @@
#include <Ecore.h>
#include "ecore_suite.h"
EAPI void ecore_loop_arguments_send(int argc, const char **argv);
#include "ecore_private.h"
static const char *args[] = {
"a", "b", "c", "d", "e", "f", "g", "h"