From 743cff2cedfaf873bb502726db8dc39e22649b55 Mon Sep 17 00:00:00 2001 From: doursse Date: Thu, 13 Mar 2008 17:46:53 +0000 Subject: [PATCH] Fix dlopen for cegcc and minor fix and doc: * INSTALL: * README: additional notes for compilations with cegcc or mingw32ce * configure.ac: use 'win32' instead of 'cegcc' or 'mingw' * src/lib/dlfcn/dlfcn.c (dlopen): cegcc does not support LOAD_WITH_ALTERED_SEARCH_PATH. Use LoadLibrary instead of LoadLibraryEx in that case. SVN revision: 34014 --- legacy/evil/ChangeLog | 13 +++++++++++++ legacy/evil/INSTALL | 23 +++++++++++++++++++++++ legacy/evil/README | 5 +++++ legacy/evil/configure.ac | 14 ++++++++------ legacy/evil/src/lib/dlfcn/dlfcn.c | 3 +-- 5 files changed, 50 insertions(+), 8 deletions(-) diff --git a/legacy/evil/ChangeLog b/legacy/evil/ChangeLog index e1a4c02452..2cd00ac3d4 100644 --- a/legacy/evil/ChangeLog +++ b/legacy/evil/ChangeLog @@ -1,3 +1,16 @@ +2008-03-13 Vincent Torri + + * INSTALL: + * README: + additional notes for compilations with cegcc or mingw32ce + + * configure.ac: + use 'win32' instead of 'cegcc' or 'mingw' + + * src/lib/dlfcn/dlfcn.c (dlopen): + cegcc does not support LOAD_WITH_ALTERED_SEARCH_PATH. + Use LoadLibrary instead of LoadLibraryEx in that case. + 2008-03-05 Vincent Torri * src/lib/Evil.h: diff --git a/legacy/evil/INSTALL b/legacy/evil/INSTALL index d3c5b40a94..009d903575 100644 --- a/legacy/evil/INSTALL +++ b/legacy/evil/INSTALL @@ -235,3 +235,26 @@ an Autoconf bug. Until the bug is fixed you can use this workaround: `configure' also accepts some other, not widely useful, options. Run `configure --help' for more details. +================================================================================ + +NOTE: For compilation with mingw32ce, run configure with the option + +--host=arm-wince-mingw32ce + +NOTE: For compilation with cegcc, you have to do the following steps: + +1) After having run autogen.sh, add in config.sub file: + + cegcc) + basic_machine=arm-unknown + os=-cegcc + ;; + +after the mingw32ce case + +2) in config.sub, add -cegcc* after -pe*. You should have a line like: + | -cygwin* | -pe* | -cegcc* | -psos* | -moss* | -proelf* | -rtems* \ + +3) run configure with the option + +--host=arm-wince-cegcc diff --git a/legacy/evil/README b/legacy/evil/README index 171f0ad55b..47c3fea54a 100644 --- a/legacy/evil/README +++ b/legacy/evil/README @@ -3,6 +3,11 @@ The Evil library tried to port some convenient Unix functions to the Windows (XP, maybe below, or Mobile) platform. They are planned to be used in the Enlightenment Fundations Libaries. +To get informations on how to install that library, see the +INSTALL file. For mingw32ce or cegcc users, look at the end +of that INSTALL file to have precise informations on how to +configure the library. + To get the description of the API, behavior, etc.. run doxygen.exe in the top level directory, then open in your favorite browser named Firefox the file index.html located in diff --git a/legacy/evil/configure.ac b/legacy/evil/configure.ac index faed1b3a30..27393195ca 100644 --- a/legacy/evil/configure.ac +++ b/legacy/evil/configure.ac @@ -8,21 +8,23 @@ AC_CANONICAL_HOST dnl If the host is not windows, we exit, dnl otherwise, we set the correct flags dnl for each platform. -mingw_libs="" -cegcc_cflags="" +win32_libs="" +win32_cflags="" case "$host_os" in mingw|mingw32) - mingw_libs="-lole32 -luuid -lws2_32" + win32_libs="-lole32 -luuid -lws2_32" ;; cegcc) - cegcc_cflags="-mwin32" + win32_cflags="-mwin32" + win32_libs="-lws2" + ;; + mingw32ce) + win32_libs="-lws2" ;; *) AC_MSG_ERROR([OS must be Windows. Exiting...]) ;; esac -win32_cflags="${cegcc_cflags}" -win32_libs="${mingw_libs}" AC_SUBST(win32_cflags) AC_SUBST(win32_libs) diff --git a/legacy/evil/src/lib/dlfcn/dlfcn.c b/legacy/evil/src/lib/dlfcn/dlfcn.c index a84e1e583c..6459fa6e93 100644 --- a/legacy/evil/src/lib/dlfcn/dlfcn.c +++ b/legacy/evil/src/lib/dlfcn/dlfcn.c @@ -147,8 +147,7 @@ dlopen(const char* path, int mode __UNUSED__) wchar_t *wpath; wpath = string_to_wchar(new_path); - module = LoadLibraryEx(wpath, NULL, - LOAD_WITH_ALTERED_SEARCH_PATH); + module = LoadLibrary(wpath); free(wpath); } #else