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

Juhani Ränkimies <>
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.

git fetch git:// windows_file_append_2

Cliff Williams identified the problem when debugging couchdb:


Juhani Ränkimies
+358 40 762 4323

More information about the erlang-patches mailing list