From fbed0231f8354710a79e1e928e63acc8a8388fa4 Mon Sep 17 00:00:00 2001 From: Werner Koch Date: Thu, 12 Jul 2007 18:54:45 +0000 Subject: [PATCH] Minor fixes for W32 --- trunk/assuan/ChangeLog | 4 ++++ trunk/assuan/assuan-handler.c | 4 ++++ trunk/assuan/assuan-socket.c | 2 +- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/trunk/assuan/ChangeLog b/trunk/assuan/ChangeLog index 9bad1ee..ada72ff 100644 --- a/trunk/assuan/ChangeLog +++ b/trunk/assuan/ChangeLog @@ -1,5 +1,9 @@ 2007-07-12 Werner Koch + * assuan-handler.c (assuan_get_active_fds): Use get_osfhandle for + the data fp. + * assuan-socket.c (_assuan_close) [W32]: Use CloseHandle and not close. + * assuan-io.c (_assuan_simple_write, _assuan_simple_read): Map ERROR_BROKEN_PIPE to EPIPE. diff --git a/trunk/assuan/assuan-handler.c b/trunk/assuan/assuan-handler.c index 45a901c..d1b29cf 100644 --- a/trunk/assuan/assuan-handler.c +++ b/trunk/assuan/assuan-handler.c @@ -663,7 +663,11 @@ assuan_get_active_fds (assuan_context_t ctx, int what, if (ctx->outbound.fd != -1) fdarray[n++] = ctx->outbound.fd; if (ctx->outbound.data.fp) +#ifdef HAVE_W32_SYSTEM + fdarray[n++] = _get_osfhandle (fileno (ctx->outbound.data.fp)); +#else fdarray[n++] = fileno (ctx->outbound.data.fp); +#endif } return n; diff --git a/trunk/assuan/assuan-socket.c b/trunk/assuan/assuan-socket.c index 6aa5708..196c4f6 100644 --- a/trunk/assuan/assuan-socket.c +++ b/trunk/assuan/assuan-socket.c @@ -50,7 +50,7 @@ _assuan_close (int fd) #else int rc = closesocket (fd); if (rc && WSAGetLastError () == WSAENOTSOCK) - rc = close (fd); + rc = CloseHandle (fd); return rc; #endif } -- 2.26.2