From c5398b26cb3634741ba377c774501244e6fdd842 Mon Sep 17 00:00:00 2001 From: PColis <85942741+PColis@users.noreply.github.com> Date: Fri, 2 Jul 2021 13:08:28 +0200 Subject: [PATCH] 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. --- lib/src/CacheFile.cc | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/src/CacheFile.cc b/lib/src/CacheFile.cc index a8de675d..d1c80fe7 100644 --- a/lib/src/CacheFile.cc +++ b/lib/src/CacheFile.cc @@ -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; }