1 // unix.h - duplicates some MS defines
11 #define _MAX_FNAME 255
17 #define _getcwd getcwd
19 #define _unlink unlink
21 #define _access access
22 #define byte unsigned char
24 extern int filelength (int fd);
26 extern int WSAGetLastError ();
27 extern int _mkdir(const char *path);
28 extern void _splitpath (const char *path, char *drive, char *dir, char *fname, char *ext);
30 #define closesocket(A) close(A)
31 #define CopyMemory(A,B,C) memcpy(A,B,C)
32 #define UINT unsigned int
34 #define SOCKADDR_IN struct sockaddr_in
35 #define SOCKADDR struct sockaddr
36 #define LPSOCKADDR struct sockaddr*
37 #define LPHOSTENT struct hostent*
38 #define HOSTENT struct hostent
39 #define LPINADDR struct in_addr*
40 #define LPIN_ADDR struct in_addr*
41 #define SOCKET_ERROR -1
42 #define INVALID_SOCKET -1
43 #define TIMEVAL struct timeval
44 #define SERVENT struct servent
47 #define WSAEALREADY EALREADY
48 #define WSAEINVAL EINVAL
49 #define WSAEWOULDBLOCK EAGAIN
50 #define WSAEISCONN EISCONN
51 #define WSAECONNRESET ECONNRESET
52 #define WSAECONNABORTED ECONNABORTED
53 #define WSAESHUTDOWN ESHUTDOWN
54 #define WSAENOTSOCK ENOTSOCK