fix compilation with cegcc and minor fixing

* COPYING:
copyright update

* configure.ac:
* src/lib/Evil.h:
* src/lib/dlfcn/dlfcn.h:
* src/lib/mman/sys/mman.h:
define EFL_EVIL_BUILD in config.h for managing correctly EAPI

* src/bin/test_pipe.c:
stdio.h is needed after winsock2.h for mingw32ce

* src/lib/dlfcn/dlfcn.c (get_last_error), (dlopen), (dlsym):
* src/lib/evil.c:
fix some heafer files inclusion on cegc platform.
first step of mingw32ce support

* src/lib/mman/mman.c:
define _get_osfhandle for mingw32ce


SVN revision: 33934
This commit is contained in:
doursse 2008-03-05 09:19:38 +00:00 committed by doursse
parent b9c073d25f
commit ff821bdc93
10 changed files with 77 additions and 28 deletions

View File

@ -1,4 +1,4 @@
Copyright (C) 2000 Carsten Haitzler and various contributors (see AUTHORS)
Copyright (C) 2008 Vincent Torri and various contributors (see AUTHORS)
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to

View File

@ -1,3 +1,27 @@
2008-03-05 Vincent Torri <doursse at users dot sf dot net>
fix compilation with cegcc and minor fixing
* COPYING:
copyright update
* configure.ac:
* src/lib/Evil.h:
* src/lib/dlfcn/dlfcn.h:
* src/lib/mman/sys/mman.h:
define EFL_EVIL_BUILD in config.h for managing correctly EAPI
* src/bin/test_pipe.c:
stdio.h is needed after winsock2.h for mingw32ce
* src/lib/dlfcn/dlfcn.c (get_last_error), (dlopen), (dlsym):
* src/lib/evil.c:
fix some heafer files inclusion on cegc platform.
first step of mingw32ce support
* src/lib/mman/mman.c:
define _get_osfhandle for mingw32ce
2008-03-03 Vincent Torri <doursse at users dot sf dot net>
* COPYING:

View File

@ -9,7 +9,7 @@ dnl If the host is not windows, we exit,
dnl otherwise, we set the correct flags
dnl for each platform.
mingw_libs=""
cegcc_libs=""
cegcc_cflags=""
case "$host_os" in
mingw|mingw32)
mingw_libs="-lole32 -luuid -lws2_32"
@ -26,6 +26,9 @@ win32_libs="${mingw_libs}"
AC_SUBST(win32_cflags)
AC_SUBST(win32_libs)
dnl needed for correct definition of EAPI
AC_DEFINE(EFL_EVIL_BUILD, 1, [Define to mention that evil is built])
AM_INIT_AUTOMAKE(1.6 dist-bzip2)
AC_LIBTOOL_WIN32_DLL

View File

@ -1,9 +1,9 @@
#include <stdio.h>
# define WIN32_LEAN_AND_MEAN
# include <winsock2.h>
# undef WIN32_LEAN_AND_MEAN
#include <stdio.h>
#include "Evil.h"
#define FDREAD 0

View File

@ -6,11 +6,15 @@
#endif /* EAPI */
#ifdef _WIN32
# ifdef EFL_EVIL_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif /* ! DLL_EXPORT */
# else
# define EAPI __declspec(dllimport)
# endif
# endif /* ! EFL_EVIL_BUILD */
#endif /* _WIN32 */
#ifdef __cplusplus

View File

