mirror of
https://github.com/YGGverse/xash3d-fwgs.git
synced 2025-01-23 05:14:15 +00:00
common: add fs_size_t typedef, for read()/write() return value
This commit is contained in:
parent
d8b3ab4dcc
commit
764ef93984
@ -137,6 +137,7 @@ GNU General Public License for more details.
|
|||||||
#define HAVE_DUP
|
#define HAVE_DUP
|
||||||
|
|
||||||
#endif //WIN32
|
#endif //WIN32
|
||||||
|
|
||||||
#ifndef XASH_LOW_MEMORY
|
#ifndef XASH_LOW_MEMORY
|
||||||
#define XASH_LOW_MEMORY 0
|
#define XASH_LOW_MEMORY 0
|
||||||
#endif
|
#endif
|
||||||
|
@ -117,6 +117,11 @@ typedef struct file_s file_t; // normal file
|
|||||||
typedef struct wfile_s wfile_t; // wad file
|
typedef struct wfile_s wfile_t; // wad file
|
||||||
typedef struct stream_s stream_t; // sound stream for background music playing
|
typedef struct stream_s stream_t; // sound stream for background music playing
|
||||||
typedef off_t fs_offset_t;
|
typedef off_t fs_offset_t;
|
||||||
|
#if XASH_WIN32
|
||||||
|
typedef int fs_size_t; // return type of _read, _write funcs
|
||||||
|
#else /* !XASH_WIN32 */
|
||||||
|
typedef ssize_t fs_size_t;
|
||||||
|
#endif /* !XASH_WIN32 */
|
||||||
|
|
||||||
typedef struct dllfunc_s
|
typedef struct dllfunc_s
|
||||||
{
|
{
|
||||||
|
@ -606,7 +606,7 @@ pack_t *FS_LoadPackPAK( const char *packfile, int *error )
|
|||||||
int i, numpackfiles;
|
int i, numpackfiles;
|
||||||
pack_t *pack;
|
pack_t *pack;
|
||||||
dpackfile_t *info;
|
dpackfile_t *info;
|
||||||
ssize_t c;
|
fs_size_t c;
|
||||||
|
|
||||||
packhandle = open( packfile, O_RDONLY|O_BINARY );
|
packhandle = open( packfile, O_RDONLY|O_BINARY );
|
||||||
|
|
||||||
@ -722,7 +722,7 @@ static zip_t *FS_LoadZip( const char *zipfile, int *error )
|
|||||||
zipfile_t *info = NULL;
|
zipfile_t *info = NULL;
|
||||||
char filename_buffer[MAX_SYSPATH];
|
char filename_buffer[MAX_SYSPATH];
|
||||||
zip_t *zip = (zip_t *)Mem_Calloc( fs_mempool, sizeof( *zip ));
|
zip_t *zip = (zip_t *)Mem_Calloc( fs_mempool, sizeof( *zip ));
|
||||||
ssize_t c;
|
fs_size_t c;
|
||||||
|
|
||||||
zip->handle = open( zipfile, O_RDONLY|O_BINARY );
|
zip->handle = open( zipfile, O_RDONLY|O_BINARY );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user