[svn] assuan - r272 - trunk/src
svn author wk
cvs at cvs.gnupg.org
Fri Oct 5 18:20:01 CEST 2007
Author: wk
Date: 2007-10-05 18:19:51 +0200 (Fri, 05 Oct 2007)
New Revision: 272
Modified:
trunk/src/ChangeLog
trunk/src/assuan-socket.c
trunk/src/assuan.h
Log:
Map WSANOTINITIALIZED to ENOSYS.
Modified: trunk/src/ChangeLog
===================================================================
--- trunk/src/ChangeLog 2007-10-05 16:01:12 UTC (rev 271)
+++ trunk/src/ChangeLog 2007-10-05 16:19:51 UTC (rev 272)
@@ -1,3 +1,9 @@
+2007-10-05 Werner Koch <wk at g10code.com>
+
+ * assuan-socket.c (_assuan_sock_wsa2errno): Map WSANOTINITIALISED.
+ (_assuan_sock_new): Use assuan_fd_t.
+ * assuan.h (_assuan_sock_wsa2errno): Add prefix macro.
+
2007-10-05 Marcus Brinkmann <marcus at g10code.de>
* assuan-defs.h (_assuan_sock_wsa2errno) [HAVE_W32_SYSTEM]: Add prototype.
Modified: trunk/src/assuan-socket.c
===================================================================
--- trunk/src/assuan-socket.c 2007-10-05 16:01:12 UTC (rev 271)
+++ trunk/src/assuan-socket.c 2007-10-05 16:19:51 UTC (rev 272)
@@ -68,6 +68,8 @@
return EAGAIN;
case ERROR_BROKEN_PIPE:
return EPIPE;
+ case WSANOTINITIALISED:
+ return ENOSYS;
default:
return EIO;
}
@@ -168,11 +170,11 @@
_assuan_sock_new (int domain, int type, int proto)
{
#ifdef HAVE_W32_SYSTEM
- int res;
+ assuan_fd_t res;
if (domain == AF_UNIX || domain == AF_LOCAL)
domain = AF_INET;
res = SOCKET2HANDLE(socket (domain, type, proto));
- if (res < 0)
+ if (res == ASSUAN_INVALID_FD)
errno = _assuan_sock_wsa2errno (WSAGetLastError ());
return res;
#else
Modified: trunk/src/assuan.h
===================================================================
--- trunk/src/assuan.h 2007-10-05 16:01:12 UTC (rev 271)
+++ trunk/src/assuan.h 2007-10-05 16:19:51 UTC (rev 272)
@@ -185,7 +185,8 @@
#define _assuan_simple_recvmsg _ASSUAN_PREFIX(_assuan_simple_recvmsg)
#define _assuan_simple_sendmsg _ASSUAN_PREFIX(_assuan_simple_sendmsg)
#define _assuan_waitpid _ASSUAN_PREFIX(_assuan_waitpid)
-#define _assuan_sock_close _ASSUAN_PREFIX(_assuan_close)
+#define _assuan_sock_wsa2errno _ASSUAN_PREFIX(_assuan_sock_wsa2errno)
+#define _assuan_sock_close _ASSUAN_PREFIX(_assuan_sock_close)
#define _assuan_sock_new _ASSUAN_PREFIX(_assuan_sock_new)
#define _assuan_sock_connect _ASSUAN_PREFIX(_assuan_sock_connect)
#define _assuan_sock_bind _ASSUAN_PREFIX(_assuan_sock_bind)
More information about the Gnupg-commits
mailing list