aboutsummaryrefslogtreecommitdiffstats
path: root/assuan/assuan-socket.c
diff options
context:
space:
mode:
authorMarcus Brinkmann <[email protected]>2007-07-16 17:26:09 +0000
committerMarcus Brinkmann <[email protected]>2007-07-16 17:26:09 +0000
commitb3434696b380921d5d0be8ffdf1e19ca938fe572 (patch)
tree7d071e655ac7a168a55729da7fd7b5cc93c10672 /assuan/assuan-socket.c
parent2007-07-13 Marcus Brinkmann <[email protected]> (diff)
downloadgpgme-b3434696b380921d5d0be8ffdf1e19ca938fe572.tar.gz
gpgme-b3434696b380921d5d0be8ffdf1e19ca938fe572.zip
2007-07-16 Marcus Brinkmann <[email protected]>
* assuan/assuan-socket.c (_assuan_close): Always use close(). * assuan/assuan.h (_gpgme_io_close): New prototype. (close): New macro, define as _gpgme_io_close. gpgme/ 2007-07-16 Marcus Brinkmann <[email protected]> * w32-io.c (struct reader_context_s, struct writer_context_s): New members REFCOUNT. (create_reader, create_writer): Initialize C->refcount to 1. (destroy_reader, destroy_writer): Only destroy if C->refcount drops to 0. (find_reader, find_writer, kill_reader, kill_writer): Beautify. * priv-io.h (_gpgme_io_dup): New prototype. * posix-io.c (_gpgme_io_dup): New function. * w32-io.c (_gpgme_io_dup): Likewise. * w32-glib-io.c (_gpgme_io_dup): Likewise. * engine-gpgsm.c (start): Reverting to version 2007-07-10.
Diffstat (limited to 'assuan/assuan-socket.c')
-rw-r--r--assuan/assuan-socket.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/assuan/assuan-socket.c b/assuan/assuan-socket.c
index 196c4f6f..5566fdea 100644
--- a/assuan/assuan-socket.c
+++ b/assuan/assuan-socket.c
@@ -45,13 +45,13 @@
int
_assuan_close (int fd)
{
-#ifndef HAVE_W32_SYSTEM
- return close (fd);
-#else
+#if defined (HAVE_W32_SYSTEM) && !defined(_ASSUAN_IN_GPGME_BUILD_ASSUAN)
int rc = closesocket (fd);
if (rc && WSAGetLastError () == WSAENOTSOCK)
rc = CloseHandle (fd);
return rc;
+#else
+ return close (fd);
#endif
}