From 0a4caac3c6fef563a5b6ceee930d1063800803ef Mon Sep 17 00:00:00 2001 From: Bill Currie Date: Thu, 2 Aug 2001 23:00:39 +0000 Subject: [PATCH] mingw compile fixes --- libs/audio/cd/cd_win.c | 2 +- libs/console/server.c | 2 ++ nq/source/sys_win.c | 6 +++--- qw/source/cl_sys_win.c | 6 +++--- qw/source/sv_sys_win.c | 4 ++-- 5 files changed, 11 insertions(+), 9 deletions(-) diff --git a/libs/audio/cd/cd_win.c b/libs/audio/cd/cd_win.c index d327ae781..afa1e8b4b 100644 --- a/libs/audio/cd/cd_win.c +++ b/libs/audio/cd/cd_win.c @@ -354,7 +354,7 @@ I_CDAudio_Update (void) static void I_CD_f (void) { - char *command; + const char *command; int ret; int n; diff --git a/libs/console/server.c b/libs/console/server.c index e64807b0e..4540d255a 100644 --- a/libs/console/server.c +++ b/libs/console/server.c @@ -53,6 +53,8 @@ #include "QF/qtypes.h" #include "QF/sys.h" +#include "compat.h" + #ifdef HAVE_CURSES_H static int use_curses = 1; diff --git a/nq/source/sys_win.c b/nq/source/sys_win.c index 58d4ce4e7..593cd61d3 100644 --- a/nq/source/sys_win.c +++ b/nq/source/sys_win.c @@ -333,7 +333,7 @@ Sys_InitFloatTime (void) } -char * +const char * Sys_ConsoleInput (void) { static char text[256]; @@ -502,7 +502,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, parms.argv = argv; - COM_InitArgv (parms.argc, parms.argv); + COM_InitArgv (parms.argc, (const char**)parms.argv); parms.argc = com_argc; parms.argv = com_argv; @@ -633,6 +633,6 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, } void -Sys_DebugLog (char *file, char *fmt, ...) +Sys_DebugLog (const char *file, const char *fmt, ...) { } diff --git a/qw/source/cl_sys_win.c b/qw/source/cl_sys_win.c index 204964e31..168910874 100644 --- a/qw/source/cl_sys_win.c +++ b/qw/source/cl_sys_win.c @@ -84,7 +84,7 @@ void Sys_PushFPCW_SetHigh (void); void -Sys_DebugLog (char *file, char *fmt, ...) +Sys_DebugLog (const char *file, const char *fmt, ...) { va_list argptr; static char data[1024]; @@ -226,7 +226,7 @@ Sys_Quit (void) } -char * +const char * Sys_ConsoleInput (void) { static char text[256]; @@ -412,7 +412,7 @@ WinMain (HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, host_parms.argv = argv; - COM_InitArgv (host_parms.argc, host_parms.argv); + COM_InitArgv (host_parms.argc, (const char**)host_parms.argv); host_parms.argc = com_argc; host_parms.argv = com_argv; diff --git a/qw/source/sv_sys_win.c b/qw/source/sv_sys_win.c index 460ac56f4..510e33744 100644 --- a/qw/source/sv_sys_win.c +++ b/qw/source/sv_sys_win.c @@ -74,7 +74,7 @@ Sys_Error (const char *error, ...) /* Sys_ConsoleInput */ -char * +const char * Sys_ConsoleInput (void) { static char text[256]; @@ -170,7 +170,7 @@ Sys_Init (void) char *newargv[256]; int -main (int argc, char **argv) +main (int argc, const char **argv) { double newtime, time, oldtime; struct timeval timeout;