Fix 32/64-bit issues with QFile::map/unmap() on *nix systems
commit0689a85ca20a36808b388efc452892606d47b34d
authorJoão Abecasis <joao@abecasis.name>
Wed, 7 Oct 2009 12:48:50 +0000 (7 14:48 +0200)
committerJoão Abecasis <joao@abecasis.name>
Wed, 21 Oct 2009 11:45:46 +0000 (21 13:45 +0200)
tree23069045048c03655d7478a02d82d80368f1910b
parent2a293f91a6b550cd72851d08616b4a8199faabdd
Fix 32/64-bit issues with QFile::map/unmap() on *nix systems

We would previously silently ignore overflows in 32-bit systems and not
properly support 64-bit offsets in systems that support it because of
integer overflow.

There was also a problem that could prevent unmap from succeeding,
because we were passing the wrong length argument.

Task-number: QT-1594
Reviewed-by: Thiago Macieira
src/corelib/io/qfsfileengine_p.h
src/corelib/io/qfsfileengine_unix.cpp