aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-io.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/assuan-io.c')
-rw-r--r--src/assuan-io.c14
1 files changed, 8 insertions, 6 deletions
diff --git a/src/assuan-io.c b/src/assuan-io.c
index aea327a..cb7971a 100644
--- a/src/assuan-io.c
+++ b/src/assuan-io.c
@@ -28,29 +28,31 @@
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
#pragma weak pth_read
#pragma weak pth_write
+#endif
ssize_t
_assuan_simple_read (assuan_context_t ctx, void *buffer, size_t size)
{
- #ifndef _WIN32
+#ifndef _WIN32
return (pth_read ? pth_read : read) (ctx->inbound.fd, buffer, size);
- #else
+#else
return pth_read ? pth_read (ctx->inbound.fd, buffer, size)
: recv (ctx->inbound.fd, buffer, size, 0);
- #endif
+#endif
}
ssize_t
_assuan_simple_write (assuan_context_t ctx, const void *buffer, size_t size)
{
- #ifndef _WIN32
+#ifndef _WIN32
return (pth_write ? pth_write : write) (ctx->outbound.fd, buffer, size);
- #else
+#else
return pth_write ? pth_write (ctx->outbound.fd, buffer, size)
: send (ctx->outbound.fd, buffer, size, 0);
- #endif
+#endif
}