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/ath.c | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) (limited to 'src/ath.c') diff --git a/src/ath.c b/src/ath.c index 52cee458..ddd8a872 100644 --- a/src/ath.c +++ b/src/ath.c @@ -40,8 +40,9 @@ #include #endif +#include "gpgme.h" + #ifdef _MSC_VER - typedef long ssize_t; typedef int pid_t; #endif @@ -125,7 +126,7 @@ ath_mutex_unlock (ath_mutex_t *lock) } -ssize_t +gpgme_ssize_t ath_read (int fd, void *buf, size_t nbytes) { #if defined(HAVE_W32CE_SYSTEM) && defined(_MSC_VER) @@ -136,7 +137,7 @@ ath_read (int fd, void *buf, size_t nbytes) } -ssize_t +gpgme_ssize_t ath_write (int fd, const void *buf, size_t nbytes) { #if defined(HAVE_W32CE_SYSTEM) && defined(_MSC_VER) @@ -147,7 +148,7 @@ ath_write (int fd, const void *buf, size_t nbytes) } -ssize_t +gpgme_ssize_t ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset, struct timeval *timeout) { @@ -159,7 +160,7 @@ ath_select (int nfd, fd_set *rset, fd_set *wset, fd_set *eset, } -ssize_t +gpgme_ssize_t ath_waitpid (pid_t pid, int *status, int options) { #ifdef HAVE_W32_SYSTEM -- cgit v1.2.3