From 29313e097fc7da4d7c5a2ff9f6d028e7ec5f5fbf Mon Sep 17 00:00:00 2001 From: Vincent Torri Date: Thu, 28 Aug 2008 06:49:04 +0000 Subject: [PATCH] use 'dll' extension on Windows. SVN revision: 35704 --- legacy/eina/src/lib/eina_module.c | 29 ++++++++++++++++++++++------- 1 file changed, 22 insertions(+), 7 deletions(-) diff --git a/legacy/eina/src/lib/eina_module.c b/legacy/eina/src/lib/eina_module.c index fcd795f566..20c3c687cf 100644 --- a/legacy/eina/src/lib/eina_module.c +++ b/legacy/eina/src/lib/eina_module.c @@ -20,19 +20,29 @@ # include "config.h" #endif +#include +#include +#include +#include + #include "eina_module.h" #include "eina_file.h" #include "eina_private.h" #include "eina_inlist.h" -#include -#include -#include -#include /*============================================================================* * Local * *============================================================================*/ -#define MODULE_EXTENSION ".so" + +/** + * @cond LOCAL + */ + +#ifdef _WIN32 +# define MODULE_EXTENSION ".so" +#else +# define MODULE_EXTENSION ".dll" +#endif /* ! _WIN32 */ #define MODULE_SUBDIR "/modules/" #define MODULE_BASE_EXTENTION "module" @@ -208,6 +218,10 @@ _eina_dir_module_cb(const char *name, const char *path, Eina_Dir_List *data) free(module); } +/** + * @endcond + */ + /*============================================================================* * Global * *============================================================================*/ @@ -278,11 +292,12 @@ eina_module_init(void) } } #else - self_name = malloc(strlen(PACKAGE_LIB_DIR) + strlen("/libeina.so") + 1); + self_name = malloc(strlen(PACKAGE_LIB_DIR) + strlen("/libeina") + strlen(MODULE_EXTENSION) + 1); if (self_name) { strcpy(self_name, PACKAGE_LIB_DIR); - strcat(self_name, "/libeina.so"); + strcat(self_name, "/libeina"); + strcat(self_name, MODULE_EXTENSION); } #endif