From: Tim Peters Date: Sun, 3 Mar 2002 23:17:02 +0000 (+0000) Subject: Python no longer compiled on Windows, due to #include file confusion X-Git-Tag: v2.3c1~6582 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=bc2e10e7b6588d2677e970e390e066e235c56dbd;p=python Python no longer compiled on Windows, due to #include file confusion over SEP, ALTSEP and MAXPATHLEN. Patched up posixmodule.c for MSVC, but unsure what the story is now on other non-Unixish platforms -- the preprocessor maze has no exit . --- diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index 27a93d0167..aa9244a07c 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -193,10 +193,6 @@ extern int lstat(const char *, struct stat *); #include #endif /* HAVE_SYS_UTSNAME_H */ -#ifndef MAXPATHLEN -#define MAXPATHLEN 1024 -#endif /* MAXPATHLEN */ - #ifdef HAVE_DIRENT_H #include #define NAMLEN(dirent) strlen((dirent)->d_name) @@ -223,6 +219,7 @@ extern int lstat(const char *, struct stat *); #include #include #include +#include "osdefs.h" #define WINDOWS_LEAN_AND_MEAN #include #ifdef MS_WIN32 @@ -238,6 +235,10 @@ extern int lstat(const char *, struct stat *); #include #endif /* OS2 */ +#ifndef MAXPATHLEN +#define MAXPATHLEN 1024 +#endif /* MAXPATHLEN */ + #ifdef UNION_WAIT /* Emulate some macros on systems that have a union instead of macros */