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

Mark de Wever via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Thu Jun 15 10:06:53 PDT 2023


Mordante added a reviewer: mstorsjo.
Mordante added a comment.

This patch will get conflicts when D152377 <https://reviews.llvm.org/D152377> is merged.



================
Comment at: libcxx/src/filesystem/posix_compat.h:353
+
+  size_t buff_size = MAX_PATH + 10;
+  std::unique_ptr<wchar_t, decltype(&::free)> buff(static_cast<wchar_t*>(malloc(buff_size * sizeof(wchar_t))), &::free);
----------------
Please add comment why this magic value (10) is used. 


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