mirror of
https://github.com/python/cpython.git
synced 2025-08-23 10:16:01 +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
|
@ -1681,8 +1681,8 @@ _PySys_Init(void)
|
|||
the shell already prevents that. */
|
||||
#if !defined(MS_WINDOWS)
|
||||
{
|
||||
struct stat sb;
|
||||
if (fstat(fileno(stdin), &sb) == 0 &&
|
||||
struct _Py_stat_struct sb;
|
||||
if (_Py_fstat(fileno(stdin), &sb) == 0 &&
|
||||
S_ISDIR(sb.st_mode)) {
|
||||
/* There's nothing more we can do. */
|
||||
/* Py_FatalError() will core dump, so just exit. */
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue