Fix #1591 - Not building on MinGW-W64

Add a static function LONG_TELL for the forth #if branch
dev
myzhang1029 2019-04-24 20:06:05 +08:00
parent 3d673f3275
commit f837326f11
No known key found for this signature in database
GPG Key ID: C045CA1124D12D67
1 changed files with 7 additions and 0 deletions

View File

@ -269,6 +269,13 @@ void FIO_addAbortHandler()
else else
return -1; 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 #else
# define LONG_SEEK fseek # define LONG_SEEK fseek
# define LONG_TELL ftell # define LONG_TELL ftell