summaryrefslogtreecommitdiffstats
path: root/Python
diff options
context:
space:
mode:
Diffstat (limited to 'Python')
-rw-r--r--Python/getcwd.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/Python/getcwd.c b/Python/getcwd.c
index 5c57291..967d484 100644
--- a/Python/getcwd.c
+++ b/Python/getcwd.c
@@ -14,8 +14,12 @@
#endif
#ifndef MAXPATHLEN
+#if defined(PATH_MAX) && PATH_MAX > 1024
+#define MAXPATHLEN PATH_MAX
+#else
#define MAXPATHLEN 1024
#endif
+#endif
extern char *getwd(char *);