From 7aa7f4dbbd309f82fcd28a31c5fc071062794a2c Mon Sep 17 00:00:00 2001 From: Alibek Omarov Date: Wed, 20 Mar 2019 01:18:26 +0300 Subject: [PATCH] engine: fix broken win32 types after moving more definitions to xash3d_types.h --- common/xash3d_types.h | 6 +++--- engine/common/net_ws.c | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/common/xash3d_types.h b/common/xash3d_types.h index da71f4aa..181e7afa 100644 --- a/common/xash3d_types.h +++ b/common/xash3d_types.h @@ -3,11 +3,11 @@ #define XASH_TYPES_H #ifdef _WIN32 -#include -#else // _WIN32 -#include +#include // off_t #endif // _WIN32 +#include // off_t + typedef unsigned char byte; typedef int sound_t; typedef float vec_t; diff --git a/engine/common/net_ws.c b/engine/common/net_ws.c index ceb31644..0ea68a7b 100644 --- a/engine/common/net_ws.c +++ b/engine/common/net_ws.c @@ -1875,7 +1875,7 @@ typedef struct httpserver_s { char host[256]; int port; - char path[PATH_MAX]; + char path[MAX_SYSPATH]; qboolean needfree; struct httpserver_s *next; @@ -1898,7 +1898,7 @@ typedef struct httpfile_s { struct httpfile_s *next; httpserver_t *server; - char path[PATH_MAX]; + char path[MAX_SYSPATH]; file_t *file; int socket; int size; @@ -2190,7 +2190,7 @@ void HTTP_Run( void ) if( curfile->state == HTTP_QUEUE ) { - char name[PATH_MAX]; + char name[MAX_SYSPATH]; if( iActiveCount > http_maxconnections->value ) continue; @@ -2203,7 +2203,7 @@ void HTTP_Run( void ) } Con_Reportf( "HTTP: Starting download %s from %s\n", curfile->path, curfile->server->host ); - Q_snprintf( name, PATH_MAX, "%s.incomplete", curfile->path ); + Q_snprintf( name, sizeof( name ), "%s.incomplete", curfile->path ); curfile->file = FS_Open( name, "wb", true );