diff options
author | Steve Dower <steve.dower@microsoft.com> | 2015-02-21 16:44:05 (GMT) |
---|---|---|
committer | Steve Dower <steve.dower@microsoft.com> | 2015-02-21 16:44:05 (GMT) |
commit | f2f373f5931be48efc3f6fa2c2faa1cca79dce75 (patch) | |
tree | 87facdec6423b6282ad5c4e2cf30e124d4a5de40 /Programs | |
parent | 18d1924987d75ef43a429fe4b6f05df2c308ec2a (diff) | |
download | cpython-f2f373f5931be48efc3f6fa2c2faa1cca79dce75.zip cpython-f2f373f5931be48efc3f6fa2c2faa1cca79dce75.tar.gz cpython-f2f373f5931be48efc3f6fa2c2faa1cca79dce75.tar.bz2 |
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.
Diffstat (limited to 'Programs')
-rw-r--r-- | Programs/_freeze_importlib.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Programs/_freeze_importlib.c b/Programs/_freeze_importlib.c index b8899ec..d0c33e2 100644 --- a/Programs/_freeze_importlib.c +++ b/Programs/_freeze_importlib.c @@ -35,7 +35,7 @@ main(int argc, char *argv[]) { char *inpath, *outpath; FILE *infile = NULL, *outfile = NULL; - struct stat st; + struct _Py_stat_struct st; size_t text_size, data_size, n; char *text = NULL; unsigned char *data; @@ -54,7 +54,7 @@ main(int argc, char *argv[]) fprintf(stderr, "cannot open '%s' for reading\n", inpath); goto error; } - if (fstat(fileno(infile), &st)) { + if (_Py_fstat(fileno(infile), &st)) { fprintf(stderr, "cannot fstat '%s'\n", inpath); goto error; } |