mirror of
https://github.com/libretro/RetroArch.git
synced 2025-01-23 09:55:48 +00:00
Merge pull request #6302 from bparker06/fseek
use 64-bit file offsets/seeking on windows
This commit is contained in:
commit
be87075618
2
Makefile
2
Makefile
@ -26,7 +26,7 @@ endif
|
||||
|
||||
OBJ :=
|
||||
LIBS :=
|
||||
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL
|
||||
DEFINES := -DHAVE_CONFIG_H -DRARCH_INTERNAL -D_FILE_OFFSET_BITS=64
|
||||
DEFINES += -DGLOBAL_CONFIG_DIR='"$(GLOBAL_CONFIG_DIR)"'
|
||||
|
||||
ifneq ($(findstring BSD,$(OS)),)
|
||||
|
@ -120,7 +120,12 @@ int64_t retro_vfs_file_seek_internal(libretro_vfs_implementation_file *stream, i
|
||||
goto error;
|
||||
|
||||
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
|
||||
return fseek(stream->fp, (long)offset, whence);
|
||||
/* VC2005 and up have a special 64-bit fseek */
|
||||
#ifdef ATLEAST_VC2005
|
||||
return _fseeki64(stream->fp, offset, whence);
|
||||
#else
|
||||
return fseeko(stream->fp, (off_t)offset, whence);
|
||||
#endif
|
||||
|
||||
#ifdef HAVE_MMAP
|
||||
/* Need to check stream->mapped because this function is
|
||||
|
Loading…
x
Reference in New Issue
Block a user