Commit bc2e10e7 authored by Tim Peters's avatar Tim Peters

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 <wink>.
parent 5833baa3
...@@ -193,10 +193,6 @@ extern int lstat(const char *, struct stat *); ...@@ -193,10 +193,6 @@ extern int lstat(const char *, struct stat *);
#include <sys/utsname.h> #include <sys/utsname.h>
#endif /* HAVE_SYS_UTSNAME_H */ #endif /* HAVE_SYS_UTSNAME_H */
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif /* MAXPATHLEN */
#ifdef HAVE_DIRENT_H #ifdef HAVE_DIRENT_H
#include <dirent.h> #include <dirent.h>
#define NAMLEN(dirent) strlen((dirent)->d_name) #define NAMLEN(dirent) strlen((dirent)->d_name)
...@@ -223,6 +219,7 @@ extern int lstat(const char *, struct stat *); ...@@ -223,6 +219,7 @@ extern int lstat(const char *, struct stat *);
#include <direct.h> #include <direct.h>
#include <io.h> #include <io.h>
#include <process.h> #include <process.h>
#include "osdefs.h"
#define WINDOWS_LEAN_AND_MEAN #define WINDOWS_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
#ifdef MS_WIN32 #ifdef MS_WIN32
...@@ -238,6 +235,10 @@ extern int lstat(const char *, struct stat *); ...@@ -238,6 +235,10 @@ extern int lstat(const char *, struct stat *);
#include <io.h> #include <io.h>
#endif /* OS2 */ #endif /* OS2 */
#ifndef MAXPATHLEN
#define MAXPATHLEN 1024
#endif /* MAXPATHLEN */
#ifdef UNION_WAIT #ifdef UNION_WAIT
/* Emulate some macros on systems that have a union instead of macros */ /* Emulate some macros on systems that have a union instead of macros */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment