[libcxx-commits] [PATCH] D153037: [libcxx] Migrate posix_compat.h layer to not use CRT filesystem functions.

Louis Dionne via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Jul 5 06:02:03 PDT 2023


ldionne added inline comments.


================
Comment at: libcxx/src/filesystem/file_descriptor.h:127-138
+    // TODO: most of the filesystem implementation uses native Win32 calls
+    // (mostly via posix_compat.h). However, here we use the C-runtime APIs to
+    // open a file, because we subsequently pass the C-runtime fd to
+    // `std::[io]fstream::__open(int fd)` in order to implement copy_file.
+    //
+    // Because we're calling the windows C-runtime, win32 error codes are
+    // translated into C error numbers by the C runtime, and returned in errno,
----------------
Is there anything blocking us from doing this now? I'm a bit concerned that this patch is adding a TODO without much of an intent to remove it (unless I'm mistaken).


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D153037/new/

https://reviews.llvm.org/D153037



More information about the libcxx-commits mailing list