[Python-checkins] cpython: Issue #11016: Try to fix compilaton of the new _stat.c module on Windows
victor.stinner
python-checkins at python.org
Sun Jun 23 01:49:54 CEST 2013
http://hg.python.org/cpython/rev/e5427b0b2bf7
changeset: 84265:e5427b0b2bf7
user: Victor Stinner <victor.stinner at gmail.com>
date: Sun Jun 23 01:49:42 2013 +0200
summary:
Issue #11016: Try to fix compilaton of the new _stat.c module on Windows
files:
Include/pyport.h | 8 ++++++++
Modules/_stat.c | 4 ++++
2 files changed, 12 insertions(+), 0 deletions(-)
diff --git a/Include/pyport.h b/Include/pyport.h
--- a/Include/pyport.h
+++ b/Include/pyport.h
@@ -406,6 +406,14 @@
#define S_ISDIR(x) (((x) & S_IFMT) == S_IFDIR)
#endif
+#ifndef S_ISCHR
+#define S_ISCHR(x) (((x) & S_IFMT) == S_IFCHR)
+#endif
+
+#ifndef S_ISBLK
+#define S_ISBLK(x) (((x) & S_IFMT) == S_IFBLK)
+#endif
+
#ifdef __cplusplus
/* Move this down here since some C++ #include's don't like to be included
diff --git a/Modules/_stat.c b/Modules/_stat.c
--- a/Modules/_stat.c
+++ b/Modules/_stat.c
@@ -26,6 +26,10 @@
#include <sys/stat.h>
#endif /* HAVE_SYS_STAT_H */
+#ifdef MS_WINDOWS
+typedef unsigned short mode_t;
+#endif
+
/* From Python's stat.py */
#ifndef S_IMODE
# define S_IMODE 07777
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list