ClamAV is an open source (GPLv2) anti-virus toolkit.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
clamav/win32/platform.h

79 lines
1.6 KiB

#ifndef __PLATFORM_H
#define __PLATFORM_H
#include <winsock2.h>
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
#include <io.h>
#include <direct.h>
#include <Ws2tcpip.h>
16 years ago
#include <process.h>
#include "gettimeofday.h"
#include "snprintf.h"
#include "net.h"
16 years ago
#include "w32_errno.h"
typedef unsigned short mode_t;
16 years ago
#define strcasecmp lstrcmpi
#define strncasecmp strnicmp
#define mkdir(path, mode) mkdir(path)
#define lstat stat
16 years ago
#define sleep(sex) Sleep(sex)
#define getuid() 0
#define getgid() 0
char *strptime(const char *s, const char *format, struct tm *tm);
16 years ago
#define socket w32_socket
16 years ago
#define getsockopt w32_getsockopt
#define setsockopt w32_setsockopt
#define bind w32_bind
#define connect w32_connect
#define send w32_send
16 years ago
#define recv w32_recv
#define closesocket w32_closesocket
#define getservbyname w32_getservbyname
#define getaddrinfo w32_getaddrinfo
#define freeaddrinfo w32_freeaddrinfo
#define inet_ntop w32_inet_ntop
#define gethostbyname w32_gethostbyname
#define select w32_select
16 years ago
#define getpid GetCurrentProcessId
16 years ago
#define PATH_MAX 32767
#define S_IRUSR S_IREAD
#define S_IWUSR S_IWRITE
#define S_IRWXU (S_IRUSR|S_IWUSR)
#define S_ISDIR(mode) ((_S_IFDIR & mode)!=0)
#define S_ISREG(mode) ((_S_IFREG & mode)!=0)
#define S_ISLNK(mode) (0)
#define F_OK 0
#define W_OK 2
#define R_OK 4
#define X_OK R_OK
#define SEARCH_LIBDIR ""
16 years ago
#ifndef MIN
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
#endif
#ifndef MAX
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
#endif
#ifndef HAVE_IN_PORT_T
typedef unsigned short in_port_t;
#endif
#ifndef HAVE_IN_ADDR_T
typedef unsigned int in_addr_t;
#endif
#define PATHSEP "\\"
#endif /* __PLATFORM_H */