]> icculus.org git repositories - taylor/freespace2.git/blob - include/unix.h
rendering functions mostly done; more complete shader setup
[taylor/freespace2.git] / include / unix.h
1 // unix.h - duplicates some MS defines
2
3 #ifndef _UNIX_H
4 #define _UNIX_H
5
6
7 // same thing that's in FS2_Open (credit: Mike Harris)
8 #define DIR_SEPARATOR_CHAR '/'
9 #define DIR_SEPARATOR_STR "/"
10
11 #define __cdecl
12 #define HANDLE int
13
14 extern int filelength (int fd);
15
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)
19 #define SOCKET int
20 #define SOCKET_ERROR -1
21 #define INVALID_SOCKET -1
22
23 extern int WSAGetLastError ();
24
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
34
35 #define NETCALL_WOULDBLOCK(err) (err == EAGAIN || err == EINPROGRESS)
36
37 #endif  // _UNIX_H