Update CacheFile.cc (#916)

On Windows, ftell returns a 32 bits signed integer.
On Windows we had to use _ftelli64 to return a signed 64 bits integer.
This commit is contained in:
PColis 2021-07-02 13:08:28 +02:00 committed by GitHub
parent 0efd0c34c1
commit c5398b26cb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -66,7 +66,11 @@ void CacheFile::append(const char *data, size_t length)
size_t CacheFile::length()
{
if (file_)
#ifdef _WIN32
return _ftelli64(file_);
#else
return ftell(file_);
#endif
return 0;
}