aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/conversion.c4
-rw-r--r--src/data.c4
-rw-r--r--src/data.h4
-rw-r--r--src/engine-gpg.c2
-rw-r--r--src/util.h4
5 files changed, 10 insertions, 8 deletions
diff --git a/src/conversion.c b/src/conversion.c
index 17dce7f3..f5dd7ea2 100644
--- a/src/conversion.c
+++ b/src/conversion.c
@@ -434,10 +434,10 @@ _gpgme_strtoul_field (const char *string, unsigned long *result)
/* Convert STRING into an offset value. Note that this functions only
* allows for a base-10 length. This function is similar to atoi()
* and thus there is no error checking. */
-gpgme_off_t
+uint64_t
_gpgme_string_to_off (const char *string)
{
- gpgme_off_t value = 0;
+ uint64_t value = 0;
while (*string == ' ' || *string == '\t')
string++;
diff --git a/src/data.c b/src/data.c
index e2de9f67..1bb334c9 100644
--- a/src/data.c
+++ b/src/data.c
@@ -572,7 +572,7 @@ gpgme_data_set_flag (gpgme_data_t dh, const char *name, const char *value)
}
else if (!strcmp (name, "io-buffer-size"))
{
- gpgme_off_t val;
+ uint64_t val;
/* We may set this only once. */
if (dh->io_buffer_size)
@@ -744,7 +744,7 @@ _gpgme_data_get_fd (gpgme_data_t dh)
/* Get the size-hint value for DH or 0 if not available. */
-gpgme_off_t
+uint64_t
_gpgme_data_get_size_hint (gpgme_data_t dh)
{
return dh ? dh->size_hint : 0;
diff --git a/src/data.h b/src/data.h
index 648d976f..3e063943 100644
--- a/src/data.h
+++ b/src/data.h
@@ -96,7 +96,7 @@ struct gpgme_data
char *file_name;
/* Hint on the to be expected total size of the data. */
- gpgme_off_t size_hint;
+ uint64_t size_hint;
/* If no 0 the size of an allocated inbound or outpund buffers. The
* value is at least BUFFER_SIZE and capped at 1MiB. */
@@ -189,7 +189,7 @@ void _gpgme_data_release (gpgme_data_t dh);
int _gpgme_data_get_fd (gpgme_data_t dh);
/* Get the size-hint value for DH or 0 if not available. */
-gpgme_off_t _gpgme_data_get_size_hint (gpgme_data_t dh);
+uint64_t _gpgme_data_get_size_hint (gpgme_data_t dh);
#endif /* DATA_H */
diff --git a/src/engine-gpg.c b/src/engine-gpg.c
index 75e375d7..03e648f3 100644
--- a/src/engine-gpg.c
+++ b/src/engine-gpg.c
@@ -1774,7 +1774,7 @@ start (engine_gpg_t gpg)
static gpgme_error_t
add_input_size_hint (engine_gpg_t gpg, gpgme_data_t data)
{
- gpgme_off_t value = _gpgme_data_get_size_hint (data);
+ uint64_t value = _gpgme_data_get_size_hint (data);
char numbuf[50]; /* Large enough for even 2^128 in base-10. */
char *p;
diff --git a/src/util.h b/src/util.h
index 90213b10..d3b982e7 100644
--- a/src/util.h
+++ b/src/util.h
@@ -35,6 +35,8 @@
#ifdef HAVE_UNISTD_H
# include <unistd.h>
#endif
+#include <stdint.h>
+
#include "gpgme.h"
@@ -143,7 +145,7 @@ int _gpgme_split_fields (char *string, char **array, int arraysize);
gpgme_error_t _gpgme_strtoul_field (const char *string, unsigned long *result);
/* Convert STRING into an offset value similar to atoi(). */
-gpgme_off_t _gpgme_string_to_off (const char *string);
+uint64_t _gpgme_string_to_off (const char *string);
/* Parse the string TIMESTAMP into a time_t. The string may either be
seconds since Epoch or in the ISO 8601 format like