From 6aa8136fd0fb6029b7c7f6184a6a646c7693909b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B8rgen=20Kvalsvik?= Date: Fri, 9 Nov 2018 16:51:00 +0100 Subject: [PATCH] Use _ftelli64 on Windows --- python/dlisio/core.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/python/dlisio/core.cpp b/python/dlisio/core.cpp index 8c2ce274d..cda6f5bcf 100644 --- a/python/dlisio/core.cpp +++ b/python/dlisio/core.cpp @@ -186,11 +186,11 @@ bookmark mark( std::FILE* fp, int& remaining ) { auto err = std::fgetpos( fp, &mark.pos ); if( err ) throw io_error( errno ); - /* - * TODO: use _ftell64 or similar on Windows, to handle >2G files. - * It's not necessary for repositioning, but helps diagnostics - */ +#ifndef _WIN32 mark.tell = std::ftell( fp ); +#else + mark.tell = _ftelli64( fp ); +#endif if( mark.tell == -1 ) throw io_error( errno ); while( true ) {