diff options
Diffstat (limited to 'otherlibs/win32unix/socket.c')
-rw-r--r-- | otherlibs/win32unix/socket.c | 16 |
1 files changed, 0 insertions, 16 deletions
diff --git a/otherlibs/win32unix/socket.c b/otherlibs/win32unix/socket.c index 9385e82e7e..29b3479b8e 100644 --- a/otherlibs/win32unix/socket.c +++ b/otherlibs/win32unix/socket.c @@ -13,7 +13,6 @@ #include <caml/mlvalues.h> #include "unixsupport.h" -#include <mswsock.h> // for SO_OPENTYPE and SO_SYNCHRONOUS_NONALERT int socket_domain_table[] = { PF_UNIX, PF_INET, @@ -32,7 +31,6 @@ CAMLprim value unix_socket(domain, type, proto) value domain, type, proto; { SOCKET s; - int oldvalue, oldvaluelen, newvalue, retcode; #ifndef HAS_IPV6 /* IPv6 requires WinSock2, we must raise an error on PF_INET6 */ @@ -42,23 +40,9 @@ CAMLprim value unix_socket(domain, type, proto) } #endif - oldvaluelen = sizeof(oldvalue); - retcode = getsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, - (char *) &oldvalue, &oldvaluelen); - if (retcode == 0) { - /* Set sockets to synchronous mode */ - newvalue = SO_SYNCHRONOUS_NONALERT; - setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, - (char *) &newvalue, sizeof(newvalue)); - } s = socket(socket_domain_table[Int_val(domain)], socket_type_table[Int_val(type)], Int_val(proto)); - if (retcode == 0) { - /* Restore initial mode */ - setsockopt(INVALID_SOCKET, SOL_SOCKET, SO_OPENTYPE, - (char *) &oldvalue, oldvaluelen); - } if (s == INVALID_SOCKET) { win32_maperr(WSAGetLastError()); uerror("socket", Nothing); |