1 // unix.h - duplicates some MS defines
15 #define _MAX_FNAME 255
19 #define MAX_FILENAME_LENGTH 64
22 #define __int64 long long
23 #define LARGE_INTEGER long long
24 #define stricmp strcasecmp
25 #define strnicmp strncasecmp
26 #define _strnicmp strncasecmp
30 #define _getcwd getcwd
32 #define _strlwr strlwr
33 #define _unlink unlink
36 #define _access access
37 #define byte unsigned char
39 #define __except catch
44 extern void strlwr (char *str);
45 extern int filelength (int fd);
46 extern int MulDiv (int, int, int);
48 extern void Sleep (int miliseconds);
49 extern unsigned long _beginthread (void (*pfuncStart)(void *), unsigned unStackSize, void* pArgList);
50 extern void OutputDebugString (const char *);
51 extern int WSAGetLastError ();
53 typedef struct FILETIME_s {
56 } FILETIME, *PFILETIME;
58 #define WAVE_FORMAT_PCM 1
59 #define WAVE_FORMAT_ADPCM 2
65 DWORD nAvgBytesPerSec;
78 DWORD nAvgBytesPerSec;
84 extern void strlwr (char *str);
85 extern int filelength (int fd);
86 extern int MulDiv (int, int, int);
87 #define CRITICAL_SECTION SDL_mutex*
90 #define STUB_FUNCTION fprintf(stderr,"STUB: %s at " __FILE__ ", line %d, thread %d\n",__FUNCTION__,__LINE__,getpid())
95 #define closesocket(A) close(A)
96 #define CopyMemory(A,B,C) memcpy(A,B,C)
97 #define UINT unsigned int
99 #define SOCKADDR_IN struct sockaddr_in
100 #define SOCKADDR struct sockaddr
101 #define LPSOCKADDR struct sockaddr*
102 #define LPHOSTENT struct hostent*
103 #define HOSTENT struct hostent
104 #define LPINADDR struct in_addr*
105 #define LPIN_ADDR struct in_addr*
106 #define SOCKET_ERROR -1
107 #define INVALID_SOCKET -1
108 #define TIMEVAL struct timeval
109 #define SERVENT struct servent
112 #define WSAEALREADY EALREADY
113 #define WSAEINVAL EINVAL
114 #define WSAEWOULDBLOCK EAGAIN
115 #define WSAEISCONN EISCONN
116 #define WSAECONNRESET ECONNRESET
117 #define WSAECONNABORTED ECONNABORTED
118 #define WSAESHUTDOWN ESHUTDOWN
120 typedef struct channel
123 int snd_id; // identifies which
124 int pdsb; // pointer to the secondary buffer t
125 int pds3db; // 3D interface, only used if sound buffer created w
126 int looping; // flag to i
127 int vol; // in Direct
128 int priority; // implementation de