[libcxx-commits] [PATCH] D91141: [libcxx] Implement the stat function family on top of native windows APIs

Martin Storsjö via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Tue Nov 10 01:43:04 PST 2020


mstorsjo created this revision.
mstorsjo added reviewers: libc++, rnk.
Herald added a project: libc++.
Herald added 1 blocking reviewer(s): libc++.
mstorsjo requested review of this revision.

While the windows CRTs (the modern UCRT, and the legacy msvcrt.dll that mingw still often defaults to) do provide stat functions, they're a bit lacking - they only provide second precision on the modification time, lack support for symlinks and a few other details.

Instead reimplement them using a couple windows native functions, getting exactly the info we need. (Technically, the implementation within the CRT calls these functions anyway.)

If we only need a few fields, we could also do with fewer calls, as a later optimization.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D91141

Files:
  libcxx/src/filesystem/filesystem_common.h
  libcxx/src/filesystem/operations.cpp

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D91141.304094.patch
Type: text/x-patch
Size: 6259 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201110/debcab7a/attachment-0001.bin>


More information about the libcxx-commits mailing list