From 6d0d8e7ba0bb989c251545fa8af35b97d1a703ba Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 25 Apr 2013 12:00:16 +0100 Subject: Make definition of off_t robust against misbehaving w32 toolchains. * configure.ac (NEED__FILE_OFFSET_BITS): Change to define gpgme_off_t and gpgme_ssize_t. (API__OFF_T, API__SSIZE_T): New ac_subst. * src/gpgme.h.in: Replace all ssize_t and off_t by ac_subst macros. * src/assuan-support.c, src/ath-pthread.c, src/ath.c, src/ath.h * src/data-compat.c, src/data-fd.c, src/data-mem.c, src/data-stream.c * src/data-user.c, src/data.c, src/data.h, src/engine-gpgsm.c * src/engine-uiserver.c, src/gpgme-tool.c, src/gpgme.c: Replace off_t by gpgme_off_t and sszie_t by gpgme_ssize_t. * src/ath-pthread.c, src/ath.h: Include gpgme.h. -- For a detailed description, see the gpgme.texi diff. --- src/data-compat.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/data-compat.c') diff --git a/src/data-compat.c b/src/data-compat.c index e9ca90a9..99827f16 100644 --- a/src/data-compat.c +++ b/src/data-compat.c @@ -41,7 +41,7 @@ non-zero). */ gpgme_error_t gpgme_data_new_from_filepart (gpgme_data_t *r_dh, const char *fname, - FILE *stream, off_t offset, size_t length) + FILE *stream, gpgme_off_t offset, size_t length) { #if defined (HAVE_W32CE_SYSTEM) && defined (_MSC_VER) return gpgme_error (GPG_ERR_NOT_IMPLEMENTED); @@ -175,7 +175,7 @@ gpgme_error_to_errno (gpgme_error_t err) } -static ssize_t +static gpgme_ssize_t old_user_read (gpgme_data_t dh, void *buffer, size_t size) { gpgme_error_t err; @@ -191,8 +191,8 @@ old_user_read (gpgme_data_t dh, void *buffer, size_t size) } -static off_t -old_user_seek (gpgme_data_t dh, off_t offset, int whence) +static gpgme_off_t +old_user_seek (gpgme_data_t dh, gpgme_off_t offset, int whence) { gpgme_error_t err; TRACE_BEG2 (DEBUG_DATA, "gpgme:old_user_seek", dh, -- cgit v1.2.3