summaryrefslogtreecommitdiffstats
path: root/Objects/fileobject.c
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2000-06-28 20:57:07 (GMT)
committerGuido van Rossum <guido@python.org>2000-06-28 20:57:07 (GMT)
commiteceebb87d925c36f2df99d2bd470354f16f45e39 (patch)
tree0e2e383bf2f7572bcab4d597dbdcdbacdc57cf33 /Objects/fileobject.c
parent40ced50cb0ceddbaab5aef006399caeb49b22919 (diff)
downloadcpython-eceebb87d925c36f2df99d2bd470354f16f45e39.zip
cpython-eceebb87d925c36f2df99d2bd470354f16f45e39.tar.gz
cpython-eceebb87d925c36f2df99d2bd470354f16f45e39.tar.bz2
Jack Jansen: Moved includes to the top, removed think C support
Diffstat (limited to 'Objects/fileobject.c')
-rw-r--r--Objects/fileobject.c38
1 files changed, 20 insertions, 18 deletions
diff --git a/Objects/fileobject.c b/Objects/fileobject.c
index 7e0979f..cbc1aff 100644
--- a/Objects/fileobject.c
+++ b/Objects/fileobject.c
@@ -38,6 +38,26 @@ PERFORMANCE OF THIS SOFTWARE.
#include <sys/types.h>
#endif /* DONT_HAVE_SYS_TYPES_H */
+/* We expect that fstat exists on most systems.
+ It's confirmed on Unix, Mac and Windows.
+ If you don't have it, add #define DONT_HAVE_FSTAT to your config.h. */
+#ifndef DONT_HAVE_FSTAT
+#define HAVE_FSTAT
+
+#ifndef DONT_HAVE_SYS_TYPES_H
+#include <sys/types.h>
+#endif
+
+#ifndef DONT_HAVE_SYS_STAT_H
+#include <sys/stat.h>
+#else
+#ifdef HAVE_STAT_H
+#include <stat.h>
+#endif
+#endif
+
+#endif /* DONT_HAVE_FSTAT */
+
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
@@ -54,9 +74,6 @@ PERFORMANCE OF THIS SOFTWARE.
#endif
#endif
-#ifdef THINK_C
-#define HAVE_FOPENRF
-#endif
#ifdef __MWERKS__
/* Mwerks fopen() doesn't always set errno */
#define NO_FOPEN_ERRNO
@@ -445,21 +462,6 @@ file_isatty(f, args)
return PyInt_FromLong(res);
}
-/* We expect that fstat exists on most systems.
- It's confirmed on Unix, Mac and Windows.
- If you don't have it, add #define DONT_HAVE_FSTAT to your config.h. */
-#ifndef DONT_HAVE_FSTAT
-#define HAVE_FSTAT
-
-#ifndef DONT_HAVE_SYS_TYPES_H
-#include <sys/types.h>
-#endif
-
-#ifndef DONT_HAVE_SYS_STAT_H
-#include <sys/stat.h>
-#endif
-
-#endif /* DONT_HAVE_FSTAT */
#if BUFSIZ < 8192
#define SMALLCHUNK 8192