Fix appending to large files (>4GB) on Windows

Juhani Ränkimies juhani@REDACTED
Fri Oct 1 06:24:25 CEST 2010


Append mode doesn't work for files larger that 4GB on Windows. The
problem occurs when the file is larger than 4GB at opening time. If
it's smaller at opening time, it can grow beyond 4GB.

I suspect that passing NULL lpDistanceToMoveHigh to SetFilePointer in
the file driver causes moves larger that 2^32 to fail.
http://msdn.microsoft.com/EN-US/library/aa365541.aspx

git fetch git://github.com/juranki/otp.git windows_file_append_2

http://github.com/juranki/otp/tree/windows_file_append_2

Cliff Williams identified the problem when debugging couchdb:
http://mail-archives.apache.org/mod_mbox/couchdb-user/201009.mbox/%3C4CA3520C.7050606@aol.com%3E


-juhani





-- 
Juhani Ränkimies
+358 40 762 4323


More information about the erlang-patches mailing list