mirror of
https://github.com/capstone-engine/llvm-capstone.git
synced 2024-11-25 14:50:26 +00:00
[libcxx] Use the allocating form of getcwd() on Glibc and Apple platforms
This avoids having to query pathconf for a max size for preallocating a buffer for the return value. This is an extension to the POSIX getcwd() spec. Differential Revision: https://reviews.llvm.org/D97460
This commit is contained in:
parent
fb2e4f5401
commit
c7d46f221e
@ -1095,7 +1095,7 @@ void __create_symlink(path const& from, path const& to, error_code* ec) {
|
||||
path __current_path(error_code* ec) {
|
||||
ErrorHandler<path> err("current_path", ec);
|
||||
|
||||
#if defined(_LIBCPP_WIN32API)
|
||||
#if defined(_LIBCPP_WIN32API) || defined(__GLIBC__) || defined(__APPLE__)
|
||||
// Common extension outside of POSIX getcwd() spec, without needing to
|
||||
// preallocate a buffer. Also supported by a number of other POSIX libcs.
|
||||
int size = 0;
|
||||
|
Loading…
Reference in New Issue
Block a user