Issue #16800: tempfile.gettempdir() no longer left temporary files when
the disk is full.  Original patch by Amir Szekely.
Fix for issue #16800: Use buffered write to handle EINTR.
Issue #5308: Raise ValueError when marshalling too large object (a sequence
with size >= 2**31), instead of producing illegal marshal data.
Issue #16743: Fix mmap overflow check on 32 bit Windows