1 // unix.h - duplicates some MS defines
7 // same thing that's in FS2_Open (credit: Mike Harris)
8 #define DIR_SEPARATOR_CHAR '/'
9 #define DIR_SEPARATOR_STR "/"
14 extern int filelength (int fd);
16 #define ioctlsocket(A,B,C) ioctl(A,B,C)
17 #define ioctlsocket(A,B,C) ioctl(A,B,C)
18 #define closesocket(A) close(A)
20 #define SOCKET_ERROR -1
21 #define INVALID_SOCKET -1
23 extern int WSAGetLastError ();
25 #define WSAEALREADY EALREADY
26 #define WSAEINVAL EINVAL
27 #define WSAEWOULDBLOCK EAGAIN
28 #define WSAEISCONN EISCONN
29 #define WSAECONNRESET ECONNRESET
30 #define WSAECONNABORTED ECONNABORTED
31 #define WSAESHUTDOWN ESHUTDOWN
32 #define WSAENOTSOCK ENOTSOCK
33 #define WSAENOPROTOOPT ENOPROTOOPT
35 #define NETCALL_WOULDBLOCK(err) (err == EAGAIN || err == EINPROGRESS)