summaryrefslogtreecommitdiff
path: root/src/lib/eina_module.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/eina_module.c')
-rw-r--r--src/lib/eina_module.c14
1 files changed, 11 insertions, 3 deletions
diff --git a/src/lib/eina_module.c b/src/lib/eina_module.c
index e2ca522..ca02065 100644
--- a/src/lib/eina_module.c
+++ b/src/lib/eina_module.c
@@ -88,6 +88,14 @@ static int EINA_MODULE_LOG_DOM = -1;
#endif
#define DBG(...) EINA_LOG_DOM_DBG(EINA_MODULE_LOG_DOM, __VA_ARGS__)
+#ifdef _WIN32
+# define SEP_C '\\'
+# define SEP_S "\\"
+#else
+# define SEP_C '/'
+# define SEP_S "/"
+#endif
+
#define EINA_MODULE_SYMBOL_INIT "__eina_module_init"
#define EINA_MODULE_SYMBOL_SHUTDOWN "__eina_module_shutdown"
@@ -144,7 +152,7 @@ static void _dir_list_cb(const char *name, const char *path, void *data)
file = alloca(sizeof (char) * length);
- snprintf(file, length, "%s/%s", path, name);
+ snprintf(file, length, "%s" SEP_S "%s", path, name);
m = eina_module_new(file);
if (!m)
{
@@ -169,7 +177,7 @@ static void _dir_arch_list_cb(const char *name, const char *path, void *data)
sizeof(SHARED_LIB_SUFFIX) + 1;
file = alloca(length);
- snprintf(file, length, "%s/%s/%s/module" SHARED_LIB_SUFFIX,
+ snprintf(file, length, "%s" SEP_S "%s" SEP_S "%s" SEP_S "module" SHARED_LIB_SUFFIX,
path, name, (char *)(cb_data->data));
m = eina_module_new(file);
if (!m)
@@ -497,7 +505,7 @@ EAPI char *eina_module_symbol_path_get(const void *symbol, const char *sub_dir)
if (dladdr(symbol, &eina_dl))
{
- char *pos = strrchr(eina_dl.dli_fname, '/');
+ char *pos = strrchr(eina_dl.dli_fname, SEP_C);
if (pos)
{
char *path;