mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
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).
This commit is contained in:
parent
97f4a33e12
commit
6e13a562ae
5 changed files with 15 additions and 8 deletions
|
@ -367,7 +367,7 @@ file_truncate(PyFileObject *f, PyObject *args)
|
|||
} 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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue