diff options
author | Marcus Brinkmann <[email protected]> | 2003-08-18 19:17:08 +0000 |
---|---|---|
committer | Marcus Brinkmann <[email protected]> | 2003-08-18 19:17:08 +0000 |
commit | c93237c3a4cb4ecc579033c31a56cf447c277be3 (patch) | |
tree | 0dc8fcc413d8ffe64ed9f5ef44e825063b0878cd /assuan/assuan-io.c | |
parent | 2003-08-15 Marcus Brinkmann <[email protected]> (diff) | |
download | gpgme-c93237c3a4cb4ecc579033c31a56cf447c277be3.tar.gz gpgme-c93237c3a4cb4ecc579033c31a56cf447c277be3.zip |
2003-08-18 Marcus Brinkmann <[email protected]>
* configure.ac: If building Assuan, check for funopen and
fopencookie, and make isascii, putc_unlocked and memrchr
replacement functions.
assuan/
Update to the latest assuan version.
gpgme/
2003-08-18 Marcus Brinkmann <[email protected]>
* funopen.c, putc_unlocked.c, isascii.c, memrchr.c: New files.
* fopencookie.c: File removed.
Diffstat (limited to '')
-rw-r--r-- | assuan/assuan-io.c | 31 |
1 files changed, 6 insertions, 25 deletions
diff --git a/assuan/assuan-io.c b/assuan/assuan-io.c index 135cb02d..b10571be 100644 --- a/assuan/assuan-io.c +++ b/assuan/assuan-io.c @@ -1,4 +1,4 @@ -/* assuan-buffer.c - Wraps the read and write functions. +/* assuan-io.c - Wraps the read and write functions. * Copyright (C) 2002 Free Software Foundation, Inc. * * This file is part of Assuan. @@ -18,6 +18,7 @@ * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA */ +#include "assuan-defs.h" #include <sys/types.h> #include <unistd.h> @@ -28,33 +29,13 @@ extern ssize_t pth_write (int fd, const void *buffer, size_t size); #pragma weak pth_write ssize_t -_assuan_read (int fd, void *buffer, size_t size) +_assuan_simple_read (ASSUAN_CONTEXT ctx, void *buffer, size_t size) { - static ssize_t (*reader) (int, void *, size_t); - - if (! reader) - { - if (pth_read) - reader = pth_read; - else - reader = read; - } - - return reader (fd, buffer, size); + return (pth_read ? pth_read : read) (ctx->inbound.fd, buffer, size); } ssize_t -_assuan_write (int fd, const void *buffer, size_t size) +_assuan_simple_write (ASSUAN_CONTEXT ctx, const void *buffer, size_t size) { - static ssize_t (*writer) (int, const void *, size_t); - - if (! writer) - { - if (pth_write) - writer = pth_write; - else - writer = write; - } - - return writer (fd, buffer, size); + return (pth_write ? pth_write : write) (ctx->outbound.fd, buffer, size); } |