aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-io.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-12-07 11:09:50 +0000
committerWerner Koch <[email protected]>2004-12-07 11:09:50 +0000
commitb259303b8e42a0b2b98cadb76abf10de817ea838 (patch)
tree963a63eed0cd09ea715613e5132d55ba0aabb444 /src/assuan-io.c
parentScript to build the W32 version (diff)
downloadlibassuan-b259303b8e42a0b2b98cadb76abf10de817ea838.tar.gz
libassuan-b259303b8e42a0b2b98cadb76abf10de817ea838.zip
* configure.ac: Define HAVE_W32_SYSTEM and HAVE_DOSISH_SYSTEM.
Add -lwsock2 to the config lib flags for W32. * assuan-logging.c, assuan-io.c: Include config.h * assuan-pipe-connect.c (assuan_pipe_connect2) [_WIN32]: Return error Not Imlemented.
Diffstat (limited to 'src/assuan-io.c')
-rw-r--r--src/assuan-io.c12
1 files changed, 8 insertions, 4 deletions
diff --git a/src/assuan-io.c b/src/assuan-io.c
index cb7971a..3fe11e6 100644
--- a/src/assuan-io.c
+++ b/src/assuan-io.c
@@ -18,17 +18,21 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA
*/
+#ifdef HAVE_CONFIG_H
+#include <config.h>
+#endif
+
#include "assuan-defs.h"
#include <sys/types.h>
#include <unistd.h>
-#ifdef _WIN32
+#ifdef HAVE_W32_SYSTEM
#include <windows.h>
#endif
extern ssize_t pth_read (int fd, void *buffer, size_t size);
extern ssize_t pth_write (int fd, const void *buffer, size_t size);
-#ifndef _WIN32
+#ifndef HAVE_W32_SYSTEM
#pragma weak pth_read
#pragma weak pth_write
#endif
@@ -36,7 +40,7 @@ extern ssize_t pth_write (int fd, const void *buffer, size_t size);
ssize_t
_assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size)
{
-#ifndef _WIN32
+#ifndef HAVE_W32_SYSTEM
return (pth_read ? pth_read : read) (ctx->inbound.fd, buffer, size);
#else
return pth_read ? pth_read (ctx->inbound.fd, buffer, size)
@@ -47,7 +51,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)
{
-#ifndef _WIN32
+#ifndef HAVE_W32_SYSTEM
return (pth_write ? pth_write : write) (ctx->outbound.fd, buffer, size);
#else
return pth_write ? pth_write (ctx->outbound.fd, buffer, size)