summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMauri de Souza Nunes <mauri870@gmail.com>2019-09-11 19:37:55 -0300
committerAndreas Kling <awesomekling@gmail.com>2019-09-13 09:21:41 +0200
commit6d7c92835962cc9b479bf29a50e1b5e4ccecb557 (patch)
tree4981fb30a67a86cd87d1afbf87518cd056c79c05
parentc74e4d0c80cd5241f7892f9afcec3338214e26bb (diff)
downloadserenity-6d7c92835962cc9b479bf29a50e1b5e4ccecb557.zip
LibC: Add MAXPATHLEN to limits.h
MAXPATHLEN defines the longest permissable path length after expanding symbolic links. It is used to allocate a temporary buffer from the buffer pool in which to do the name expansion, hence should be a power of two. On UNIX MAXPATHLEN has the same size as PATH_MAX.
-rw-r--r--Libraries/LibC/limits.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/Libraries/LibC/limits.h b/Libraries/LibC/limits.h
index 2561209168..0be8a42600 100644
--- a/Libraries/LibC/limits.h
+++ b/Libraries/LibC/limits.h
@@ -5,6 +5,9 @@
#define PAGE_SIZE 4096
#define PATH_MAX 4096
+#if !defined MAXPATHLEN && defined PATH_MAX
+# define MAXPATHLEN PATH_MAX
+#endif
#define INT_MAX INT32_MAX
#define INT_MIN INT32_MIN