19
#include "gettimeofday.h"
22
#include "w32_errno.h"
29
typedef unsigned short mode_t;
33
#define SIZEOF_VOID_P 8
35
#define SIZEOF_VOID_P 4
38
#define strcasecmp lstrcmpi
39
#define strncasecmp strnicmp
40
#define mkdir(path, mode) mkdir(path)
41
#define sleep(sex) Sleep(1000*(sex))
45
char *strptime(const char *s, const char *format, struct tm *tm);
47
#define srand w32_srand
49
#define socket w32_socket
50
#define getsockopt w32_getsockopt
51
#define setsockopt w32_setsockopt
53
#define listen w32_listen
54
#define accept w32_accept
55
#define connect w32_connect
56
#define shutdown w32_shutdown
59
#define closesocket w32_closesocket
60
#define getservbyname w32_getservbyname
61
#define getaddrinfo w32_getaddrinfo
65
#define gai_strerror w32_strerror
66
#define freeaddrinfo w32_freeaddrinfo
67
#define inet_ntop w32_inet_ntop
68
#define gethostbyname w32_gethostbyname
69
#define select w32_select
71
#define strerror w32_strerror
72
#define strerror_r w32_strerror_r
73
#define ftruncate _chsize
74
#define getpid GetCurrentProcessId
76
#define PATH_MAX 32767
77
#define SEARCH_LIBDIR ""
78
#define WORDS_BIGENDIAN 0
82
#define MIN(a, b) (((a) < (b)) ? (a) : (b))
85
#define MAX(a,b) (((a) > (b)) ? (a) : (b))
88
#ifndef HAVE_IN_PORT_T
89
typedef unsigned short in_port_t;
92
#ifndef HAVE_IN_ADDR_T
93
typedef unsigned int in_addr_t;
98
void w32_glob(int *argc_ptr, char ***argv_ptr);
102
#if !defined(THIS_IS_LIBCLAMAV) && defined(_MSC_VER)
103
#define LIBCLAMAV_EXPORT __declspec(dllimport)
105
#define LIBCLAMAV_EXPORT
107
LIBCLAMAV_EXPORT extern const char *DATADIR;
108
LIBCLAMAV_EXPORT extern const char *CONFDIR;
109
LIBCLAMAV_EXPORT extern const char *CONFDIR_CLAMD;
110
LIBCLAMAV_EXPORT extern const char *CONFDIR_FRESHCLAM;
111
LIBCLAMAV_EXPORT extern const char *CONFDIR_MILTER;
118
int real_main(int, char**);
119
#define main main(int argc, char **argv) { _setmode(_fileno(stdin), _O_BINARY); w32_glob(&argc, &argv); return real_main(argc, argv); }; int real_main
121
#endif /* __PLATFORM_H */