aboutsummaryrefslogtreecommitdiffstats
path: root/common/iobuf.h
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2023-06-13 08:07:07 +0000
committerWerner Koch <[email protected]>2023-06-13 08:07:07 +0000
commit808494b48577c2efb894a0877f59d9c4ed664f56 (patch)
tree2cbec3605802ff7e2c5d205d55b5322c91b44d12 /common/iobuf.h
parentgpg: Print status line and proper diagnostics for write errors. (diff)
downloadgnupg-808494b48577c2efb894a0877f59d9c4ed664f56.tar.gz
gnupg-808494b48577c2efb894a0877f59d9c4ed664f56.zip
gpg: Make progress work for large files on Windows.
* common/iobuf.c (iobuf_get_filelength): Change return type to uint64_t and remove the overflow args. For Windows always use GetFileSizeEx which is available since the long EOL-ed Windows XP. * g10/sign.c (write_plaintext_packet): Adjust for changed iobuf_get_filelength. * g10/encrypt.c (encrypt_simple, encrypt_crypt): Ditto. * g10/photoid.c (generate_photo_id): Ditto. Also add an upper limit. * g10/filter.h (progress_filter_context_t): Change amount values to use uint64_t. * g10/progress.c (write_status_progress): Change accordingly. -- GnuPG-bug-id: 6534
Diffstat (limited to 'common/iobuf.h')
-rw-r--r--common/iobuf.h8
1 files changed, 2 insertions, 6 deletions
diff --git a/common/iobuf.h b/common/iobuf.h
index c132c2f3c..751ae73c3 100644
--- a/common/iobuf.h
+++ b/common/iobuf.h
@@ -584,12 +584,8 @@ size_t iobuf_temp_to_buffer (iobuf_t a, byte * buffer, size_t buflen);
size_t iobuf_copy (iobuf_t dest, iobuf_t source);
/* Return the size of any underlying file. This only works with
- file_filter based pipelines.
-
- On Win32, it is sometimes not possible to determine the size of
- files larger than 4GB. In this case, *OVERFLOW (if not NULL) is
- set to 1. Otherwise, *OVERFLOW is set to 0. */
-off_t iobuf_get_filelength (iobuf_t a, int *overflow);
+ file_filter based pipelines. */
+uint64_t iobuf_get_filelength (iobuf_t a);
#define IOBUF_FILELENGTH_LIMIT 0xffffffff
/* Return the file descriptor designating the underlying file. This