mirror of
https://github.com/python/cpython.git
synced 2025-07-07 19:35:27 +00:00
Issue #23152: Implement _Py_fstat() to support files larger than 2 GB on Windows.
fstat() may fail with EOVERFLOW on files larger than 2 GB because the file size type is an signed 32-bit integer.
This commit is contained in:
parent
18d1924987
commit
f2f373f593
12 changed files with 242 additions and 180 deletions
|
@ -71,8 +71,8 @@ dl_funcptr _PyImport_GetDynLoadFunc(const char *shortname,
|
|||
|
||||
if (fp != NULL) {
|
||||
int i;
|
||||
struct stat statb;
|
||||
if (fstat(fileno(fp), &statb) == -1) {
|
||||
struct _Py_stat_struct statb;
|
||||
if (_Py_fstat(fileno(fp), &statb) == -1) {
|
||||
PyErr_SetFromErrno(PyExc_IOError);
|
||||
return NULL;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue