diff options
author | Werner Koch <[email protected]> | 2013-04-25 11:00:16 +0000 |
---|---|---|
committer | Werner Koch <[email protected]> | 2013-05-16 15:48:50 +0000 |
commit | 6d0d8e7ba0bb989c251545fa8af35b97d1a703ba (patch) | |
tree | 9350cede809e12536956f6487c92d3f2d9489d66 /src/gpgme.h.in | |
parent | w32: Change the way the I/O threads are cleaned up. (diff) | |
download | gpgme-6d0d8e7ba0bb989c251545fa8af35b97d1a703ba.tar.gz gpgme-6d0d8e7ba0bb989c251545fa8af35b97d1a703ba.zip |
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.
Diffstat (limited to 'src/gpgme.h.in')
-rw-r--r-- | src/gpgme.h.in | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/src/gpgme.h.in b/src/gpgme.h.in index 12bd4ac7..caf64d4c 100644 --- a/src/gpgme.h.in +++ b/src/gpgme.h.in @@ -18,7 +18,7 @@ You should have received a copy of the GNU Lesser General Public License along with this program; if not, see <http://www.gnu.org/licenses/>. - File: @configure_input@ */ + Generated from gpgme.h.in for @GPGME_CONFIG_HOST@. */ #ifndef GPGME_H #define GPGME_H @@ -33,10 +33,8 @@ /* Include stdio.h for the FILE type definition. */ #include <stdio.h> - -@INSERT__TYPEDEFS_FOR_GPGME_H@ - #include <time.h> +@INSERT__TYPEDEFS_FOR_GPGME_H@ #include <gpg-error.h> @@ -1043,8 +1041,8 @@ void gpgme_get_io_cbs (gpgme_ctx_t ctx, gpgme_io_cbs_t io_cbs); /* Wrappers around the internal I/O functions for use with gpgme_passphrase_cb_t and gpgme_edit_cb_t. */ -ssize_t gpgme_io_read (int fd, void *buffer, size_t count); -ssize_t gpgme_io_write (int fd, const void *buffer, size_t count); +@API__SSIZE_T@ gpgme_io_read (int fd, void *buffer, size_t count); +@API__SSIZE_T@ gpgme_io_write (int fd, const void *buffer, size_t count); int gpgme_io_writen (int fd, const void *buffer, size_t count); /* Process the pending operation and, if HANG is non-zero, wait for @@ -1060,19 +1058,20 @@ gpgme_ctx_t gpgme_wait_ext (gpgme_ctx_t ctx, gpgme_error_t *status, /* Read up to SIZE bytes into buffer BUFFER from the data object with the handle HANDLE. Return the number of characters read, 0 on EOF and -1 on error. If an error occurs, errno is set. */ -typedef ssize_t (*gpgme_data_read_cb_t) (void *handle, void *buffer, +typedef @API__SSIZE_T@ (*gpgme_data_read_cb_t) (void *handle, void *buffer, size_t size); /* Write up to SIZE bytes from buffer BUFFER to the data object with the handle HANDLE. Return the number of characters written, or -1 on error. If an error occurs, errno is set. */ -typedef ssize_t (*gpgme_data_write_cb_t) (void *handle, const void *buffer, +typedef @API__SSIZE_T@ (*gpgme_data_write_cb_t) (void *handle, const void *buffer, size_t size); /* Set the current position from where the next read or write starts in the data object with the handle HANDLE to OFFSET, relativ to WHENCE. */ -typedef off_t (*gpgme_data_seek_cb_t) (void *handle, off_t offset, int whence); +typedef @API__OFF_T@ (*gpgme_data_seek_cb_t) (void *handle, + @API__OFF_T@ offset, int whence); /* Close the data object with the handle DL. */ typedef void (*gpgme_data_release_cb_t) (void *handle); @@ -1089,17 +1088,17 @@ typedef struct gpgme_data_cbs *gpgme_data_cbs_t; /* Read up to SIZE bytes into buffer BUFFER from the data object with the handle DH. Return the number of characters read, 0 on EOF and -1 on error. If an error occurs, errno is set. */ -ssize_t gpgme_data_read (gpgme_data_t dh, void *buffer, size_t size); +@API__SSIZE_T@ gpgme_data_read (gpgme_data_t dh, void *buffer, size_t size); /* Write up to SIZE bytes from buffer BUFFER to the data object with the handle DH. Return the number of characters written, or -1 on error. If an error occurs, errno is set. */ -ssize_t gpgme_data_write (gpgme_data_t dh, const void *buffer, size_t size); +@API__SSIZE_T@ gpgme_data_write (gpgme_data_t dh, const void *buffer, size_t size); /* Set the current position from where the next read or write starts in the data object with the handle DH to OFFSET, relativ to WHENCE. */ -off_t gpgme_data_seek (gpgme_data_t dh, off_t offset, int whence); +@API__OFF_T@ gpgme_data_seek (gpgme_data_t dh, @API__OFF_T@ offset, int whence); /* Create a new data buffer and return it in R_DH. */ gpgme_error_t gpgme_data_new (gpgme_data_t *r_dh); @@ -1168,7 +1167,7 @@ gpgme_error_t gpgme_data_new_from_file (gpgme_data_t *r_dh, non-zero). */ gpgme_error_t gpgme_data_new_from_filepart (gpgme_data_t *r_dh, const char *fname, FILE *fp, - off_t offset, size_t length); + @API__OFF_T@ offset, size_t length); /* Reset the read pointer in DH. Deprecated, please use gpgme_data_seek instead. */ |