[libcxx] Migrate posix_compat.h layer to not use CRT filesystem functions.
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). Reviewed By: #libc, mstorsjo, Mordante Differential Revision: https://reviews.llvm.org/D153037
Loading
Please sign in to comment