summaryrefslogtreecommitdiffstats
path: root/Objects
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>1999-08-27 20:39:37 (GMT)
committerGuido van Rossum <guido@python.org>1999-08-27 20:39:37 (GMT)
commitff7e83d6067814a329790cc983f1efa67371ccf8 (patch)
tree2c5dbda38f6ef25f9d6f1fc07acf9b9603feb4b8 /Objects
parent7f1de832a21df9048041405b6ca624c91fd98e58 (diff)
downloadcpython-ff7e83d6067814a329790cc983f1efa67371ccf8.zip
cpython-ff7e83d6067814a329790cc983f1efa67371ccf8.tar.gz
cpython-ff7e83d6067814a329790cc983f1efa67371ccf8.tar.bz2
Patch by Mark Hammond to avoid certain header files on Windows/CE.
Diffstat (limited to 'Objects')
-rw-r--r--Objects/fileobject.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index b0eb332..867b11a 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -34,7 +34,9 @@ PERFORMANCE OF THIS SOFTWARE.
#include "Python.h"
#include "structmember.h"
+#ifndef DONT_HAVE_SYS_TYPES_H
#include <sys/types.h>
+#endif /* DONT_HAVE_SYS_TYPES_H */
#ifdef HAVE_UNISTD_H
#include <unistd.h>
@@ -62,7 +64,9 @@ PERFORMANCE OF THIS SOFTWARE.
#define BUF(v) PyString_AS_STRING((PyStringObject *)v)
+#ifndef DONT_HAVE_ERRNO_H
#include <errno.h>
+#endif
typedef struct {
PyObject_HEAD
@@ -441,11 +445,16 @@ file_isatty(f, args)
#ifndef DONT_HAVE_FSTAT
#define HAVE_FSTAT
+#ifndef DONT_HAVE_SYS_TYPES_H
#include <sys/types.h>
-#include <sys/stat.h>
+#endif
+#ifndef DONT_HAVE_SYS_STAT_H
+#include <sys/stat.h>
#endif
+#endif /* DONT_HAVE_FSTAT */
+
#if BUFSIZ < 8192
#define SMALLCHUNK 8192
#else