aboutsummaryrefslogtreecommitdiffstats
path: root/assuan
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--assuan/README.1st8
-rw-r--r--assuan/assuan-io.c4
2 files changed, 9 insertions, 3 deletions
diff --git a/assuan/README.1st b/assuan/README.1st
index c755cfec..8e805c39 100644
--- a/assuan/README.1st
+++ b/assuan/README.1st
@@ -27,7 +27,13 @@ updating this directory, are:
We don't need this file as GPGME doesn't use sendmsg and recvmsg.
If it would, we would need to pick up the W32 implementation.
- Copyright 2004 g10 Code GmbH
+* assuan-io.c
+** _assuan_simple_read() and _assuan_simple_write() must always use
+ read()/write() (which actually translates to _gpgme_io_read() and
+ _gpgme_io_write()).
+
+
+ Copyright 2004, 2007 g10 Code GmbH
This file is free software; as a special exception the author gives
unlimited permission to copy and/or distribute it, with or without
diff --git a/assuan/assuan-io.c b/assuan/assuan-io.c
index 066231fb..a7f84492 100644
--- a/assuan/assuan-io.c
+++ b/assuan/assuan-io.c
@@ -51,7 +51,7 @@ _assuan_waitpid (pid_t pid, int *status, int options)
ssize_t
_assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size)
{
-#ifdef HAVE_W32_SYSTEM
+#if defined(HAVE_W32_SYSTEM) && !defined(_ASSUAN_IN_GPGME_BUILD_ASSUAN)
/* Due to the peculiarities of the W32 API we can't use read for a
network socket and thus we try to use recv first and fallback to
read if recv detects that it is not a network socket. */
@@ -84,7 +84,7 @@ _assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size)
ssize_t
_assuan_simple_write (assuan_context_t ctx, const void *buffer, size_t size)
{
-#ifdef HAVE_W32_SYSTEM
+#if defined(HAVE_W32_SYSTEM) && !defined(_ASSUAN_IN_GPGME_BUILD_ASSUAN)
/* Due to the peculiarities of the W32 API we can't use write for a
network socket and thus we try to use send first and fallback to
write if send detects that it is not a network socket. */