Package: llvm-toolchain-6.0 / 1:6.0.1-10

hurd-pathmax.diff Patch series | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
Index: llvm-toolchain-snapshot_6.0~svn317126/clang/lib/Basic/FileManager.cpp
===================================================================
--- llvm-toolchain-snapshot_6.0~svn317126.orig/clang/lib/Basic/FileManager.cpp
+++ llvm-toolchain-snapshot_6.0~svn317126/clang/lib/Basic/FileManager.cpp
@@ -501,6 +501,12 @@ void FileManager::invalidateCache(const
   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();
Index: llvm-toolchain-snapshot_6.0~svn317126/lldb/include/lldb/lldb-defines.h
===================================================================
--- llvm-toolchain-snapshot_6.0~svn317126.orig/lldb/include/lldb/lldb-defines.h
+++ llvm-toolchain-snapshot_6.0~svn317126/lldb/include/lldb/lldb-defines.h
@@ -28,6 +28,11 @@
 #define INT32_MAX 2147483647
 #endif
 
+// For GNU Hurd
+#if defined(__GNU__) && !defined(PATH_MAX)
+# define PATH_MAX 4096
+#endif
+
 #if !defined(UINT32_MAX)
 #define UINT32_MAX 4294967295U
 #endif
Index: llvm-toolchain-snapshot_6.0~svn317126/lib/Support/Unix/Path.inc
===================================================================
--- llvm-toolchain-snapshot_6.0~svn317126.orig/lib/Support/Unix/Path.inc
+++ llvm-toolchain-snapshot_6.0~svn317126/lib/Support/Unix/Path.inc
@@ -64,6 +64,7 @@
 // For GNU Hurd
 #if defined(__GNU__) && !defined(PATH_MAX)
 # define PATH_MAX 4096
+# define MAXPATHLEN 4096
 #endif
 
 #include <sys/types.h>
Index: llvm-toolchain-snapshot_6.0~svn317126/tools/dsymutil/DwarfLinker.cpp
===================================================================
--- llvm-toolchain-snapshot_6.0~svn317126.orig/tools/dsymutil/DwarfLinker.cpp
+++ llvm-toolchain-snapshot_6.0~svn317126/tools/dsymutil/DwarfLinker.cpp
@@ -93,6 +93,11 @@
 #include <utility>
 #include <vector>
 
+// For GNU Hurd
+#if defined(__GNU__) && !defined(PATH_MAX)
+# define PATH_MAX 4096
+#endif
+
 namespace llvm {
 namespace dsymutil {
 
Index: llvm-toolchain-snapshot_6.0~svn317126/polly/lib/External/ppcg/cuda_common.c
===================================================================
--- llvm-toolchain-snapshot_6.0~svn317126.orig/polly/lib/External/ppcg/cuda_common.c
+++ llvm-toolchain-snapshot_6.0~svn317126/polly/lib/External/ppcg/cuda_common.c
@@ -15,6 +15,11 @@
 #include "cuda_common.h"
 #include "ppcg.h"
 
+// For GNU Hurd
+#if defined(__GNU__) && !defined(PATH_MAX)
+# define PATH_MAX 4096
+#endif
+
 /* Open the host .cu file and the kernel .hu and .cu files for writing.
  * Add the necessary includes.
  */
Index: llvm-toolchain-6.0-6.0.1/clang/lib/Frontend/ModuleDependencyCollector.cpp
===================================================================
--- llvm-toolchain-6.0-6.0.1.orig/clang/lib/Frontend/ModuleDependencyCollector.cpp
+++ llvm-toolchain-6.0-6.0.1/clang/lib/Frontend/ModuleDependencyCollector.cpp
@@ -97,6 +97,11 @@ struct ModuleDependencyMMCallbacks : pub
 
 }
 
+// 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