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 ioctlsocket(A,B,C) ioctl(A,B,C)
31 #define closesocket(A) close(A)
32 #define CopyMemory(A,B,C) memcpy(A,B,C)
33 #define UINT unsigned int
35 #define SOCKADDR_IN struct sockaddr_in
36 #define SOCKADDR struct sockaddr
37 #define LPSOCKADDR struct sockaddr*
38 #define LPHOSTENT struct hostent*
39 #define HOSTENT struct hostent
40 #define LPINADDR struct in_addr*
41 #define LPIN_ADDR struct in_addr*
42 #define SOCKET_ERROR -1
43 #define INVALID_SOCKET -1
44 #define TIMEVAL struct timeval
45 #define SERVENT struct servent
48 #define WSAEALREADY EALREADY
49 #define WSAEINVAL EINVAL
50 #define WSAEWOULDBLOCK EAGAIN
51 #define WSAEISCONN EISCONN
52 #define WSAECONNRESET ECONNRESET
53 #define WSAECONNABORTED ECONNABORTED
54 #define WSAESHUTDOWN ESHUTDOWN
55 #define WSAENOTSOCK ENOTSOCK