diff --git a/include/common.h b/include/common.h index f569299..fdc3c7b 100644 --- a/include/common.h +++ b/include/common.h @@ -24,9 +24,6 @@ typedef unsigned char byte; #define BYTE_DEFINED 1 #endif -#undef qtrue -#undef qfalse - typedef enum {qfalse, qtrue} qboolean; //============================================================================ diff --git a/include/net.h b/include/net.h index 08be981..a6a10d6 100644 --- a/include/net.h +++ b/include/net.h @@ -314,7 +314,7 @@ typedef struct _PollProcedure { struct _PollProcedure *next; double nextTime; - void (*procedure)(); + void (*procedure)(void* arg); void *arg; } PollProcedure; diff --git a/include/quakedef.h b/include/quakedef.h index 770232c..a24d9ee 100644 --- a/include/quakedef.h +++ b/include/quakedef.h @@ -49,6 +49,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include #include #include +#ifndef _WIN32 +#include +#endif #if defined(WINQUAKE) #include "winquake.h" diff --git a/src/net_main.c b/src/net_main.c index 26b03b6..535a947 100644 --- a/src/net_main.c +++ b/src/net_main.c @@ -49,8 +49,8 @@ qboolean slistLocal = qtrue; static double slistStartTime; static int slistLastShown; -static void Slist_Send(void); -static void Slist_Poll(void); +static void Slist_Send(void* arg); +static void Slist_Poll(void* arg); PollProcedure slistSendProcedure = {NULL, 0.0, Slist_Send}; PollProcedure slistPollProcedure = {NULL, 0.0, Slist_Poll}; @@ -312,7 +312,7 @@ void NET_Slist_f (void) } -static void Slist_Send(void) +static void Slist_Send(void* arg) { for (net_driverlevel=0; net_driverlevel < net_numdrivers; net_driverlevel++) { @@ -328,7 +328,7 @@ static void Slist_Send(void) } -static void Slist_Poll(void) +static void Slist_Poll(void* arg) { for (net_driverlevel=0; net_driverlevel < net_numdrivers; net_driverlevel++) { diff --git a/src/sys.c b/src/sys.c index b1d55d9..d5cf242 100644 --- a/src/sys.c +++ b/src/sys.c @@ -142,7 +142,7 @@ void Sys_Error (char *error, ...) char string[1024]; // change stdin to non blocking - fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~FNDELAY); + fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) & ~O_NDELAY); va_start (argptr,error); vsprintf (string,error,argptr); @@ -386,7 +386,7 @@ int main (int c, char **v) // caching is disabled by default, use -cachedir to enable // parms.cachedir = cachedir; - fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY); + fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NDELAY); Host_Init(&parms); @@ -395,7 +395,7 @@ int main (int c, char **v) if (COM_CheckParm("-nostdout")) nostdout = 1; else { - fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | FNDELAY); + fcntl(0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NDELAY); printf ("Milsko Quake -- Version %0.3f\n", LINUX_VERSION); }