File: hurd_PATH_MAX_missing

package info (click to toggle)
widelands 2%3A1.1-3
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 600,516 kB
  • sloc: cpp: 166,473; ansic: 18,683; python: 7,697; sh: 1,363; xml: 467; makefile: 45
file content (42 lines) | stat: -rw-r--r-- 1,273 bytes parent folder | 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
Author: Enrico Tassi <gareuselesinge@debian.org>
Description: define PATH_MAX if not defined (i.e. on hurd)
Forwarded-Upstream: https://github.com/widelands/widelands/issues/5614

Note that Upstream only included the first chunk. No idea whether the
second chunk is still necessary nowadays on Hurd.

---
 src/io/filesystem/filesystem.cc |    4 ++++
 src/wlapplication.cc            |    4 ++++
 2 files changed, 8 insertions(+)

Index: b/src/io/filesystem/filesystem.cc
===================================================================
--- a/src/io/filesystem/filesystem.cc
+++ b/src/io/filesystem/filesystem.cc
@@ -68,6 +68,10 @@
 #define PATH_MAX 0x10000
 #endif
 
+#ifndef PATH_MAX /* This happens, for example on the Hurd architecture */
+ #define PATH_MAX 1024
+#endif
+
 namespace {
 /// A class that makes iteration over filename_?.* templates easy. It is much faster than using
 /// regex.
Index: b/src/wlapplication.cc
===================================================================
--- a/src/wlapplication.cc
+++ b/src/wlapplication.cc
@@ -121,6 +121,10 @@ std::string get_executable_directory(con
 	return executabledir;
 }
 
+#ifndef PATH_MAX /* This happens, for example on the Hurd architecture */
+ #define PATH_MAX 1024
+#endif
+
 namespace {
 
 /**