[libcxx-commits] [PATCH] D137132: [libc++] Fix 64-bit file creation for Bionic and Windows
Ryan Prichard via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Dec 1 14:16:30 PST 2022
rprichard added a comment.
In D137132#3959285 <https://reviews.llvm.org/D137132#3959285>, @mstorsjo wrote:
> This looks ok to me (as long as the configurations in CI still are passing I don't see any issue with it). I don't really see the practical rationale for changing from `_chsize` to `_chsize_s` though - if the only difference is that the latter returns the actual error code instead of `-1` on error, but we still do `return ::_chsize_s(fd, length) ? -1 : 0;`, there's not much point in doing that instead of just `return ::_chsize(fd, length);` right? Or is there some other aspect that isn't spelled out here?
`_chsize` uses a long size parameter, which is 32 bits on Windows, while `_chsize_s` uses `__int64`. Maybe I should add that to the commit comment.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D137132/new/
https://reviews.llvm.org/D137132
More information about the libcxx-commits
mailing list