summaryrefslogtreecommitdiff
path: root/src/lib
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 /src/lib
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
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/elementary/elm_module.c1
-rw-r--r--src/lib/elementary/elm_module_helper.h34
2 files changed, 35 insertions, 0 deletions
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