forked from enlightenment/efl
* remove cegcc compiler support. Only mingw32ce is supported now
* remove some shadow declarations SVN revision: 46639
This commit is contained in:
parent
336e1aac6c
commit
c0f295f2de
|
@ -8,7 +8,10 @@ AC_CANONICAL_HOST
|
|||
|
||||
dnl If the host is not Windows, we exit
|
||||
case "$host_os" in
|
||||
mingw* | cegcc*)
|
||||
cegcc*)
|
||||
AC_MSG_ERROR([ceGCC compiler is not supported anymore. Exiting...])
|
||||
;;
|
||||
mingw*)
|
||||
;;
|
||||
*)
|
||||
AC_MSG_ERROR([OS must be Windows. Exiting...])
|
||||
|
@ -46,15 +49,12 @@ EFL_CHECK_DOXYGEN([build_doc="yes"], [build_doc="no"])
|
|||
|
||||
win32_libs=""
|
||||
case "$host_os" in
|
||||
mingw | mingw32 | mingw32msvc)
|
||||
win32_libs="-lole32 -lws2_32 -lsecur32"
|
||||
;;
|
||||
cegcc*)
|
||||
win32_libs="-lws2"
|
||||
;;
|
||||
mingw32ce*)
|
||||
win32_libs="-lws2"
|
||||
;;
|
||||
*)
|
||||
win32_libs="-lole32 -lws2_32 -lsecur32"
|
||||
;;
|
||||
esac
|
||||
AC_SUBST(win32_libs)
|
||||
|
||||
|
@ -76,21 +76,12 @@ AC_C_CONST
|
|||
AC_C___ATTRIBUTE__
|
||||
|
||||
win32_cppflags="-DEFL_EVIL_BUILD"
|
||||
win32_cflags=""
|
||||
win32_cflags="-Wall -W -Wshadow"
|
||||
win32_cxxflags=""
|
||||
have_wince="no"
|
||||
have_mingw32ce="no"
|
||||
have_cegcc="no"
|
||||
case "$host_os" in
|
||||
cegcc*)
|
||||
have_wince="yes"
|
||||
have_cegcc="yes"
|
||||
win32_cflags="-mwin32"
|
||||
win32_cppflags="${win32_cppflags} -D_WIN32_WCE=0x0420"
|
||||
;;
|
||||
mingw32ce*)
|
||||
have_wince="yes"
|
||||
have_mingw32ce="yes"
|
||||
win32_cppflags="${win32_cppflags} -D_WIN32_WCE=0x0420"
|
||||
;;
|
||||
*)
|
||||
|
@ -104,8 +95,6 @@ AC_SUBST(win32_cflags)
|
|||
AC_SUBST(win32_cxxflags)
|
||||
|
||||
AM_CONDITIONAL(EVIL_HAVE_WINCE, test "x${have_wince}" = "xyes")
|
||||
AM_CONDITIONAL(EVIL_HAVE_MINGW32CE, test "x${have_mingw32ce}" = "xyes")
|
||||
AM_CONDITIONAL(EVIL_HAVE_CEGCC, test "x${have_cegcc}" = "xyes")
|
||||
|
||||
|
||||
### Checks for linker characteristics
|
||||
|
|
|
@ -125,7 +125,7 @@ typedef unsigned long gid_t;
|
|||
#include "evil_util.h"
|
||||
|
||||
|
||||
#if (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__) && !defined(__CEGCC__))
|
||||
#if (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__))
|
||||
# if defined(_MSC_VER) || defined(__MINGW32__)
|
||||
|
||||
# ifdef S_ISDIR
|
||||
|
|
|
@ -17,21 +17,16 @@ evil_string.h \
|
|||
evil_unistd.h \
|
||||
evil_util.h
|
||||
|
||||
nobase_include_HEADERS = pwd.h sys/mman.h
|
||||
nobase_include_HEADERS = pwd.h sys/mman.h fnmatch.h
|
||||
|
||||
if EVIL_HAVE_MINGW32CE
|
||||
if EVIL_HAVE_WINCE
|
||||
|
||||
nobase_include_HEADERS += errno.h dirent.h
|
||||
|
||||
endif
|
||||
|
||||
if ! EVIL_HAVE_CEGCC
|
||||
|
||||
nobase_include_HEADERS += fnmatch.h
|
||||
|
||||
endif
|
||||
|
||||
libevil_la_SOURCES = \
|
||||
evil_dirent.c \
|
||||
evil_errno.c \
|
||||
evil_fcntl.c \
|
||||
evil_fnmatch.c \
|
||||
|
@ -49,12 +44,6 @@ evil_unistd.c \
|
|||
evil_util.c \
|
||||
evil_uuid.c
|
||||
|
||||
if ! EVIL_HAVE_CEGCC
|
||||
|
||||
libevil_la_SOURCES += evil_dirent.c
|
||||
|
||||
endif
|
||||
|
||||
if EVIL_HAVE_WINCE
|
||||
|
||||
libevil_la_SOURCES += evil_link_ce.c
|
||||
|
|
|
@ -20,8 +20,6 @@ struct DIR
|
|||
};
|
||||
|
||||
|
||||
#ifndef __CEGCC__
|
||||
|
||||
DIR *opendir(char const *name)
|
||||
{
|
||||
DIR *dir;
|
||||
|
@ -193,5 +191,3 @@ struct dirent *readdir(DIR *dir)
|
|||
|
||||
return &dir->dirent;
|
||||
}
|
||||
|
||||
#endif /* ! __CEGCC__ */
|
||||
|
|
|
@ -9,20 +9,16 @@
|
|||
# include <io.h> /* for _get_osfhandle _lseek and _locking */
|
||||
#endif
|
||||
|
||||
#ifndef __CEGCC__
|
||||
# include <sys/locking.h>
|
||||
#endif /* __CEGCC__ */
|
||||
|
||||
#include <winsock2.h> /* for ioctlsocket */
|
||||
|
||||
#include "Evil.h"
|
||||
|
||||
|
||||
#if defined(__CEGCC__)
|
||||
# define _get_osfhandle get_osfhandle
|
||||
# elif defined (__MINGW32CE__)
|
||||
#ifdef __MINGW32CE__
|
||||
# define _get_osfhandle(FILEDES) ((HANDLE)FILEDES)
|
||||
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
|
||||
#endif /* __MINGW32CE__ */
|
||||
|
||||
|
||||
/*
|
||||
|
@ -44,14 +40,14 @@ int fcntl(int fd, int cmd, ...)
|
|||
|
||||
if (cmd == F_GETFD)
|
||||
{
|
||||
#if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) )
|
||||
#ifndef __MINGW32CE__
|
||||
DWORD flag;
|
||||
|
||||
if (!GetHandleInformation(h, &flag))
|
||||
return -1;
|
||||
|
||||
res = 0;
|
||||
#endif /* __CEGCC__ || __MINGW32CE__ */
|
||||
#endif /* ! __MINGW32CE__ */
|
||||
}
|
||||
|
||||
if (cmd == F_SETFD)
|
||||
|
@ -61,10 +57,10 @@ int fcntl(int fd, int cmd, ...)
|
|||
flag = va_arg(va, long);
|
||||
if (flag == FD_CLOEXEC)
|
||||
{
|
||||
#if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) )
|
||||
#ifndef __MINGW32CE__
|
||||
if (SetHandleInformation(h, HANDLE_FLAG_INHERIT, 0))
|
||||
res = 0;
|
||||
#endif /* __CEGCC__ || __MINGW32CE__ */
|
||||
#endif /* ! __MINGW32CE__ */
|
||||
}
|
||||
}
|
||||
else if (cmd == F_SETFL)
|
||||
|
@ -88,7 +84,7 @@ int fcntl(int fd, int cmd, ...)
|
|||
}
|
||||
}
|
||||
}
|
||||
#if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) )
|
||||
#ifndef __MINGW32CE__
|
||||
else if ((cmd == F_SETLK) || (cmd == F_SETLKW))
|
||||
{
|
||||
struct flock *fl;
|
||||
|
@ -124,7 +120,7 @@ int fcntl(int fd, int cmd, ...)
|
|||
res = _locking(fd, _LK_UNLCK, fl->l_len);
|
||||
}
|
||||
|
||||
#endif /* __CEGCC__ || __MINGW32CE__ */
|
||||
#endif /* ! __MINGW32CE__ */
|
||||
|
||||
va_end(va);
|
||||
|
||||
|
|
|
@ -2,10 +2,9 @@
|
|||
#define __EVIL_FCNTL_H__
|
||||
|
||||
|
||||
#ifndef __CEGCC__
|
||||
|
||||
# include <sys/types.h>
|
||||
|
||||
|
||||
/**
|
||||
* @def FD_CLOEXEC
|
||||
* Specifies that the file descriptor should be closed when an exec()
|
||||
|
@ -108,7 +107,4 @@ struct flock
|
|||
EAPI int fcntl(int fd, int cmd, ...);
|
||||
|
||||
|
||||
#endif /* ! __CEGCC__ */
|
||||
|
||||
|
||||
#endif /* __EVIL_FCNTL_H__ */
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#if defined (_MSC_VER) || defined (__MINGW32__) || defined (__MINGW32CE__)
|
||||
|
||||
#include <assert.h>
|
||||
#include <string.h>
|
||||
|
||||
|
@ -231,5 +230,3 @@ fnmatch(const char *pattern,
|
|||
fnmatch_list_of_states_free(states < new_states ? states : new_states, 2);
|
||||
return (int)r;
|
||||
}
|
||||
|
||||
#endif /* _MSC_VER || __MINGW32__ || __MINGW32CE__ */
|
||||
|
|
|
@ -1,9 +1,8 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#if defined (_MSC_VER) || defined (__MINGW32__) || defined (__MINGW32CE__)
|
||||
|
||||
#include <assert.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
|
@ -77,5 +76,3 @@ fnmatch_list_of_states_clear(struct list_of_states *list)
|
|||
list->size = 0;
|
||||
memset(list->has, 0, list->reserved * sizeof (*list->has));
|
||||
}
|
||||
|
||||
#endif /* _MSC_VER || __MINGWCE__ || __MINGW32CE__ */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
@ -5,7 +6,7 @@
|
|||
#include "Evil.h"
|
||||
|
||||
|
||||
#if ! (defined(__CEGCC__) || defined(__MINGW32CE__))
|
||||
#ifndef __MINGW32CE__
|
||||
|
||||
static char *
|
||||
replace(char *prev, char *value)
|
||||
|
@ -51,4 +52,4 @@ nl_langinfo(nl_item index)
|
|||
return nothing;
|
||||
}
|
||||
|
||||
#endif /* __CEGCC__ || __MINGW32CE__ */
|
||||
#endif /* ! __MINGW32CE__ */
|
||||
|
|
|
@ -2,7 +2,7 @@
|
|||
#define __EVIL_LANGINFO_H__
|
||||
|
||||
|
||||
#if ! (defined(__CEGCC__) || defined(__MINGW32CE__))
|
||||
#ifndef __MINGW32CE__
|
||||
|
||||
#include <locale.h>
|
||||
|
||||
|
@ -35,7 +35,7 @@ enum {
|
|||
|
||||
EAPI char *nl_langinfo(nl_item index);
|
||||
|
||||
#endif /* __CEGCC__ || __MINGW32CE__ */
|
||||
#endif /* __MINGW32CE__ */
|
||||
|
||||
|
||||
#endif /*__EVIL_LANGINFO_H__ */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
|
|
@ -1,3 +1,8 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <stdio.h>
|
||||
#include <sys/types.h>
|
||||
|
||||
|
@ -9,21 +14,13 @@
|
|||
#include <windows.h>
|
||||
#undef WIN32_LEAN_AND_MEAN
|
||||
|
||||
#ifndef __CEGCC__
|
||||
# include <io.h>
|
||||
#endif /* ! __CEGCC__ */
|
||||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include "sys/mman.h"
|
||||
|
||||
#if defined(__CEGCC__)
|
||||
# define _get_osfhandle get_osfhandle
|
||||
# elif defined (__MINGW32CE__)
|
||||
#ifdef __MINGW32CE__
|
||||
# define _get_osfhandle(FILEDES) ((long)FILEDES)
|
||||
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
|
||||
#endif /* __MINGW32CE__ */
|
||||
|
||||
|
||||
/***** API *****/
|
||||
|
@ -87,7 +84,7 @@ mmap(void *addr __UNUSED__,
|
|||
{
|
||||
HANDLE fm;
|
||||
DWORD protect = PAGE_NOACCESS;
|
||||
DWORD access = 0;
|
||||
DWORD acs = 0;
|
||||
HANDLE handle;
|
||||
void *data;
|
||||
|
||||
|
@ -146,23 +143,23 @@ mmap(void *addr __UNUSED__,
|
|||
}
|
||||
|
||||
if (protect & PAGE_READWRITE)
|
||||
access = FILE_MAP_ALL_ACCESS;
|
||||
acs = FILE_MAP_ALL_ACCESS;
|
||||
if (protect & PAGE_WRITECOPY)
|
||||
access = FILE_MAP_COPY;
|
||||
acs = FILE_MAP_COPY;
|
||||
#if 0
|
||||
if (protect & (PAGE_EXECUTE_READWRITE | PAGE_EXECUTE_READ))
|
||||
access = FILE_MAP_EXECUTE;
|
||||
acs = FILE_MAP_EXECUTE;
|
||||
#endif
|
||||
if (protect & (PAGE_READWRITE | PAGE_READONLY))
|
||||
access = FILE_MAP_READ;
|
||||
acs = FILE_MAP_READ;
|
||||
else
|
||||
{
|
||||
if (protect & PAGE_READWRITE)
|
||||
access = FILE_MAP_WRITE;
|
||||
acs = FILE_MAP_WRITE;
|
||||
}
|
||||
|
||||
data = MapViewOfFile(fm,
|
||||
access,
|
||||
acs,
|
||||
offset & 0xffff0000,
|
||||
offset & 0x0000ffff,
|
||||
len);
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
@ -9,9 +10,6 @@
|
|||
#include "pwd.h"
|
||||
|
||||
|
||||
#ifndef __CEGCC__
|
||||
|
||||
|
||||
static struct passwd pw;
|
||||
|
||||
struct passwd *
|
||||
|
@ -26,7 +24,6 @@ getpwuid (uid_t uid)
|
|||
# endif /* UNICODE */
|
||||
|
||||
length = PATH_MAX;
|
||||
/* get from USERPROFILE for win 98 ? */
|
||||
#ifdef _WIN32_WINNT
|
||||
res = GetUserNameEx(NameDisplay, name, &length);
|
||||
#else
|
||||
|
@ -38,13 +35,13 @@ getpwuid (uid_t uid)
|
|||
a_name = evil_wchar_to_char(name);
|
||||
if (a_name)
|
||||
{
|
||||
int length;
|
||||
int l;
|
||||
|
||||
length = strlen(a_name);
|
||||
if (length >= PATH_MAX)
|
||||
length = PATH_MAX;
|
||||
memcpy(user_name, a_name, length);
|
||||
user_name[length] = '\0';
|
||||
l = strlen(a_name);
|
||||
if (l >= PATH_MAX)
|
||||
l = PATH_MAX;
|
||||
memcpy(user_name, a_name, l);
|
||||
user_name[l] = '\0';
|
||||
free(a_name);
|
||||
}
|
||||
else
|
||||
|
@ -67,6 +64,3 @@ getpwuid (uid_t uid)
|
|||
|
||||
return &pw;
|
||||
}
|
||||
|
||||
|
||||
#endif /* ! __CEGCC__ */
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
@ -8,7 +9,7 @@
|
|||
#undef fopen
|
||||
|
||||
|
||||
#if defined (_WIN32_WCE) && ! defined (__CEGCC__)
|
||||
#ifdef _WIN32_WCE
|
||||
|
||||
/*
|
||||
* Error related functions
|
||||
|
@ -99,7 +100,7 @@ int evil_remove(const char *path)
|
|||
}
|
||||
|
||||
|
||||
#endif /* _WIN32_WCE && ! __CEGCC__ */
|
||||
#endif /* _WIN32_WCE */
|
||||
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
|
@ -110,7 +111,7 @@ FILE *evil_fopen_native(const char *path, const char *mode)
|
|||
char *filename;
|
||||
char *tmp;
|
||||
wchar_t *wfilename;
|
||||
DWORD access = GENERIC_READ;
|
||||
DWORD acs = GENERIC_READ;
|
||||
DWORD creation;
|
||||
|
||||
if (!path || !*path || !mode || !*mode)
|
||||
|
@ -155,17 +156,17 @@ FILE *evil_fopen_native(const char *path, const char *mode)
|
|||
|
||||
if (*mode == 'r')
|
||||
{
|
||||
access = GENERIC_READ;
|
||||
acs = GENERIC_READ;
|
||||
creation = OPEN_EXISTING;
|
||||
}
|
||||
if (*mode == 'w')
|
||||
{
|
||||
access = GENERIC_WRITE;
|
||||
acs = GENERIC_WRITE;
|
||||
creation = CREATE_ALWAYS;
|
||||
}
|
||||
|
||||
handle = CreateFile(wfilename,
|
||||
access,
|
||||
acs,
|
||||
0, NULL,
|
||||
creation,
|
||||
FILE_ATTRIBUTE_NORMAL,
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#if defined (_WIN32_WCE) && ! defined (__CEGCC__)
|
||||
#ifdef _WIN32_WCE
|
||||
|
||||
/*
|
||||
* Error related functions
|
||||
|
@ -39,7 +39,7 @@ EAPI int evil_remove(const char *path);
|
|||
|
||||
# define remove(p) evil_remove(p)
|
||||
|
||||
#endif /* _WIN32_WCE && ! __CEGCC__ */
|
||||
#endif /* _WIN32_WCE */
|
||||
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
||||
#include <stdio.h>
|
||||
#ifndef __CEGCC__
|
||||
# include <io.h>
|
||||
#endif /* __CEGCC__ */
|
||||
|
||||
#ifdef HAVE_ERRNO_H
|
||||
#include <errno.h>
|
||||
#endif /* HAVE_ERRNO_H */
|
||||
|
@ -127,7 +127,7 @@ setenv(const char *name,
|
|||
const char *value,
|
||||
int overwrite)
|
||||
{
|
||||
#if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) )
|
||||
#ifndef __MINGW32CE__
|
||||
|
||||
char *old_name;
|
||||
char *str;
|
||||
|
@ -170,7 +170,7 @@ setenv(const char *name,
|
|||
|
||||
return res;
|
||||
|
||||
#else /* __CEGCC__ || __MINGW32CE__ */
|
||||
#else /* __MINGW32CE__ */
|
||||
|
||||
HKEY key;
|
||||
LONG res;
|
||||
|
@ -254,19 +254,15 @@ setenv(const char *name,
|
|||
|
||||
return 0;
|
||||
|
||||
#endif /* __CEGCC__ || __MINGW32CE__ */
|
||||
#endif /* ! __MINGW32CE__ */
|
||||
}
|
||||
|
||||
#if ! defined(__CEGCC__)
|
||||
|
||||
int
|
||||
unsetenv(const char *name)
|
||||
{
|
||||
return setenv(name, NULL, 1);
|
||||
}
|
||||
|
||||
#endif /* ! __CEGCC__ */
|
||||
|
||||
|
||||
/*
|
||||
* Files related functions
|
||||
|
@ -320,9 +316,9 @@ mkstemp(char *__template)
|
|||
suffix[5] = lookup[v % 62];
|
||||
v /= 62;
|
||||
|
||||
#if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) )
|
||||
#ifndef __MINGW32CE__
|
||||
fd = _open(__template, _O_RDWR | _O_BINARY | _O_CREAT | _O_EXCL, _S_IREAD | _S_IWRITE);
|
||||
#else /* _WIN32_WCE */
|
||||
#else /* ! __MINGW32CE__ */
|
||||
{
|
||||
FILE *f;
|
||||
wchar_t *wtemplate;
|
||||
|
@ -334,14 +330,14 @@ mkstemp(char *__template)
|
|||
free(wtemplate);
|
||||
if (!f)
|
||||
{
|
||||
#ifdef HAVE_ERRNO_H
|
||||
# ifdef HAVE_ERRNO_H
|
||||
errno = EEXIST;
|
||||
#endif /* HAVE_ERRNO_H */
|
||||
# endif /* HAVE_ERRNO_H */
|
||||
return -1;
|
||||
}
|
||||
fd = (int)_fileno(f);
|
||||
}
|
||||
#endif /* _WIN32_WCE */
|
||||
#endif /* __MINGW32CE__ */
|
||||
if (fd >= 0)
|
||||
return fd;
|
||||
|
||||
|
@ -358,7 +354,7 @@ mkstemp(char *__template)
|
|||
char *
|
||||
realpath(const char *file_name, char *resolved_name)
|
||||
{
|
||||
#if ! ( defined(__CEGCC__) || defined(__MINGW32CE__) )
|
||||
#ifndef __MINGW32CE__
|
||||
return _fullpath(resolved_name, file_name, PATH_MAX);
|
||||
#else
|
||||
char cwd[PATH_MAX];
|
||||
|
@ -384,5 +380,5 @@ realpath(const char *file_name, char *resolved_name)
|
|||
resolved_name[l] = '\0';
|
||||
|
||||
return resolved_name;
|
||||
#endif /* __CEGCC__ || __MINGW32CE__ */
|
||||
#endif /* __MINGW32CE__ */
|
||||
}
|
||||
|
|
|
@ -100,9 +100,6 @@ EAPI int setenv(const char *name,
|
|||
const char *value,
|
||||
int overwrite);
|
||||
|
||||
|
||||
#if ! defined(__CEGCC__)
|
||||
|
||||
/**
|
||||
* @brief Remove environment variables.
|
||||
*
|
||||
|
@ -123,8 +120,6 @@ EAPI int setenv(const char *name,
|
|||
*/
|
||||
EAPI int unsetenv(const char *name);
|
||||
|
||||
#endif /* ! __CEGCC__ */
|
||||
|
||||
|
||||
/*
|
||||
* Files related functions
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
#include "Evil.h"
|
||||
|
||||
|
||||
#if defined (_WIN32_WCE) && ! defined (__CEGCC__)
|
||||
#ifdef _WIN32_WCE
|
||||
|
||||
/*
|
||||
* Error related functions
|
||||
|
@ -17,11 +17,9 @@ char *strerror (int errnum __UNUSED__)
|
|||
return "[Windows CE] error\n";
|
||||
}
|
||||
|
||||
#endif /* _WIN32_WCE && ! __CEGCC__ */
|
||||
#endif /* _WIN32_WCE */
|
||||
|
||||
|
||||
#ifndef __CEGCC__
|
||||
|
||||
/*
|
||||
* bit related functions
|
||||
*
|
||||
|
@ -43,8 +41,6 @@ int ffs(int i)
|
|||
return x;
|
||||
}
|
||||
|
||||
#endif /* ! __CEGCC__ */
|
||||
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
|
||||
|
|
|
@ -13,7 +13,7 @@
|
|||
*/
|
||||
|
||||
|
||||
#if defined (_WIN32_WCE) && ! defined (__CEGCC__)
|
||||
#ifdef _WIN32_WCE
|
||||
|
||||
/*
|
||||
* Environment variable related functions
|
||||
|
@ -35,9 +35,7 @@
|
|||
*/
|
||||
EAPI char *strerror (int errnum);
|
||||
|
||||
#endif /* _WIN32_WCE && ! __CEGCC__ */
|
||||
|
||||
#ifndef __CEGCC__
|
||||
#endif /* _WIN32_WCE */
|
||||
|
||||
/*
|
||||
* bit related functions
|
||||
|
@ -62,8 +60,6 @@ EAPI char *strerror (int errnum);
|
|||
*/
|
||||
EAPI int ffs(int i);
|
||||
|
||||
#endif /* ! __CEGCC__ */
|
||||
|
||||
|
||||
#ifdef _WIN32_WCE
|
||||
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
@ -32,7 +33,7 @@ _evil_systemtime_to_time(SYSTEMTIME st)
|
|||
-1, 30, 58, 89, 119, 150, 180, 211, 242, 272, 303, 333, 364
|
||||
};
|
||||
int day;
|
||||
time_t time;
|
||||
time_t t;
|
||||
|
||||
st.wYear -= 1900;
|
||||
if ((st.wYear < 70) || (st.wYear > 138))
|
||||
|
@ -43,10 +44,10 @@ _evil_systemtime_to_time(SYSTEMTIME st)
|
|||
if (!(st.wYear & 3) && (st.wMonth > 2) )
|
||||
day++;
|
||||
|
||||
time = ((st.wYear - 70) * 365 + ((st.wYear - 1) >> 2) - 17 + day) * 24 + st.wHour;
|
||||
time = (time * 60 + st.wMinute) * 60 + st.wSecond;
|
||||
t = ((st.wYear - 70) * 365 + ((st.wYear - 1) >> 2) - 17 + day) * 24 + st.wHour;
|
||||
t = (t * 60 + st.wMinute) * 60 + st.wSecond;
|
||||
|
||||
return (long)time;
|
||||
return (long)t;
|
||||
}
|
||||
|
||||
/*
|
||||
|
@ -148,7 +149,7 @@ evil_getcwd(char *buffer, size_t size)
|
|||
#endif /* ! _WIN32_WCE */
|
||||
}
|
||||
|
||||
#if defined (_WIN32_WCE) && ! defined (__CEGCC__)
|
||||
#ifdef _WIN32_WCE
|
||||
|
||||
int
|
||||
evil_stat(const char *file_name, struct stat *st)
|
||||
|
@ -189,7 +190,6 @@ evil_stat(const char *file_name, struct stat *st)
|
|||
if (*f != '\\')
|
||||
{
|
||||
char buf[PATH_MAX];
|
||||
char *tmp;
|
||||
int l1;
|
||||
int l2;
|
||||
|
||||
|
@ -277,7 +277,7 @@ evil_stat(const char *file_name, struct stat *st)
|
|||
return 0;
|
||||
}
|
||||
|
||||
#endif /* _WIN32_WCE && ! __CEGCC__ */
|
||||
#endif /* _WIN32_WCE */
|
||||
|
||||
|
||||
|
||||
|
@ -416,11 +416,11 @@ evil_pipe(int *fds)
|
|||
*
|
||||
*/
|
||||
|
||||
#if defined (_WIN32_WCE) && ! defined (__CEGCC__)
|
||||
#ifdef _WIN32_WCE
|
||||
|
||||
int execvp (const char *file __UNUSED__, char *const argv[] __UNUSED__)
|
||||
{
|
||||
return 1;
|
||||
}
|
||||
|
||||
#endif /* _WIN32_WCE && ! __CEGCC__ */
|
||||
#endif /* _WIN32_WCE */
|
||||
|
|
|
@ -147,7 +147,7 @@ EAPI ssize_t readlink(const char *path, char *buf, size_t bufsiz);
|
|||
*/
|
||||
|
||||
|
||||
#if defined (_WIN32_WCE) && ! defined (__CEGCC__)
|
||||
#ifdef _WIN32_WCE
|
||||
|
||||
/**
|
||||
* @brief Return information about a file.
|
||||
|
@ -173,7 +173,7 @@ EAPI int evil_stat(const char *file_name, struct stat *st);
|
|||
*/
|
||||
# define stat(f,st) evil_stat((f),(st))
|
||||
|
||||
#endif /* _WIN32_WCE && ! __CEGCC__ */
|
||||
#endif /* _WIN32_WCE */
|
||||
|
||||
/**
|
||||
* @brief Get the current directory.
|
||||
|
@ -270,7 +270,7 @@ EAPI int evil_pipe(int *fds);
|
|||
*/
|
||||
|
||||
|
||||
#if defined (_WIN32_WCE) && ! defined (__CEGCC__)
|
||||
#ifdef _WIN32_WCE
|
||||
|
||||
/**
|
||||
* @brief Replace the current process image with a new process image.
|
||||
|
@ -288,7 +288,7 @@ EAPI int evil_pipe(int *fds);
|
|||
*/
|
||||
EAPI int execvp( const char *file, char *const argv[]);
|
||||
|
||||
#endif /* _WIN32_WCE && ! __CEGCC__ */
|
||||
#endif /* _WIN32_WCE */
|
||||
|
||||
|
||||
/**
|
||||
|
|
|
@ -1,3 +1,4 @@
|
|||
|
||||
#ifdef HAVE_CONFIG_H
|
||||
# include "config.h"
|
||||
#endif /* HAVE_CONFIG_H */
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
|
||||
#if ! defined(__CEGCC__) && ! defined(__MINGW32CE__)
|
||||
#ifndef __MINGW32CE__
|
||||
/*
|
||||
* Defines the windows UUID IID_IPersistFile used for links in
|
||||
* evil. This is here since uuid.lib is a static only library and
|
||||
|
@ -10,4 +10,4 @@
|
|||
# include <basetyps.h>
|
||||
DEFINE_OLEGUID(IID_IPersistFile, 0x0000010BL, 0, 0);
|
||||
|
||||
#endif /* ! __CEGCC__ && ! __MINGW32CE__ */
|
||||
#endif /* ! __MINGW32CE__ */
|
||||
|
|
|
@ -12,9 +12,6 @@ extern "C" {
|
|||
#endif
|
||||
|
||||
|
||||
#ifndef __CEGCC__
|
||||
|
||||
|
||||
struct passwd {
|
||||
char *pw_name; /* user name */
|
||||
char *pw_passwd; /* encrypted password */
|
||||
|
@ -32,9 +29,6 @@ struct passwd {
|
|||
EAPI struct passwd * getpwuid (uid_t uid);
|
||||
|
||||
|
||||
#endif /* ! __CEGCC__ */
|
||||
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue