1 Index: Modules/posixmodule.c
2 ===================================================================
3 --- Modules/posixmodule.c (revision 67686)
4 +++ Modules/posixmodule.c (working copy)
7 /* Various compilers have only certain posix functions */
8 /* XXX Gosh I wish these were all moved into pyconfig.h */
9 +/* XXX RWMJ agrees. This sucks for cross-compiling. */
10 #if defined(PYCC_VACPP) && defined(PYOS_OS2)
17 +#if defined(__MINGW32__) /* MinGW, similar to MS compiler. */
18 +#define HAVE_GETCWD 1
19 +#define HAVE_SPAWNV 1
21 +#define HAVE_SYSTEM 1
24 +#define fsync _commit
26 #if defined(PYOS_OS2) && defined(PYCC_GCC) || defined(__VMS)
27 /* Everything needed is defined in PC/os2emx/pyconfig.h or vms/pyconfig.h */
28 #else /* all other compilers */
31 #define HAVE_TTYNAME 1
32 #endif /* PYOS_OS2 && PYCC_GCC && __VMS */
33 +#endif /* __MINGW32__ */
35 #endif /* __BORLANDC__ */
36 #endif /* ! __WATCOMC__ || __QNX__ */
38 #if defined(PYCC_VACPP)
39 extern int mkdir(char *);
41 -#if ( defined(__WATCOMC__) || defined(_MSC_VER) ) && !defined(__QNX__)
42 +#if ( defined(__WATCOMC__) || defined(_MSC_VER) || defined(__MINGW32__) ) && !defined(__QNX__)
43 extern int mkdir(const char *);
45 extern int mkdir(const char *, mode_t);
47 Py_FileSystemDefaultEncoding, &path, &mode))
49 Py_BEGIN_ALLOW_THREADS
50 -#if ( defined(__WATCOMC__) || defined(PYCC_VACPP) ) && !defined(__QNX__)
51 +#if ( defined(__WATCOMC__) || defined(PYCC_VACPP) || defined(__MINGW32__)) && !defined(__QNX__)
54 res = mkdir(path, mode);