engine: fix broken win32 types after moving more definitions to xash3d_types.h

This commit is contained in:
Alibek Omarov 2019-03-20 01:18:26 +03:00
parent fb6fd61cd9
commit 7aa7f4dbbd
2 changed files with 7 additions and 7 deletions

View File

@ -3,11 +3,11 @@
#define XASH_TYPES_H #define XASH_TYPES_H
#ifdef _WIN32 #ifdef _WIN32
#include <stdio.h> #include <wchar.h> // off_t
#else // _WIN32
#include <sys/types.h>
#endif // _WIN32 #endif // _WIN32
#include <sys/types.h> // off_t
typedef unsigned char byte; typedef unsigned char byte;
typedef int sound_t; typedef int sound_t;
typedef float vec_t; typedef float vec_t;

View File

@ -1875,7 +1875,7 @@ typedef struct httpserver_s
{ {
char host[256]; char host[256];
int port; int port;
char path[PATH_MAX]; char path[MAX_SYSPATH];
qboolean needfree; qboolean needfree;
struct httpserver_s *next; struct httpserver_s *next;
@ -1898,7 +1898,7 @@ typedef struct httpfile_s
{ {
struct httpfile_s *next; struct httpfile_s *next;
httpserver_t *server; httpserver_t *server;
char path[PATH_MAX]; char path[MAX_SYSPATH];
file_t *file; file_t *file;
int socket; int socket;
int size; int size;
@ -2190,7 +2190,7 @@ void HTTP_Run( void )
if( curfile->state == HTTP_QUEUE ) if( curfile->state == HTTP_QUEUE )
{ {
char name[PATH_MAX]; char name[MAX_SYSPATH];
if( iActiveCount > http_maxconnections->value ) if( iActiveCount > http_maxconnections->value )
continue; continue;
@ -2203,7 +2203,7 @@ void HTTP_Run( void )
} }
Con_Reportf( "HTTP: Starting download %s from %s\n", curfile->path, curfile->server->host ); 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 ); curfile->file = FS_Open( name, "wb", true );