[all-commits] [llvm/llvm-project] 6c44cc: [libc++] Fix 64-bit file creation for Bionic and W...
Ryan Prichard via All-commits
all-commits at lists.llvm.org
Thu Dec 1 14:48:43 PST 2022
Branch: refs/heads/main
Home: https://github.com/llvm/llvm-project
Commit: 6c44ccab43e99e1a48db917b4229ca651b303c3f
https://github.com/llvm/llvm-project/commit/6c44ccab43e99e1a48db917b4229ca651b303c3f
Author: Ryan Prichard <rprichard at google.com>
Date: 2022-12-01 (Thu, 01 Dec 2022)
Changed paths:
M libcxx/test/support/filesystem_test_helper.h
Log Message:
-----------
[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
More information about the All-commits
mailing list