summaryrefslogtreecommitdiffstats
path: root/Programs
diff options
context:
space:
mode:
authorSteve Dower <steve.dower@microsoft.com>2015-02-21 16:44:05 (GMT)
committerSteve Dower <steve.dower@microsoft.com>2015-02-21 16:44:05 (GMT)
commitf2f373f5931be48efc3f6fa2c2faa1cca79dce75 (patch)
tree87facdec6423b6282ad5c4e2cf30e124d4a5de40 /Programs
parent18d1924987d75ef43a429fe4b6f05df2c308ec2a (diff)
downloadcpython-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.c4
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;
}