]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix by Mark Hammond to enable truncate() on Windows.
authorGuido van Rossum <guido@python.org>
Tue, 6 May 1997 15:23:24 +0000 (15:23 +0000)
committerGuido van Rossum <guido@python.org>
Tue, 6 May 1997 15:23:24 +0000 (15:23 +0000)
Objects/fileobject.c

index a4b1d4baa6eda9b12048e5db8a1e2cfe32f94ca7..1b3206134bd75b2c48ff8b94c5ca35bb4bbd529e 100644 (file)
@@ -38,6 +38,12 @@ PERFORMANCE OF THIS SOFTWARE.
 #include <unistd.h>
 #endif
 
+#ifdef MS_WIN32
+#define ftruncate _chsize
+#define fileno _fileno
+#define HAVE_FTRUNCATE
+#endif
+
 #ifdef THINK_C
 #define HAVE_FOPENRF
 #endif