]> icculus.org git repositories - taylor/freespace2.git/blob - include/unix.h
fix issue with looping audio streams
[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 #define SOCKLEN_T socklen_t
23
24 extern int WSAGetLastError ();
25
26 #define WSAEALREADY EALREADY
27 #define WSAEINVAL EINVAL
28 #define WSAEWOULDBLOCK EAGAIN
29 #define WSAEISCONN EISCONN
30 #define WSAECONNRESET ECONNRESET
31 #define WSAECONNABORTED ECONNABORTED
32 #define WSAESHUTDOWN ESHUTDOWN
33 #define WSAENOTSOCK ENOTSOCK
34 #define WSAENOPROTOOPT ENOPROTOOPT
35
36 #define NETCALL_WOULDBLOCK(err) (err == EAGAIN || err == EINPROGRESS)
37
38 #endif  // _UNIX_H