[libcxx-commits] [PATCH] D137132: [libc++] Fix 64-bit file creation for Bionic and Windows

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Dec 1 14:27:09 PST 2022


mstorsjo accepted this revision.
mstorsjo added a comment.

In D137132#3964968 <https://reviews.llvm.org/D137132#3964968>, @rprichard wrote:

> 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.

Oh, I see - thanks. That sounds reasonable yes.

Thanks for updating the commit message!

The patch is ok with me as long as CI keeps working (and the only failure there seems to be a fluke).


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