Ticket #3953: mapped_file.patch
File mapped_file.patch, 849 bytes (added by , 13 years ago) |
---|
-
libs/iostreams/src/mapped_file.cpp
197 197 if (p.new_file_size != 0 && !readonly) { 198 198 LONG sizehigh = (p.new_file_size >> (sizeof(LONG) * 8)); 199 199 LONG sizelow = (p.new_file_size & 0xffffffff); 200 ::SetFilePointer(handle_, sizelow, &sizehigh, FILE_BEGIN); 201 if (::GetLastError() != NO_ERROR || !::SetEndOfFile(handle_)) 200 DWORD result = ::SetFilePointer(handle_, sizelow, &sizehigh, FILE_BEGIN); 201 if ( result == INVALID_SET_FILE_POINTER 202 && ::GetLastError() != NO_ERROR 203 || !::SetEndOfFile(handle_)) 202 204 cleanup_and_throw("failed setting file size"); 203 205 } 204 206