[svn] assuan - r230 - trunk/src
svn author wk
cvs at cvs.gnupg.org
Wed Nov 22 14:29:48 CET 2006
Author: wk
Date: 2006-11-22 14:29:47 +0100 (Wed, 22 Nov 2006)
New Revision: 230
Modified:
trunk/src/ChangeLog
trunk/src/assuan-handler.c
Log:
Again one of these last commits
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2006-11-22 13:13:04 UTC (rev 229)
+++ trunk/src/ChangeLog 2006-11-22 13:29:47 UTC (rev 230)
@@ -1,6 +1,6 @@
2006-11-22 Werner Koch <wk at g10code.com>
- * assuan-handler.c (fun_cookie_write): New.
+ * assuan-handler.c (fun1_cookie_write, fun2_cookie_write): New.
(assuan_get_data_fp) [HAVE_FUNOPEN]: Use it.
2006-11-21 Werner Koch <wk at g10code.com>
Modified: trunk/src/assuan-handler.c
===================================================================
--- trunk/src/assuan-handler.c 2006-11-22 13:13:04 UTC (rev 229)
+++ trunk/src/assuan-handler.c 2006-11-22 13:29:47 UTC (rev 230)
@@ -653,15 +653,21 @@
}
-/* funopen uses a different prototype for the write fucntions. We use
- this wrapper here to fix it. */
+/* Two simple wrappers to make the expected function types match. */
#ifdef HAVE_FUNOPEN
static int
-fun_cookie_write (void *cookie, const char *buffer, int orig_size)
+fun1_cookie_write (void *cookie, const char *buffer, int orig_size)
{
return _assuan_cookie_write_data (cookie, buffer, orig_size);
}
#endif /*HAVE_FUNOPEN*/
+#ifdef HAVE_FOPENCOOKIE
+static ssize_t
+fun2_cookie_write (void *cookie, const char *buffer, size_t orig_size)
+{
+ return _assuan_cookie_write_data (cookie, buffer, orig_size);
+}
+#endif /*HAVE_FOPENCOOKIE*/
/* Return a FP to be used for data output. The FILE pointer is valid
until the end of a handler. So a close is not needed. Assuan does
@@ -679,10 +685,10 @@
return ctx->outbound.data.fp;
#ifdef HAVE_FUNOPEN
- ctx->outbound.data.fp = funopen (ctx, 0, fun_cookie_write,
+ ctx->outbound.data.fp = funopen (ctx, 0, fun1_cookie_write,
0, _assuan_cookie_write_flush);
#else
- ctx->outbound.data.fp = funopen (ctx, 0, _assuan_cookie_write_data,
+ ctx->outbound.data.fp = funopen (ctx, 0, fun2_cookie_write,
0, _assuan_cookie_write_flush);
#endif
More information about the Gnupg-commits
mailing list