[libcxx-commits] [PATCH] D92110: [SystemZ][ZOS] Provide PATH_MAX macro for libcxx

Zbigniew Sarbinowski via Phabricator via libcxx-commits libcxx-commits at lists.llvm.org
Wed Nov 25 09:45:22 PST 2020


zibi created this revision.
zibi added a project: libc++.
Herald added a subscriber: libcxx-commits.
Herald added a reviewer: libc++.
zibi requested review of this revision.

Defining PATH_MAX to _XOPEN_PATH_MAX which is the closest macro available on z/OS.
Note that this value is 1024 which is 4 times smaller from same macro on Linux.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D92110

Files:
  libcxx/src/filesystem/operations.cpp


Index: libcxx/src/filesystem/operations.cpp
===================================================================
--- libcxx/src/filesystem/operations.cpp
+++ libcxx/src/filesystem/operations.cpp
@@ -42,6 +42,10 @@
 # pragma comment(lib, "rt")
 #endif
 
+#if defined(__MVS__) && !defined(PATH_MAX)
+#define PATH_MAX _XOPEN_PATH_MAX
+#endif
+
 _LIBCPP_BEGIN_NAMESPACE_FILESYSTEM
 
 namespace {


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D92110.307641.patch
Type: text/x-patch
Size: 391 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/libcxx-commits/attachments/20201125/51ab411c/attachment.bin>


More information about the libcxx-commits mailing list