From 6df5cae49a6ff61ce523361d30784893e59f3837 Mon Sep 17 00:00:00 2001 From: Stefan Krah Date: Mon, 12 Nov 2012 20:14:36 +0100 Subject: [PATCH] Issue #15835: Define PATH_MAX on HP-UX. --- Include/osdefs.h | 8 ++++++++ Python/fileutils.c | 1 + 2 files changed, 9 insertions(+) diff --git a/Include/osdefs.h b/Include/osdefs.h index 90b430a635b..05c0c8ea4a5 100644 --- a/Include/osdefs.h +++ b/Include/osdefs.h @@ -29,6 +29,14 @@ extern "C" { #endif /* Max pathname length */ +#ifdef __hpux +#include +#include +#ifndef PATH_MAX +#define PATH_MAX MAXPATHLEN +#endif +#endif + #ifndef MAXPATHLEN #if defined(PATH_MAX) && PATH_MAX > 1024 #define MAXPATHLEN PATH_MAX diff --git a/Python/fileutils.c b/Python/fileutils.c index 501cb8c8d6e..976c04b1172 100644 --- a/Python/fileutils.c +++ b/Python/fileutils.c @@ -1,4 +1,5 @@ #include "Python.h" +#include "osdefs.h" #ifdef MS_WINDOWS # include #endif