forked from enlightenment/efl
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:
parent
b9c073d25f
commit
ff821bdc93
|
@ -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
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||||
of this software and associated documentation files (the "Software"), to
|
of this software and associated documentation files (the "Software"), to
|
||||||
|
|
|
@ -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>
|
2008-03-03 Vincent Torri <doursse at users dot sf dot net>
|
||||||
|
|
||||||
* COPYING:
|
* COPYING:
|
||||||
|
|
|
@ -9,7 +9,7 @@ dnl If the host is not windows, we exit,
|
||||||
dnl otherwise, we set the correct flags
|
dnl otherwise, we set the correct flags
|
||||||
dnl for each platform.
|
dnl for each platform.
|
||||||
mingw_libs=""
|
mingw_libs=""
|
||||||
cegcc_libs=""
|
cegcc_cflags=""
|
||||||
case "$host_os" in
|
case "$host_os" in
|
||||||
mingw|mingw32)
|
mingw|mingw32)
|
||||||
mingw_libs="-lole32 -luuid -lws2_32"
|
mingw_libs="-lole32 -luuid -lws2_32"
|
||||||
|
@ -26,6 +26,9 @@ win32_libs="${mingw_libs}"
|
||||||
AC_SUBST(win32_cflags)
|
AC_SUBST(win32_cflags)
|
||||||
AC_SUBST(win32_libs)
|
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)
|
AM_INIT_AUTOMAKE(1.6 dist-bzip2)
|
||||||
|
|
||||||
AC_LIBTOOL_WIN32_DLL
|
AC_LIBTOOL_WIN32_DLL
|
||||||
|
|
|
@ -1,9 +1,9 @@
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
# define WIN32_LEAN_AND_MEAN
|
# define WIN32_LEAN_AND_MEAN
|
||||||
# include <winsock2.h>
|
# include <winsock2.h>
|
||||||
# undef WIN32_LEAN_AND_MEAN
|
# undef WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
|
#include <stdio.h>
|
||||||
|
|
||||||
#include "Evil.h"
|
#include "Evil.h"
|
||||||
|
|
||||||
#define FDREAD 0
|
#define FDREAD 0
|
||||||
|
|
|
@ -6,11 +6,15 @@
|
||||||
#endif /* EAPI */
|
#endif /* EAPI */
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
# ifdef EFL_EVIL_BUILD
|
||||||
# ifdef DLL_EXPORT
|
# ifdef DLL_EXPORT
|
||||||
# define EAPI __declspec(dllexport)
|
# define EAPI __declspec(dllexport)
|
||||||
# else
|
# else
|
||||||
|
# define EAPI
|
||||||
|
# endif /* ! DLL_EXPORT */
|
||||||
|
# else
|
||||||
# define EAPI __declspec(dllimport)
|
# define EAPI __declspec(dllimport)
|
||||||
# endif
|
# endif /* ! EFL_EVIL_BUILD */
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
|
@ -4,6 +4,10 @@
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#undef WIN32_LEAN_AND_MEAN
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
|
#ifdef __MINGW32CE__
|
||||||
|
# include <limits.h>
|
||||||
|
#endif /* __MINGW32CE__ */
|
||||||
|
|
||||||
#ifdef HAVE_CONFIG_H
|
#ifdef HAVE_CONFIG_H
|
||||||
# include "config.h"
|
# include "config.h"
|
||||||
#endif /* HAVE_CONFIG_H */
|
#endif /* HAVE_CONFIG_H */
|
||||||
|
@ -18,7 +22,7 @@
|
||||||
static char *dl_err = NULL;
|
static char *dl_err = NULL;
|
||||||
static int dl_err_viewed = 0;
|
static int dl_err_viewed = 0;
|
||||||
|
|
||||||
#ifdef __CEGCC__
|
#if defined(__CEGCC__) || defined(__MINGW32CE__)
|
||||||
|
|
||||||
static wchar_t *
|
static wchar_t *
|
||||||
string_to_wchar(const char *text)
|
string_to_wchar(const char *text)
|
||||||
|
@ -61,8 +65,7 @@ wchar_to_string(const wchar_t *text)
|
||||||
return atext;
|
return atext;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#endif /* __CEGCC__ || __MINGW32CE__ */
|
||||||
#endif /* __CEGCC__ */
|
|
||||||
|
|
||||||
static void
|
static void
|
||||||
get_last_error(char *desc)
|
get_last_error(char *desc)
|
||||||
|
@ -79,11 +82,11 @@ get_last_error(char *desc)
|
||||||
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
MAKELANGID(LANG_NEUTRAL, SUBLANG_DEFAULT),
|
||||||
(LPTSTR)&str, 0, NULL);
|
(LPTSTR)&str, 0, NULL);
|
||||||
|
|
||||||
#ifdef __CEGCC__
|
#if defined(__CEGCC__) || defined(__MINGW32CE__)
|
||||||
str2 = wchar_to_string(str);
|
str2 = wchar_to_string(str);
|
||||||
#else
|
#else
|
||||||
str2 = str;
|
str2 = str;
|
||||||
#endif /* __CEGCC__ */
|
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
|
||||||
|
|
||||||
l1 = strlen(desc);
|
l1 = strlen(desc);
|
||||||
l2 = strlen(str2);
|
l2 = strlen(str2);
|
||||||
|
@ -139,7 +142,7 @@ dlopen(const char* path, int mode __UNUSED__)
|
||||||
else
|
else
|
||||||
new_path[i] = path[i];
|
new_path[i] = path[i];
|
||||||
}
|
}
|
||||||
#ifdef __CEGCC__
|
#if defined(__CEGCC__) || defined(__MINGW32CE__)
|
||||||
{
|
{
|
||||||
wchar_t *wpath;
|
wchar_t *wpath;
|
||||||
|
|
||||||
|
@ -151,7 +154,7 @@ dlopen(const char* path, int mode __UNUSED__)
|
||||||
#else
|
#else
|
||||||
module = LoadLibraryEx(new_path, NULL,
|
module = LoadLibraryEx(new_path, NULL,
|
||||||
LOAD_WITH_ALTERED_SEARCH_PATH);
|
LOAD_WITH_ALTERED_SEARCH_PATH);
|
||||||
#endif /* __CEGCC__ */
|
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
|
||||||
if (!module)
|
if (!module)
|
||||||
get_last_error("LoadLibraryEx returned: ");
|
get_last_error("LoadLibraryEx returned: ");
|
||||||
|
|
||||||
|
@ -178,7 +181,7 @@ dlsym(void *handle, const char *symbol)
|
||||||
{
|
{
|
||||||
FARPROC fp;
|
FARPROC fp;
|
||||||
|
|
||||||
#ifdef __CEGCC__
|
#if defined(__CEGCC__) || defined(__MINGW32CE__)
|
||||||
{
|
{
|
||||||
wchar_t *wsymbol;
|
wchar_t *wsymbol;
|
||||||
|
|
||||||
|
@ -188,7 +191,7 @@ dlsym(void *handle, const char *symbol)
|
||||||
}
|
}
|
||||||
#else
|
#else
|
||||||
fp = GetProcAddress(handle, symbol);
|
fp = GetProcAddress(handle, symbol);
|
||||||
#endif /* __CEGCC__ */
|
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
|
||||||
if (!fp)
|
if (!fp)
|
||||||
get_last_error("GetProcAddress returned: ");
|
get_last_error("GetProcAddress returned: ");
|
||||||
|
|
||||||
|
|
|
@ -6,17 +6,22 @@
|
||||||
#endif /* EAPI */
|
#endif /* EAPI */
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
# ifdef EFL_EVIL_BUILD
|
||||||
# ifdef DLL_EXPORT
|
# ifdef DLL_EXPORT
|
||||||
# define EAPI __declspec(dllexport)
|
# define EAPI __declspec(dllexport)
|
||||||
# else
|
# else
|
||||||
|
# define EAPI
|
||||||
|
# endif /* ! DLL_EXPORT */
|
||||||
|
# else
|
||||||
# define EAPI __declspec(dllimport)
|
# define EAPI __declspec(dllimport)
|
||||||
# endif
|
# endif /* ! EFL_EVIL_BUILD */
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
extern "C" {
|
extern "C" {
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @def RTLD_LAZY
|
* @def RTLD_LAZY
|
||||||
* Lazy function call binding
|
* Lazy function call binding
|
||||||
|
|
|
@ -1,16 +1,20 @@
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
|
|
||||||
|
#define WIN32_LEAN_AND_MEAN
|
||||||
|
#include <winsock2.h>
|
||||||
|
#undef WIN32_LEAN_AND_MEAN
|
||||||
|
|
||||||
#ifndef __CEGCC__
|
#ifndef __CEGCC__
|
||||||
# include <errno.h>
|
# include <errno.h>
|
||||||
# define WIN32_LEAN_AND_MEAN
|
|
||||||
# include <winsock2.h>
|
|
||||||
# undef WIN32_LEAN_AND_MEAN
|
|
||||||
# include <sys/locking.h>
|
# include <sys/locking.h>
|
||||||
# include <io.h>
|
# include <io.h>
|
||||||
# include <share.h>
|
# include <share.h>
|
||||||
# include <shlobj.h>
|
# include <shlobj.h>
|
||||||
# include <objidl.h>
|
# include <objidl.h>
|
||||||
#endif /* ! __CEGCC__ */
|
#else
|
||||||
|
# include <sys/syslimits.h>
|
||||||
|
#endif /* __CEGCC__ */
|
||||||
|
|
||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/timeb.h>
|
#include <sys/timeb.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
|
|
@ -20,10 +20,12 @@
|
||||||
# define __UNUSED__
|
# define __UNUSED__
|
||||||
#endif /* HAVE___ATTRIBUTE__ */
|
#endif /* HAVE___ATTRIBUTE__ */
|
||||||
|
|
||||||
#ifdef __CEGCC__
|
#if defined(__CEGCC__)
|
||||||
# define CreateFileMapping CreateFileMappingW
|
# define CreateFileMapping CreateFileMappingW
|
||||||
# define _get_osfhandle get_osfhandle
|
# define _get_osfhandle get_osfhandle
|
||||||
#endif /* __CEGCC__ */
|
elif defined (__MINGW32CE__)
|
||||||
|
# define _get_osfhandle(FILEDES) ((long)FILEDES)
|
||||||
|
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
|
||||||
|
|
||||||
|
|
||||||
void *
|
void *
|
||||||
|
|
|
@ -6,11 +6,15 @@
|
||||||
#endif /* EAPI */
|
#endif /* EAPI */
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
|
# ifdef EFL_EVIL_BUILD
|
||||||
# ifdef DLL_EXPORT
|
# ifdef DLL_EXPORT
|
||||||
# define EAPI __declspec(dllexport)
|
# define EAPI __declspec(dllexport)
|
||||||
# else
|
# else
|
||||||
|
# define EAPI
|
||||||
|
# endif /* ! DLL_EXPORT */
|
||||||
|
# else
|
||||||
# define EAPI __declspec(dllimport)
|
# define EAPI __declspec(dllimport)
|
||||||
# endif
|
# endif /* ! EFL_EVIL_BUILD */
|
||||||
#endif /* _WIN32 */
|
#endif /* _WIN32 */
|
||||||
|
|
||||||
#ifdef __cplusplus
|
#ifdef __cplusplus
|
||||||
|
|
Loading…
Reference in New Issue