diff options
-rw-r--r-- | src/ChangeLog | 4 | ||||
-rw-r--r-- | src/assuan-defs.h | 8 | ||||
-rw-r--r-- | src/assuan-io.c | 14 |
3 files changed, 17 insertions, 9 deletions
diff --git a/src/ChangeLog b/src/ChangeLog index 12c6293..aa2844a 100644 --- a/src/ChangeLog +++ b/src/ChangeLog @@ -1,3 +1,7 @@ +2004-11-26 Werner Koch <[email protected]> + + * assuan-io.c [_WIN32]: Avoid warnings about unknown pragmas. + 2004-11-24 Werner Koch <[email protected]> * assuan-logging.c (_assuan_log_printf): New. diff --git a/src/assuan-defs.h b/src/assuan-defs.h index 80818e9..48463b3 100644 --- a/src/assuan-defs.h +++ b/src/assuan-defs.h @@ -40,7 +40,7 @@ #ifdef _WIN32 #define AF_LOCAL AF_UNIX -/* we need to prefix the structure with a sockaddr_in header so we can +/* We need to prefix the structure with a sockaddr_in header so we can use it later for sendto and recvfrom. */ struct sockaddr_un { @@ -50,9 +50,11 @@ struct sockaddr_un char sun_path[108-2-4]; /* Path name. */ }; -typedef int ssize_t; +/* Not needed anymore because the current mingw32 defines this in + sys/types.h */ +/* typedef int ssize_t; */ -/* missing W32 functions */ +/* Missing W32 functions */ int putc_unlocked (int c, FILE *stream); void * memrchr (const void *block, int c, size_t size); char * stpcpy (char *dest, const char *src); 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 } |