Skip to content

Commit

Permalink
Use _ftelli64 on Windows
Browse files Browse the repository at this point in the history
  • Loading branch information
jokva committed Nov 9, 2018
1 parent 267125c commit 6aa8136
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions python/dlisio/core.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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 ) {
Expand Down

0 comments on commit 6aa8136

Please sign in to comment.