aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2006-11-22 13:29:47 +0000
committerWerner Koch <[email protected]>2006-11-22 13:29:47 +0000
commit9815596f64265cd4f87e2df374de23f54c26985e (patch)
tree105ca9543cb03c51096e4d8cf48ee2867df13df9
parentFinal fix. (diff)
downloadlibassuan-9815596f64265cd4f87e2df374de23f54c26985e.tar.gz
libassuan-9815596f64265cd4f87e2df374de23f54c26985e.zip
Again one of these last commitslibassuan-1.0.1
-rw-r--r--src/ChangeLog2
-rw-r--r--src/assuan-handler.c16
2 files changed, 12 insertions, 6 deletions
diff --git a/src/ChangeLog b/src/ChangeLog
index 98b0f81..9767e15 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,6 +1,6 @@
2006-11-22 Werner Koch <[email protected]>
- * 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 <[email protected]>
diff --git a/src/assuan-handler.c b/src/assuan-handler.c
index 44b655f..866db22 100644
--- a/src/assuan-handler.c
+++ b/src/assuan-handler.c
@@ -653,15 +653,21 @@ assuan_get_active_fds (assuan_context_t ctx, int what,
}
-/* 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 @@ assuan_get_data_fp (assuan_context_t ctx)
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