From ff7e83d6067814a329790cc983f1efa67371ccf8 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Fri, 27 Aug 1999 20:39:37 +0000 Subject: Patch by Mark Hammond to avoid certain header files on Windows/CE. --- Modules/getbuildinfo.c | 2 ++ Modules/selectmodule.c | 2 ++ Objects/fileobject.c | 11 ++++++++++- 3 files changed, 14 insertions(+), 1 deletion(-) diff --git a/Modules/getbuildinfo.c b/Modules/getbuildinfo.c index 49793b8..35da3f7 100644 --- a/Modules/getbuildinfo.c +++ b/Modules/getbuildinfo.c @@ -4,7 +4,9 @@ #include "macbuildno.h" #endif +#ifndef DONT_HAVE_STDIO_H #include +#endif #ifndef DATE #ifdef __DATE__ diff --git a/Modules/selectmodule.c b/Modules/selectmodule.c index 11f72f5..c18d979 100644 --- a/Modules/selectmodule.c +++ b/Modules/selectmodule.c @@ -48,7 +48,9 @@ PERFORMANCE OF THIS SOFTWARE. extern void bzero(); #endif +#ifndef DONT_HAVE_SYS_TYPES_H #include +#endif #if defined(PYOS_OS2) #include 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 +#endif /* DONT_HAVE_SYS_TYPES_H */ #ifdef HAVE_UNISTD_H #include @@ -62,7 +64,9 @@ PERFORMANCE OF THIS SOFTWARE. #define BUF(v) PyString_AS_STRING((PyStringObject *)v) +#ifndef DONT_HAVE_ERRNO_H #include +#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 -#include +#endif +#ifndef DONT_HAVE_SYS_STAT_H +#include #endif +#endif /* DONT_HAVE_FSTAT */ + #if BUFSIZ < 8192 #define SMALLCHUNK 8192 #else -- cgit v0.12