1 // unix.h - duplicates some MS defines
12 #define _MAX_FNAME 255
18 #define _getcwd getcwd
20 #define _unlink unlink
22 #define _access access
23 #define byte unsigned char
25 extern int filelength (int fd);
26 extern int WSAGetLastError ();
27 extern void _splitpath (const char *path, char *drive, char *dir, char *fname, char *ext);
29 #define _mkdir(A) mkdir(A,0700)
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