From: lordhavoc Date: Wed, 30 May 2001 06:04:58 +0000 (+0000) Subject: fixes for zlib support, eliminated win32 FAR warnings and other warnings X-Git-Tag: RELEASE_0_2_0_RC1~810 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=92bc90c3c8694a4c528ff3b2404b53caf563dd5d;p=xonotic%2Fdarkplaces.git fixes for zlib support, eliminated win32 FAR warnings and other warnings git-svn-id: svn://svn.icculus.org/twilight/trunk/darkplaces@219 d7cf8633-e32d-0410-b094-e92efae38249 --- diff --git a/common.c b/common.c index 142af2dc..7b1fd49f 100644 --- a/common.c +++ b/common.c @@ -20,7 +20,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // common.c -- misc functions used in client and server #include -#ifndef WIN32 +#ifdef WIN32 +#include +#else #include #endif #include @@ -1550,7 +1552,7 @@ int COM_FindFile (char *filename, QFile **file, qboolean quiet, qboolean zip) int filenamelen; filenamelen = strlen (filename); - snprintf (gzfilename, sizeof (gzfilename), "%s.gz", filename); + sprintf (gzfilename, "%s.gz", filename); if (!file) Sys_Error ("COM_FindFile: file not set"); diff --git a/in_win.c b/in_win.c index 3114a908..5f0b731b 100644 --- a/in_win.c +++ b/in_win.c @@ -20,11 +20,12 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. // in_win.c -- windows 95 mouse and joystick code // 02/21/97 JCB Added extended DirectInput code to support external controllers. -#include #include "quakedef.h" #include "winquake.h" //#include "dosisms.h" +#include + #define DINPUT_BUFFERSIZE 16 #define iDirectInputCreate(a,b,c,d) pDirectInputCreate(a,b,c,d) diff --git a/quakeio.c b/quakeio.c index 710e8560..9c75da1a 100644 --- a/quakeio.c +++ b/quakeio.c @@ -28,6 +28,7 @@ $Id$ */ +#include "quakedef.h" #include #include #ifdef WIN32 @@ -38,18 +39,19 @@ # include #endif -#define HAVE_ZLIB - -#ifdef _MSC_VER -# define _POSIX_ -#endif +//#ifdef _MSC_VER +//# define _POSIX_ +//#endif #include #include #include -#include "QF/quakefs.h" -#include "QF/quakeio.h" +#ifndef PATH_MAX +# define PATH_MAX 512 +#endif + +#include "quakeio.h" #ifdef WIN32 # ifndef __BORLANDC__ diff --git a/quakeio.h b/quakeio.h index acb9a915..d8319ba7 100644 --- a/quakeio.h +++ b/quakeio.h @@ -30,13 +30,20 @@ #ifndef __quakeio_h #define __quakeio_h +#define HAVE_ZLIB + #ifdef HAVE_CONFIG_H # include "config.h" #endif #include -#include +#ifdef HAVE_ZLIB +# include +# ifdef WIN32 +# undef FAR +# endif +#endif //#include "QF/gcc_attr.h"