elm: Fix modules due to a missing EAPI

I recently added an undef EAPI which wasn't in fact the best idea ever.
The EAPI needs to remain defined as is for elementary modules and
edje_externals.

Ping @vtorri

See ad6e3ce3df
This commit is contained in:
Jean-Philippe Andre 2017-08-09 17:01:37 +09:00
parent dee61f4097
commit 5d1e959f92
9 changed files with 42 additions and 0 deletions

View File

@ -722,6 +722,7 @@ endif
EXTRA_DIST2 += \
lib/elementary/elm_factory.h \
lib/elementary/elm_factory.c \
lib/elementary/elm_module_helper.h \
$(top_srcdir)/elm_intro.h.in
### Binary

View File

@ -111,6 +111,7 @@ _elm_module_find_as(const char *as)
if (!_elm_module_load(m))
{
ERR("Failed to load elementary module: '%s': %m", m->as);
_elm_module_del(m);
return NULL;
}

View File

@ -0,0 +1,34 @@
/* A small helper header defining EAPI for elementary modules, it should be
* included last in the modules C files.
*/
#ifndef ELM_MODULE_HELPER_H
#define ELM_MODULE_HELPER_H
#ifdef EAPI
# undef EAPI
#endif
#ifdef _WIN32
# ifdef ELEMENTARY_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif /* ! DLL_EXPORT */
# else
# define EAPI __declspec(dllimport)
# endif /* ! EFL_EVAS_BUILD */
#else
# ifdef __GNUC__
# if __GNUC__ >= 4
# define EAPI __attribute__ ((visibility("default")))
# else
# define EAPI
# endif
# else
# define EAPI
# endif
#endif /* ! _WIN32 */
#endif

View File

@ -3,6 +3,7 @@
#endif
#include <Elementary.h>
#include "elm_module_helper.h"
/* to enable this module
export ELM_MODULES="access_output>access/api"

View File

@ -5,6 +5,7 @@
#include <Elementary.h>
#include "elm_widget.h"
#include "efl_ui_clock_private.h"
#include "elm_module_helper.h"
#define CLOCK_FIELD_COUNT 8
#define FIELD_FORMAT_LEN 3

View File

@ -2,6 +2,7 @@
# include "elementary_config.h"
#endif
#include "Elementary.h"
#include "elm_module_helper.h"
#undef CRI
#undef ERR

View File

@ -3,6 +3,7 @@
#endif
#include <Elementary.h>
#include "elm_module_helper.h"
// module api funcs needed
EAPI int

View File

@ -5,6 +5,7 @@
#include "Elementary.h"
#include "elm_widget_map.h"
#include <Eina.h>
#include "elm_module_helper.h"
EAPI Eina_Stringshare *
map_module_source_name_get(void)

View File

@ -9,6 +9,7 @@
#include "elm_priv.h"
#include "elm_widget_web.h"
#include "elm_web_none.eo.h"
#include "elm_module_helper.h"
#define MY_CLASS ELM_WEB_CLASS