From 6d7c92835962cc9b479bf29a50e1b5e4ccecb557 Mon Sep 17 00:00:00 2001 From: Mauri de Souza Nunes Date: Wed, 11 Sep 2019 19:37:55 -0300 Subject: [PATCH] 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. --- Libraries/LibC/limits.h | 3 +++ 1 file changed, 3 insertions(+) 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