[libcxx-commits] [PATCH] D153037: [libcxx] Migrate posix_compat.h layer to not use CRT filesystem functions.
James Y Knight via Phabricator via libcxx-commits
libcxx-commits at lists.llvm.org
Thu Jun 15 08:35:17 PDT 2023
jyknight created this revision.
Herald added a project: All.
jyknight requested review of this revision.
Herald added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
Right now, the filesystem APIs _mostly_ use Win32 API calls, but a
small number of functions use CRT APIs instead. The semantics are
effectively the same, except for which sorts of error codes are
returned. We want to be consistent about returning only native Win32
error codes, as a prerequisite for https://reviews.llvm.org/D151493.
This change switches getcwd, chdir, and mkdir. It does _not_ switch
open/close, because there are difficulties around the use of C-runtime
file descriptor numbers. Instead, those two APIs are removed from
posix_compat.h, and the win32-specific code inlined into the
operations.cpp FileDescriptor class (with a TODO comment).
Repository:
rG LLVM Github Monorepo
https://reviews.llvm.org/D153037
Files:
libcxx/src/filesystem/operations.cpp
libcxx/src/filesystem/posix_compat.h
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D153037.531772.patch
Type: text/x-patch
Size: 3892 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20230615/9517bfd5/attachment.bin>
More information about the libcxx-commits
mailing list