Merge pull request #6269 from bparker06/ftell

use 64-bit ftell() on Windows where available
This commit is contained in:
Twinaphex 2018-02-09 22:34:51 +01:00 committed by GitHub
commit 01d659a4a3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -75,6 +75,12 @@
#endif
#if defined(_WIN32) && !defined(_XBOX)
#if defined(_MSC_VER) && _MSC_VER >= 1400
#define ATLEAST_VC2005
#endif
#endif
#ifdef RARCH_INTERNAL
#ifndef VFS_FRONTEND
#define VFS_FRONTEND
@ -373,7 +379,12 @@ int64_t retro_vfs_file_tell_impl(libretro_vfs_implementation_file *stream)
return -1;
if ((stream->hints & RFILE_HINT_UNBUFFERED) == 0)
/* VC2005 and up have a special 64-bit ftell */
#ifdef ATLEAST_VC2005
return _ftelli64(stream->fp);
#else
return ftell(stream->fp);
#endif
#ifdef HAVE_MMAP
/* Need to check stream->mapped because this function