Minor fixes for W32
This commit is contained in:
parent
f401a75a5f
commit
409aaefe36
@ -1,5 +1,9 @@
|
|||||||
2007-07-12 Werner Koch <wk@g10code.com>
|
2007-07-12 Werner Koch <wk@g10code.com>
|
||||||
|
|
||||||
|
* 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
|
* assuan-io.c (_assuan_simple_write, _assuan_simple_read): Map
|
||||||
ERROR_BROKEN_PIPE to EPIPE.
|
ERROR_BROKEN_PIPE to EPIPE.
|
||||||
|
|
||||||
|
@ -663,7 +663,11 @@ assuan_get_active_fds (assuan_context_t ctx, int what,
|
|||||||
if (ctx->outbound.fd != -1)
|
if (ctx->outbound.fd != -1)
|
||||||
fdarray[n++] = ctx->outbound.fd;
|
fdarray[n++] = ctx->outbound.fd;
|
||||||
if (ctx->outbound.data.fp)
|
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);
|
fdarray[n++] = fileno (ctx->outbound.data.fp);
|
||||||
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
return n;
|
return n;
|
||||||
|
@ -50,7 +50,7 @@ _assuan_close (int fd)
|
|||||||
#else
|
#else
|
||||||
int rc = closesocket (fd);
|
int rc = closesocket (fd);
|
||||||
if (rc && WSAGetLastError () == WSAENOTSOCK)
|
if (rc && WSAGetLastError () == WSAENOTSOCK)
|
||||||
rc = close (fd);
|
rc = CloseHandle (fd);
|
||||||
return rc;
|
return rc;
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user