@ -4,6 +4,10 @@
#include <windows.h>
#undef WIN32_LEAN_AND_MEAN
#ifdef __MINGW32CE__
# include <limits.h>
#endif /* __MINGW32CE__ */
#ifdef HAVE_CONFIG_H
# include "config.h"
#endif /* HAVE_CONFIG_H */
@ -18,7 +22,7 @@
static char *dl_err = NULL;
static int dl_err_viewed = 0;
#ifdef __CEGCC__
#if defined(__CEGCC__) || defined(__MINGW32CE__)
static wchar_t *
string_to_wchar(const char *text)
@ -61,8 +65,7 @@ wchar_to_string(const wchar_t *text)
return atext;
}
#endif /* __CEGCC__ */
#endif /* __CEGCC__ || __MINGW32CE__ */
static void
get_last_error(char *desc)
@ -79,11 +82,11 @@ get_last_error(char *desc)
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
(LPTSTR)&str, 0, NULL);
#ifdef __CEGCC__
#if defined(__CEGCC__) || defined(__MINGW32CE__)
str2 = wchar_to_string(str);
#else
str2 = str;
#endif /* __CEGCC__ */
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
l1 = strlen(desc);
l2 = strlen(str2);
@ -139,7 +142,7 @@ dlopen(const char* path, int mode __UNUSED__)
else
new_path[i] = path[i];
}
#ifdef __CEGCC__
#if defined(__CEGCC__) || defined(__MINGW32CE__)
{
wchar_t *wpath;
@ -151,7 +154,7 @@ dlopen(const char* path, int mode __UNUSED__)
#else
module = LoadLibraryEx(new_path, NULL,
LOAD_WITH_ALTERED_SEARCH_PATH);
#endif /* __CEGCC__ */
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
if (!module)
get_last_error("LoadLibraryEx returned: ");
@ -178,7 +181,7 @@ dlsym(void *handle, const char *symbol)
{
FARPROC fp;
#ifdef __CEGCC__
#if defined(__CEGCC__) || defined(__MINGW32CE__)
{
wchar_t *wsymbol;
@ -188,7 +191,7 @@ dlsym(void *handle, const char *symbol)
}
#else
fp = GetProcAddress(handle, symbol);
#endif /* __CEGCC__ */
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
if (!fp)
get_last_error("GetProcAddress returned: ");

View File

@ -6,17 +6,22 @@
#endif /* EAPI */
#ifdef _WIN32
# ifdef EFL_EVIL_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif /* ! DLL_EXPORT */
# else
# define EAPI __declspec(dllimport)
# endif
# endif /* ! EFL_EVIL_BUILD */
#endif /* _WIN32 */
#ifdef __cplusplus
extern "C" {
#endif
/**
* @def RTLD_LAZY
* Lazy function call binding

View File

@ -1,16 +1,20 @@
#include <stdio.h>
#ifndef __CEGCC__
# include <errno.h>
#define WIN32_LEAN_AND_MEAN
#include <winsock2.h>
#undef WIN32_LEAN_AND_MEAN
#ifndef __CEGCC__
# include <errno.h>
# include <sys/locking.h>
# include <io.h>
# include <share.h>
# include <shlobj.h>
# include <objidl.h>
#endif /* ! __CEGCC__ */
#else
# include <sys/syslimits.h>
#endif /* __CEGCC__ */
#include <sys/types.h>
#include <sys/timeb.h>
#include <fcntl.h>

View File

@ -20,10 +20,12 @@
# define __UNUSED__
#endif /* HAVE___ATTRIBUTE__ */
#ifdef __CEGCC__
#if defined(__CEGCC__)
# define CreateFileMapping CreateFileMappingW
# define _get_osfhandle get_osfhandle
#endif /* __CEGCC__ */
elif defined (__MINGW32CE__)
# define _get_osfhandle(FILEDES) ((long)FILEDES)
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
void *

View File

@ -6,11 +6,15 @@
#endif /* EAPI */
#ifdef _WIN32
# ifdef EFL_EVIL_BUILD
# ifdef DLL_EXPORT
# define EAPI __declspec(dllexport)
# else
# define EAPI
# endif /* ! DLL_EXPORT */
# else
# define EAPI __declspec(dllimport)
# endif
# endif /* ! EFL_EVIL_BUILD */
#endif /* _WIN32 */
#ifdef __cplusplus