evil: remove useless vc++ code

vc++ is not supported anymore

Signed-off-by: Cedric BAIL <cedric@osg.samsung.com>
This commit is contained in:
Vincent Torri 2015-11-11 15:04:37 +01:00 committed by Chris Michael
parent 0e172f6fbe
commit bad87e39bd
8 changed files with 7 additions and 200 deletions

View File

@ -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

View File

@ -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

View File

@ -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 */

View File

@ -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"

View File

@ -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;

View File

@ -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.
*

View File

@ -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
*

View File

@ -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