1
0
mirror of https://github.com/facebook/zstd.git synced 2025-12-24 17:21:03 +03:00

Fix #1591 - Not building on MinGW-W64

Add a static function LONG_TELL for the forth #if branch
This commit is contained in:
myzhang1029
2019-04-24 20:06:05 +08:00
parent 3d673f3275
commit f837326f11

View File

@@ -269,6 +269,13 @@ void FIO_addAbortHandler()
else
return -1;
}
static __int64 LONG_TELL(FILE* file) {
LARGE_INTEGER off, newOff;
off.QuadPart = 0;
newOff.QuadPart = 0;
SetFilePointerEx((HANDLE) _get_osfhandle(_fileno(file)), off, &newOff, FILE_CURRENT);
return newOff.QuadPart;
}
#else
# define LONG_SEEK fseek
# define LONG_TELL ftell