From 5795242b3919c400a5e9584a49587ce95a6e6a74 Mon Sep 17 00:00:00 2001 From: sezero Date: Thu, 30 Oct 2014 18:00:06 +0000 Subject: [PATCH] sync a few minor stuff with uhexen2 svn git-svn-id: svn+ssh://svn.code.sf.net/p/quakespasm/code/trunk@1132 af15c1b1-3010-417e-b628-4374ebc0bcbd --- quakespasm/Quake/gl_vidsdl.c | 2 +- quakespasm/Quake/net_sys.h | 6 +++++- quakespasm/Quake/quakedef.h | 6 +++--- quakespasm/Quake/snd_vorbis.c | 3 +-- 4 files changed, 10 insertions(+), 7 deletions(-) diff --git a/quakespasm/Quake/gl_vidsdl.c b/quakespasm/Quake/gl_vidsdl.c index 97d41b8a..e4a900b4 100644 --- a/quakespasm/Quake/gl_vidsdl.c +++ b/quakespasm/Quake/gl_vidsdl.c @@ -466,7 +466,7 @@ static qboolean VID_ValidMode (int width, int height, int bpp, qboolean fullscre VID_SetMode ================ */ -static int VID_SetMode (int width, int height, int bpp, qboolean fullscreen) +static qboolean VID_SetMode (int width, int height, int bpp, qboolean fullscreen) { int temp; Uint32 flags; diff --git a/quakespasm/Quake/net_sys.h b/quakespasm/Quake/net_sys.h index 78052631..e61e02e5 100644 --- a/quakespasm/Quake/net_sys.h +++ b/quakespasm/Quake/net_sys.h @@ -105,11 +105,15 @@ typedef int sys_socket_t; #define SOCKET_ERROR (-1) #if !(defined(__AROS__) || defined(__amigaos4__)) -typedef int socklen_t; +typedef LONG socklen_t; /* int32_t */ #endif #if !defined(__amigaos4__) +#if (LONG_MAX <= 2147483647L) +typedef unsigned long in_addr_t; /* u_int32_t */ +#else typedef unsigned int in_addr_t; /* u_int32_t */ #endif +#endif #define SOCKETERRNO Errno() #define ioctlsocket IoctlSocket diff --git a/quakespasm/Quake/quakedef.h b/quakespasm/Quake/quakedef.h index 816433e3..9cff4679 100644 --- a/quakespasm/Quake/quakedef.h +++ b/quakespasm/Quake/quakedef.h @@ -46,11 +46,11 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. #include "q_stdinc.h" // !!! if this is changed, it must be changed in d_ifacea.h too !!! -#define CACHE_SIZE 32 // used to align key data structures +#define CACHE_SIZE 32 // used to align key data structures -#define UNUSED(x) (x = x) // for pesky compiler / lint warnings +#define Q_UNUSED(x) (x = x) // for pesky compiler / lint warnings -#define MINIMUM_MEMORY 0x550000 +#define MINIMUM_MEMORY 0x550000 #define MINIMUM_MEMORY_LEVELPAK (MINIMUM_MEMORY + 0x100000) #define MAX_NUM_ARGVS 50 diff --git a/quakespasm/Quake/snd_vorbis.c b/quakespasm/Quake/snd_vorbis.c index ed92d803..6f8257d1 100644 --- a/quakespasm/Quake/snd_vorbis.c +++ b/quakespasm/Quake/snd_vorbis.c @@ -56,7 +56,7 @@ static int ovc_fseek (void *f, ogg_int64_t off, int whence) return FS_fseek((fshandle_t *)f, (long) off, whence); } -static const ov_callbacks ovc_qfs = +static ov_callbacks ovc_qfs = { (size_t (*)(void *, size_t, size_t, void *)) FS_fread, (int (*)(void *, ogg_int64_t, int)) ovc_fseek, @@ -169,7 +169,6 @@ static int S_VORBIS_CodecReadStream (snd_stream_t *stream, int bytes, void *buff if (res < 0) return res; - return cnt; }