Skip to content
Commit 6c44ccab authored by Ryan Prichard's avatar Ryan Prichard
Browse files

[libc++] Fix 64-bit file creation for Bionic and Windows

Bionic didn't add fopen64 until API 24, but there's no meaningful
distinction between them with Bionic, so just use fopen instead.

On Windows, use _chsize_s instead of _chsize. _chsize uses a 32-bit
`long` size argument, while _chsize_s uses __int64 instead.

Factor out utils::{off64_t, fopen64, ftruncate64} for use within the
create_file function.

Reviewed By: ldionne, #libc, mstorsjo

Differential Revision: https://reviews.llvm.org/D137132
parent 5e50b808
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment