Patch by Mark Hammond to avoid certain header files on Windows/CE.
authorGuido van Rossum <guido@python.org>
Fri, 27 Aug 1999 20:39:37 +0000 (20:39 +0000)
committerGuido van Rossum <guido@python.org>
Fri, 27 Aug 1999 20:39:37 +0000 (20:39 +0000)
Modules/getbuildinfo.c
Modules/selectmodule.c
Objects/fileobject.c

index 49793b88e0b635c9d32da23f1a478bd8639c7cd1..35da3f7ad6315e4f75a273a7023a3dc32dfb2635 100644 (file)
@@ -4,7 +4,9 @@
 #include "macbuildno.h"
 #endif
 
+#ifndef DONT_HAVE_STDIO_H
 #include <stdio.h>
+#endif
 
 #ifndef DATE
 #ifdef __DATE__
index 11f72f5aa27e4b5c0d5ae76626da4248c0c220bf..c18d979828ebb7e75314085eb0bc6e1e358ef1f3 100644 (file)
@@ -48,7 +48,9 @@ PERFORMANCE OF THIS SOFTWARE.
 extern void bzero();
 #endif
 
+#ifndef DONT_HAVE_SYS_TYPES_H
 #include <sys/types.h>
+#endif
 
 #if defined(PYOS_OS2)
 #include <sys/time.h>
index b0eb332b0869e561fb0c9912198acd2ee24aba8c..867b11af1d15a4451a19a74ae410da998cfe0a3a 100644 (file)
@@ -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