aboutsummaryrefslogtreecommitdiffstats
path: root/src/assuan-io.c
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2004-11-26 16:18:00 +0000
committerWerner Koch <[email protected]>2004-11-26 16:18:00 +0000
commit86aed4c8947923a8b8155cd7e21176fe2feba216 (patch)
tree04dc6db003b48df48e673448fffb9b79514e20c0 /src/assuan-io.c
parentPost release preps (diff)
downloadlibassuan-86aed4c8947923a8b8155cd7e21176fe2feba216.tar.gz
libassuan-86aed4c8947923a8b8155cd7e21176fe2feba216.zip
Avoid warnings about unknown pragmas.
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
}