bpo-24658: Fix read/write greater than 2 GiB on macOS (GH-1705)


 On macOS, fix reading from and writing into a file with a size larger than 2 GiB.
(cherry picked from commit 74a8b6ea7e0a8508b13a1c75ec9b91febd8b5557)

Co-authored-by: Stéphane Wirtel <stephane@wirtel.be>
5 files changed