1 // unix.h - duplicates some MS defines
12 #define _MAX_FNAME 255
16 #define MAX_FILENAME_LENGTH 64
19 #define __int64 long long
20 #define LARGE_INTEGER long long
21 #define stricmp strcasecmp
22 #define strnicmp strncasecmp
23 #define _strnicmp strncasecmp
27 #define _getcwd getcwd
29 #define _strlwr strlwr
30 #define _unlink unlink
33 #define byte unsigned char
35 #define __except catch
37 extern void strlwr (char *str);
38 extern int filelength (int fd);
39 extern int MulDiv (int, int, int);
41 extern void Sleep (int miliseconds);
42 extern unsigned long _beginthread (void (*pfuncStart)(void *), unsigned unStackSize, void* pArgList);
43 extern void OutputDebugString (const char *);
45 typedef struct FILETIME_s {
48 } FILETIME, *PFILETIME;
50 extern void strlwr (char *str);
51 extern int filelength (int fd);
52 extern int MulDiv (int, int, int);
53 #define CRITICAL_SECTION SDL_mutex*
55 #define STUB_FUNCTION fprintf(stderr,"STUB: %s at " __FILE__ ", line %d, thread %d\n",__FUNCTION__,__LINE__,getpid())
57 #define closesocket(A) close(A)
58 #define CopyMemory(A,B,C) memcpy(A,B,C)
59 #define UINT unsigned int
60 #define WORD unsigned short
62 #define SOCKADDR_IN struct sockaddr_in
63 #define SOCKADDR struct sockaddr
64 #define LPSOCKADDR struct sockaddr*
65 #define LPHOSTENT struct hostent*
66 #define HOSTENT struct hostent
67 #define LPINADDR struct in_addr*
68 #define LPIN_ADDR struct in_addr*
69 #define SOCKET_ERROR -1
70 #define INVALID_SOCKET -1
71 #define TIMEVAL struct timeval
72 #define SERVENT struct servent