summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJean-Philippe Andre <jp.andre@samsung.com>2017-08-09 17:01:37 +0900
committerJean-Philippe Andre <jp.andre@samsung.com>2017-08-09 17:08:24 +0900
commit5d1e959f92e14f1aa45f3c225d8351041125039b (patch)
tree442b2140449a6038a82eb27387b482411152b9fb
parentdee61f40973071bab093f2f81109a7f2d5ff4097 (diff)
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 ad6e3ce3df422751cb1c4524f1ea0b16ce897410
-rw-r--r--src/Makefile_Elementary.am1
-rw-r--r--src/lib/elementary/elm_module.c1
-rw-r--r--src/lib/elementary/elm_module_helper.h34
-rw-r--r--src/modules/elementary/access_output/mod.c1
-rw-r--r--src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c1
-rw-r--r--src/modules/elementary/prefs/private.h1
-rw-r--r--src/modules/elementary/test_entry/mod.c1
-rw-r--r--src/modules/elementary/test_map/mod.c1
-rw-r--r--src/modules/elementary/web/none/elm_web_none.c1
9 files changed, 42 insertions, 0 deletions
diff --git a/src/Makefile_Elementary.am b/src/Makefile_Elementary.am
index fcdc7b4f5c..ea7ef0603d 100644
--- a/src/Makefile_Elementary.am
+++ b/src/Makefile_Elementary.am
@@ -722,6 +722,7 @@ endif
722EXTRA_DIST2 += \ 722EXTRA_DIST2 += \
723 lib/elementary/elm_factory.h \ 723 lib/elementary/elm_factory.h \
724 lib/elementary/elm_factory.c \ 724 lib/elementary/elm_factory.c \
725 lib/elementary/elm_module_helper.h \
725 $(top_srcdir)/elm_intro.h.in 726 $(top_srcdir)/elm_intro.h.in
726 727
727### Binary 728### Binary
diff --git a/src/lib/elementary/elm_module.c b/src/lib/elementary/elm_module.c
index 03f70dc032..92557b1d50 100644
--- a/src/lib/elementary/elm_module.c
+++ b/src/lib/elementary/elm_module.c
@@ -111,6 +111,7 @@ _elm_module_find_as(const char *as)
111 111
112 if (!_elm_module_load(m)) 112 if (!_elm_module_load(m))
113 { 113 {
114 ERR("Failed to load elementary module: '%s': %m", m->as);
114 _elm_module_del(m); 115 _elm_module_del(m);
115 return NULL; 116 return NULL;
116 } 117 }
diff --git a/src/lib/elementary/elm_module_helper.h b/src/lib/elementary/elm_module_helper.h
new file mode 100644
index 0000000000..f4e7d22a99
--- /dev/null
+++ b/src/lib/elementary/elm_module_helper.h
@@ -0,0 +1,34 @@
1/* A small helper header defining EAPI for elementary modules, it should be
2 * included last in the modules C files.
3 */
4
5#ifndef ELM_MODULE_HELPER_H
6#define ELM_MODULE_HELPER_H
7
8#ifdef EAPI
9# undef EAPI
10#endif
11
12#ifdef _WIN32
13# ifdef ELEMENTARY_BUILD
14# ifdef DLL_EXPORT
15# define EAPI __declspec(dllexport)
16# else
17# define EAPI
18# endif /* ! DLL_EXPORT */
19# else
20# define EAPI __declspec(dllimport)
21# endif /* ! EFL_EVAS_BUILD */
22#else
23# ifdef __GNUC__
24# if __GNUC__ >= 4
25# define EAPI __attribute__ ((visibility("default")))
26# else
27# define EAPI
28# endif
29# else
30# define EAPI
31# endif
32#endif /* ! _WIN32 */
33
34#endif
diff --git a/src/modules/elementary/access_output/mod.c b/src/modules/elementary/access_output/mod.c
index 0dff159885..e304c2ecae 100644
--- a/src/modules/elementary/access_output/mod.c
+++ b/src/modules/elementary/access_output/mod.c
@@ -3,6 +3,7 @@
3#endif 3#endif
4 4
5#include <Elementary.h> 5#include <Elementary.h>
6#include "elm_module_helper.h"
6 7
7/* to enable this module 8/* to enable this module
8export ELM_MODULES="access_output>access/api" 9export ELM_MODULES="access_output>access/api"
diff --git a/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c b/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c
index 95f123224b..b3b90b6f20 100644
--- a/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c
+++ b/src/modules/elementary/clock_input_ctxpopup/clock_input_ctxpopup.c
@@ -5,6 +5,7 @@
5#include <Elementary.h> 5#include <Elementary.h>
6#include "elm_widget.h" 6#include "elm_widget.h"
7#include "efl_ui_clock_private.h" 7#include "efl_ui_clock_private.h"
8#include "elm_module_helper.h"
8 9
9#define CLOCK_FIELD_COUNT 8 10#define CLOCK_FIELD_COUNT 8
10#define FIELD_FORMAT_LEN 3 11#define FIELD_FORMAT_LEN 3
diff --git a/src/modules/elementary/prefs/private.h b/src/modules/elementary/prefs/private.h
index f65370bedf..197162d5d5 100644
--- a/src/modules/elementary/prefs/private.h
+++ b/src/modules/elementary/prefs/private.h
@@ -2,6 +2,7 @@
2# include "elementary_config.h" 2# include "elementary_config.h"
3#endif 3#endif
4#include "Elementary.h" 4#include "Elementary.h"
5#include "elm_module_helper.h"
5 6
6#undef CRI 7#undef CRI
7#undef ERR 8#undef ERR
diff --git a/src/modules/elementary/test_entry/mod.c b/src/modules/elementary/test_entry/mod.c
index 623cb48609..621f40a32a 100644
--- a/src/modules/elementary/test_entry/mod.c
+++ b/src/modules/elementary/test_entry/mod.c
@@ -3,6 +3,7 @@
3#endif 3#endif
4 4
5#include <Elementary.h> 5#include <Elementary.h>
6#include "elm_module_helper.h"
6 7
7// module api funcs needed 8// module api funcs needed
8EAPI int 9EAPI int
diff --git a/src/modules/elementary/test_map/mod.c b/src/modules/elementary/test_map/mod.c
index 9dfc352b5b..fd5dcdb03e 100644
--- a/src/modules/elementary/test_map/mod.c
+++ b/src/modules/elementary/test_map/mod.c
@@ -5,6 +5,7 @@
5#include "Elementary.h" 5#include "Elementary.h"
6#include "elm_widget_map.h" 6#include "elm_widget_map.h"
7#include <Eina.h> 7#include <Eina.h>
8#include "elm_module_helper.h"
8 9
9EAPI Eina_Stringshare * 10EAPI Eina_Stringshare *
10map_module_source_name_get(void) 11map_module_source_name_get(void)
diff --git a/src/modules/elementary/web/none/elm_web_none.c b/src/modules/elementary/web/none/elm_web_none.c
index a371e7945f..91292e0bd4 100644
--- a/src/modules/elementary/web/none/elm_web_none.c
+++ b/src/modules/elementary/web/none/elm_web_none.c
@@ -9,6 +9,7 @@
9#include "elm_priv.h" 9#include "elm_priv.h"
10#include "elm_widget_web.h" 10#include "elm_widget_web.h"
11#include "elm_web_none.eo.h" 11#include "elm_web_none.eo.h"
12#include "elm_module_helper.h"
12 13
13#define MY_CLASS ELM_WEB_CLASS 14#define MY_CLASS ELM_WEB_CLASS
14 15