diff options
author | Vincent Torri <vincent dot torri at gmail dot com> | 2015-11-11 15:04:37 +0100 |
---|---|---|
committer | Cedric BAIL <cedric@osg.samsung.com> | 2015-11-11 14:36:17 -0800 |
commit | 9070e067bcf864cfc16fe5ba9e3c0bc42f5d2579 (patch) | |
tree | e8bfd63bead109fa61abdf043d701cc3a02e2834 | |
parent | 26ed6638aeb3089a7eb784b9bf50f1830f7b5e02 (diff) | |
download | efl-9070e067bcf864cfc16fe5ba9e3c0bc42f5d2579.tar.gz |
evil: remove useless vc++ code
vc++ is not supported anymore
Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
-rw-r--r-- | src/lib/evil/Evil.h | 44 | ||||
-rw-r--r-- | src/lib/evil/dlfcn.c | 4 | ||||
-rw-r--r-- | src/lib/evil/evil_fcntl.c | 5 | ||||
-rw-r--r-- | src/lib/evil/evil_mman.c | 7 | ||||
-rw-r--r-- | src/lib/evil/evil_string.c | 9 | ||||
-rw-r--r-- | src/lib/evil/evil_string.h | 22 | ||||
-rw-r--r-- | src/lib/evil/evil_unistd.c | 42 | ||||
-rw-r--r-- | src/lib/evil/evil_unistd.h | 74 |
8 files changed, 7 insertions, 200 deletions
diff --git a/src/lib/evil/Evil.h b/src/lib/evil/Evil.h index ff32525413..780b8b0e1e 100644 --- a/src/lib/evil/Evil.h +++ b/src/lib/evil/Evil.h @@ -107,35 +107,6 @@ extern "C" { #include <math.h> -#ifdef _MSC_VER - -# include <io.h> - -# define F_OK 0 /* Check for file existence */ -# define X_OK 1 /* MS access() doesn't check for execute permission. */ -# define W_OK 2 /* Check for write permission */ -# define R_OK 4 /* Check for read permission */ - -typedef DWORD pid_t; -typedef unsigned short mode_t; - -typedef unsigned short uint16_t; -typedef unsigned int uint32_t; -typedef signed int int32_t; -typedef __int64 int64_t; -typedef unsigned __int64 uint64_t; -typedef SSIZE_T ssize_t; - -# define strdup(s) _strdup(s) -# define unlink(filename) _unlink(filename) -# define fileno(f) _fileno(f) -# define fdopen(fd,m) _fdopen((fd),(m)) -# define access(p,m) _access((p),(m)) -# define hypot(x,y) _hypot((x),(y)) -# define tzset _tzset - -#endif /* _MSC_VER */ - typedef unsigned long uid_t; typedef unsigned long gid_t; @@ -153,10 +124,6 @@ typedef unsigned long gid_t; #include "evil_util.h" #include "evil_macro_pop.h" - -#if (defined(_WIN32) && !defined(_UWIN) && !defined(__CYGWIN__)) -# if defined(_MSC_VER) || defined(__MINGW32__) - #ifndef S_ISDIR # define S_ISDIR(m) (((m) & _S_IFMT) == _S_IFDIR) #endif @@ -165,7 +132,7 @@ typedef unsigned long gid_t; # define S_ISREG(m) (((m) & _S_IFMT) == _S_IFREG) #endif -# define S_ISLNK(m) 0 +#define S_ISLNK(m) 0 #define S_IRUSR _S_IRUSR #ifndef S_IRGRP @@ -199,9 +166,9 @@ typedef unsigned long gid_t; # define S_IRWXO _S_IRWXU #endif -# define _S_IXUSR _S_IEXEC -# define _S_IWUSR _S_IWRITE -# define _S_IRUSR _S_IREAD +#define _S_IXUSR _S_IEXEC +#define _S_IWUSR _S_IWRITE +#define _S_IRUSR _S_IREAD /* # define close(fd) _close(fd) @@ -211,9 +178,6 @@ typedef unsigned long gid_t; # define lstat(f,s) _stat((f),(s)) */ -# endif -#endif - #define sigsetjmp(Env, Save) setjmp(Env) #undef EAPI diff --git a/src/lib/evil/dlfcn.c b/src/lib/evil/dlfcn.c index ae8687ebf5..4f3760b272 100644 --- a/src/lib/evil/dlfcn.c +++ b/src/lib/evil/dlfcn.c @@ -4,10 +4,6 @@ #include <stdlib.h> -#ifdef _MSC_VER -# include <limits.h> -#endif /* _MSC_VER */ - #ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN #endif diff --git a/src/lib/evil/evil_fcntl.c b/src/lib/evil/evil_fcntl.c index 169d1926e2..118ed175a4 100644 --- a/src/lib/evil/evil_fcntl.c +++ b/src/lib/evil/evil_fcntl.c @@ -3,11 +3,6 @@ #endif /* HAVE_CONFIG_H */ #include <stdio.h> - -#ifdef _MSC_VER -# include <io.h> /* for _get_osfhandle _lseek and _locking */ -#endif - #include <sys/locking.h> #include <winsock2.h> /* for ioctlsocket */ diff --git a/src/lib/evil/evil_mman.c b/src/lib/evil/evil_mman.c index 8d6dcdb2cc..fca3c72519 100644 --- a/src/lib/evil/evil_mman.c +++ b/src/lib/evil/evil_mman.c @@ -5,10 +5,7 @@ #include <stdlib.h> #include <stdio.h> #include <sys/types.h> - -#ifndef _MSC_VER -# include <unistd.h> -#endif +#include <unistd.h> #ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN @@ -16,7 +13,7 @@ #include <windows.h> #undef WIN32_LEAN_AND_MEAN -# include <io.h> +#include <io.h> #include "evil_macro.h" #include "sys/mman.h" diff --git a/src/lib/evil/evil_string.c b/src/lib/evil/evil_string.c index 151f8e5a01..12411be3f6 100644 --- a/src/lib/evil/evil_string.c +++ b/src/lib/evil/evil_string.c @@ -54,15 +54,6 @@ strrstr (const char *str, const char *substr) return ret; } -#ifdef _MSC_VER - -int strcasecmp(const char *s1, const char *s2) -{ - return lstrcmpi(s1, s2); -} - -#endif /* _MSC_VER */ - char *strcasestr(const char *haystack, const char *needle) { size_t length_needle; diff --git a/src/lib/evil/evil_string.h b/src/lib/evil/evil_string.h index 6de66e9c50..e1bf65b73b 100644 --- a/src/lib/evil/evil_string.h +++ b/src/lib/evil/evil_string.h @@ -73,28 +73,6 @@ EAPI int ffs(int i); */ EAPI char *strrstr (const char *str, const char *substr); -#ifdef _MSC_VER - -/** - * @brief Compare two string, ignoring case. - * - * @param s1 The first string to compare. - * @param s2 The first string to compare. - * @return - * - * This function compares the two strings @p s1 and @p s2, ignoring - * the case of the characters. It returns an integer less than, equal - * to, or greater than zero if s1 is found, respectively, to be less - * than, to match, or be greater than s2. - * - * Conformity: Non applicable. - * - * Supported OS: Windows XP (vc++ only) - */ -EAPI int strcasecmp(const char *s1, const char *s2); - -#endif /* _MSC_VER */ - /** * @brief Locate a substring into a string, ignoring case. * diff --git a/src/lib/evil/evil_unistd.c b/src/lib/evil/evil_unistd.c index 71f6e2c10e..c75f63fa85 100644 --- a/src/lib/evil/evil_unistd.c +++ b/src/lib/evil/evil_unistd.c @@ -3,6 +3,7 @@ #endif /* HAVE_CONFIG_H */ #include <errno.h> +# include <sys/time.h> #ifndef WIN32_LEAN_AND_MEAN # define WIN32_LEAN_AND_MEAN @@ -10,12 +11,6 @@ #include <winsock2.h> #undef WIN32_LEAN_AND_MEAN -# include <sys/time.h> - -#ifdef _MSC_VER -# include <direct.h> /* for _getcwd */ -#endif - #include "Evil.h" #include "evil_private.h" @@ -64,41 +59,6 @@ evil_time_get(void) return (double)_evil_time_second + (double)(count.QuadPart - _evil_time_count)/ (double)_evil_time_freq; } -#ifdef _MSC_VER -int -evil_gettimeofday(struct timeval *tp, void *tzp EVIL_UNUSED) -{ - LARGE_INTEGER count; - LONGLONG diff; - - QueryPerformanceCounter(&count); - diff = count.QuadPart - _evil_time_count; - tp->tv_sec = _evil_time_second + (long)(diff / _evil_time_freq); - tp->tv_usec = (long)(((diff % _evil_time_freq) * 1000000ll) / _evil_time_freq); - - return 1; -} - -int -evil_usleep(unsigned long usec) -{ - Sleep(usec / 1000); - return 0; -} - - -/* - * Process identifer related functions - * - */ - -pid_t -getpid(void) -{ - return (pid_t)GetCurrentProcessId(); -} -#endif - /* * File related functions * diff --git a/src/lib/evil/evil_unistd.h b/src/lib/evil/evil_unistd.h index f6584161b8..013fbf8b5a 100644 --- a/src/lib/evil/evil_unistd.h +++ b/src/lib/evil/evil_unistd.h @@ -36,80 +36,6 @@ */ EAPI double evil_time_get(void); -#ifdef _MSC_VER - -/** - * @brief Retrieve the time since the Evil library has been - * initialized. - * - * @param tp Structure to fill. - * @param tzp Unused. - * @return Always 1. - * - * The function fills @p tp with the time spent since the Evil library - * has been initialized. It uses a high-resolution timer and then can - * have a precision up to the nano-second. The precision is processor - * dependant. This function can be used to benchmark parts of code in - * with high precision. This function always returns 1. - * - * Conformity: Not appliclable. - * - * Supported OS: Windows XP. - */ -EAPI int evil_gettimeofday(struct timeval * tp, void * tzp); - -/** - * @def gettimeofday(tp,tzp) - * - * Wrapper around evil_gettimeofday(). - */ -#define gettimeofday(tp,tzp) evil_gettimeofday((tp),(tzp)) - -/** - * @brief Suspend the execution of the calling process for microsecond - * intervals. - * - * @param usec The interval in microseconds. - * @return Always 0 (success). - * - * This function suspends the execution of the calling process for (at - * least) @p usec microseconds. - * - * Conformity: Not appliclable. - * - * Supported OS: Windows XP. - */ -EAPI int evil_usleep(unsigned long usec); - -/** - * @def usleep(usec) - * - * Wrapper around evil_usleep(). - */ -#define usleep(usec) evil_usleep(usec); - -/* - * Process identifer related functions - * - */ - -/** - * @brief Return the process identifier of the calling process. - * - * @return The process ID. - * - * Return the process identifier of the calling process. Until - * the process terminates, the process identifier uniquely - * identifies the process throughout the system. - * - * Conformity: Not appliclable. - * - * Supported OS: Windows XP. - */ -EAPI pid_t getpid(void); - -#endif - /* * Symbolic links and directory related functions |