[PATCH] D53410: Add missing PATH_MAX for GNU Hurd support

Sylvestre Ledru via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Thu Oct 18 13:28:48 PDT 2018


sylvestre.ledru created this revision.
sylvestre.ledru added a reviewer: rnk.
Herald added a subscriber: krytarowski.

If you have a better place to put them, don't hesitate to let me know :)

Patch by Svante Signell & myself


Repository:
  rC Clang

https://reviews.llvm.org/D53410

Files:
  lib/Basic/FileManager.cpp
  lib/Frontend/ModuleDependencyCollector.cpp


Index: lib/Frontend/ModuleDependencyCollector.cpp
===================================================================
--- lib/Frontend/ModuleDependencyCollector.cpp
+++ lib/Frontend/ModuleDependencyCollector.cpp
@@ -99,6 +99,11 @@
 
 }
 
+// For GNU Hurd
+#if defined(__GNU__) && !defined(PATH_MAX)
+# define PATH_MAX 4096
+#endif
+
 // TODO: move this to Support/Path.h and check for HAVE_REALPATH?
 static bool real_path(StringRef SrcPath, SmallVectorImpl<char> &RealPath) {
 #ifdef LLVM_ON_UNIX
Index: lib/Basic/FileManager.cpp
===================================================================
--- lib/Basic/FileManager.cpp
+++ lib/Basic/FileManager.cpp
@@ -511,6 +511,12 @@
   UniqueRealFiles.erase(Entry->getUniqueID());
 }
 
+// For GNU Hurd
+#if defined(__GNU__) && !defined(PATH_MAX)
+# define PATH_MAX 4096
+#endif
+
+
 void FileManager::GetUniqueIDMapping(
                    SmallVectorImpl<const FileEntry *> &UIDToFiles) const {
   UIDToFiles.clear();


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D53410.170117.patch
Type: text/x-patch
Size: 968 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20181018/34d7925a/attachment.bin>


More information about the cfe-commits mailing list