diff Objects/fileobject.c @ 19754:e1f1e9ebf050 legacy-trunk

Enable large file support on Win32 systems. Curious: the MS docs say stati64 etc are supported even on Win95, but Win95 doesn't support a filesystem that allows partitions > 2 Gb. test_largefile: This was opening its test file in text mode. I have no idea how that worked under Win64, but it sure needs binary mode on Win98. BTW, on Win98 test_largefile runs quickly (under a second).
author Tim Peters <tim.peters@gmail.com>
date Thu, 06 Sep 2001 00:32:15 +0000
parents b7dc5159448f
children 5420e7d348a4
line wrap: on
line diff
--- a/Objects/fileobject.c	Wed Sep 05 23:49:24 2001 +0000
+++ b/Objects/fileobject.c	Thu Sep 06 00:32:15 2001 +0000
@@ -367,7 +367,7 @@
 	} else {
 		Py_BEGIN_ALLOW_THREADS
 		errno = 0;
-		ret = _chsize(fileno(f->f_fp), newsize);
+		ret = _chsize(fileno(f->f_fp), (long)newsize);
 		Py_END_ALLOW_THREADS
 		if (ret != 0) goto onioerror;
 	}