Enlightenment CVS committal
Author : doursse
Project : e17
Module : libs/evas
Dir : e17/libs/evas/src/lib/file
Modified Files:
Makefile.am evas_module.c
Log Message:
* Remove Windows code in evas_module.c and use evilness instead
* Allow Windows Mobile to correctly load dll's
* Use correct scheme for EAPI on Windows and include config.h when necessary
* add -mwin32 to compiler flags when compiling with cegcc
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/file/Makefile.am,v
retrieving revision 1.11
retrieving revision 1.12
diff -u -3 -r1.11 -r1.12
--- Makefile.am 4 Nov 2007 09:21:45 -0000 1.11
+++ Makefile.am 14 Mar 2008 16:49:47 -0000 1.12
@@ -7,11 +7,12 @@
-DPACKAGE_BIN_DIR=\"$(bindir)\" \
-DPACKAGE_LIB_DIR=\"$(libdir)\" \
-DPACKAGE_DATA_DIR=\"$(datadir)/$(PACKAGE)\" \
- @FREETYPE_CFLAGS@
+ @FREETYPE_CFLAGS@ \
+ @EVIL_CFLAGS@ @WIN32_CFLAGS@
noinst_LTLIBRARIES = libevas_file.la
libevas_file_la_SOURCES = \
evas_path.c \
evas_module.c
-
+libevas_file_la_LIBADD = @EVIL_LIBS@
libevas_file_la_DEPENDENCIES = $(top_builddir)/config.h
===================================================================
RCS file: /cvs/e/e17/libs/evas/src/lib/file/evas_module.c,v
retrieving revision 1.29
retrieving revision 1.30
diff -u -3 -r1.29 -r1.30
--- evas_module.c 26 Jan 2008 06:01:00 -0000 1.29
+++ evas_module.c 14 Mar 2008 16:49:47 -0000 1.30
@@ -5,86 +5,11 @@
#endif
#include <dirent.h> /* DIR, dirent */
-#ifdef _WIN32
-# include <windows.h>
-# include <stdlib.h>
-# include <stdio.h>
-#else
-# include <dlfcn.h> /* dlopen,dlclose,etc */
-#endif
+#include <dlfcn.h> /* dlopen,dlclose,etc */
#include <evas_common.h>
#include <evas_private.h>
-/* FIXME: that hack is a temporary one. That code will be in MinGW soon */
-#ifdef _WIN32
-
-# define RTLD_LAZY 1 /* lazy function call binding */
-# define RTLD_NOW 2 /* immediate function call binding */
-# define RTLD_GLOBAL 4 /* symbols in this dlopen'ed obj are visible
- to other dlopen'ed objs */
-
-static char *dlerr_ptr;
-static char dlerr_data[80];
-
-void *dlopen (const char *file, int mode)
-{
- HMODULE hmodule;
-
- hmodule = LoadLibrary(file);
- if (hmodule == NULL) {
- int error;
-
- error = GetLastError();
- sprintf(dlerr_data, "LoadLibraryEx returned %d.", error);
- dlerr_ptr = dlerr_data;
- }
- return hmodule;
-}
-
-int dlclose (void *handle)
-{
- if (FreeLibrary(handle)) {
- return 0;
- }
- else {
- int error;
-
- error = GetLastError();
- sprintf(dlerr_data, "FreeLibrary returned %d.", error);
- dlerr_ptr = dlerr_data;
- return -1;
- }
-}
-
-void *dlsym (void *handle, const char *name)
-{
- FARPROC fp;
-
- fp = GetProcAddress(handle, name);
- if (fp == NULL) {
- int error;
-
- error = GetLastError();
- sprintf(dlerr_data, "GetProcAddress returned %d.", error);
- dlerr_ptr = dlerr_data;
- }
- return fp;
-}
-
-char *dlerror (void)
-{
- if (dlerr_ptr != NULL) {
- dlerr_ptr = NULL;
- return dlerr_data;
- }
- else {
- return NULL;
- }
-}
-
-#endif /* _WIN32 */
-
Evas_List *evas_modules = NULL;
static Evas_List *evas_module_paths = NULL;
@@ -311,7 +236,21 @@
if (em->loaded) return 1;
/* printf("LOAD %s\n", em->name); */
-#ifdef _WIN32
+#if defined(__CEGCC__) || defined(__MINGW32CE__)
+ switch (em->type) {
+ case EVAS_MODULE_TYPE_IMAGE_SAVER:
+ snprintf(buf, sizeof(buf), "%s/%s/%s/saver_%s.dll", em->path,
em->name, MODULE_ARCH, em->name);
+ break;
+ case EVAS_MODULE_TYPE_IMAGE_LOADER:
+ snprintf(buf, sizeof(buf), "%s/%s/%s/loader_%s.dll", em->path,
em->name, MODULE_ARCH, em->name);
+ break;
+ case EVAS_MODULE_TYPE_ENGINE:
+ snprintf(buf, sizeof(buf), "%s/%s/%s/engine_%s.dll", em->path,
em->name, MODULE_ARCH, em->name);
+ break;
+ default:
+ snprintf(buf, sizeof(buf), "%s/%s/%s/object_%s.dll", em->path,
em->name, MODULE_ARCH, em->name);
+ }
+#elif _WIN32
snprintf(buf, sizeof(buf), "%s/%s/%s/module.dll", em->path, em->name,
MODULE_ARCH);
#else
snprintf(buf, sizeof(buf), "%s/%s/%s/module.so", em->path, em->name,
MODULE_ARCH);
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
enlightenment-cvs mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/enlightenment-cvs