use 'dll' extension on Windows.

SVN revision: 35704
This commit is contained in:
Vincent Torri 2008-08-28 06:49:04 +00:00
parent 4336fb3658
commit 29313e097f
1 changed files with 22 additions and 7 deletions

View File

@ -20,19 +20,29 @@
# include "config.h" # include "config.h"
#endif #endif
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <dlfcn.h>
#include "eina_module.h" #include "eina_module.h"
#include "eina_file.h" #include "eina_file.h"
#include "eina_private.h" #include "eina_private.h"
#include "eina_inlist.h" #include "eina_inlist.h"
#include <sys/types.h>
#include <dirent.h>
#include <string.h>
#include <dlfcn.h>
/*============================================================================* /*============================================================================*
* Local * * 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_SUBDIR "/modules/"
#define MODULE_BASE_EXTENTION "module" #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); free(module);
} }
/**
* @endcond
*/
/*============================================================================* /*============================================================================*
* Global * * Global *
*============================================================================*/ *============================================================================*/
@ -278,11 +292,12 @@ eina_module_init(void)
} }
} }
#else #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) if (self_name)
{ {
strcpy(self_name, PACKAGE_LIB_DIR); strcpy(self_name, PACKAGE_LIB_DIR);
strcat(self_name, "/libeina.so"); strcat(self_name, "/libeina");
strcat(self_name, MODULE_EXTENSION);
} }
#endif #endif