1 --- wine-1.5.4/dlls/winhttp/net.c 2012-06-20 14:30:41 +0200
2 +++ dll/win32/winhttp/net.c 2012-06-21 18:00:53 +0200
3 @@ -160,6 +160,7 @@ static void ssl_lock_callback(int mode,
6 /* translate a unix error code into a winsock error code */
8 static int sock_get_error( int err )
10 #if !defined(__MINGW32__) && !defined (_MSC_VER)
11 @@ -225,6 +226,15 @@ static int sock_get_error( int err )
16 +#define sock_get_error(x) WSAGetLastError()
18 +static inline int unix_ioctl(int filedes, long request, void *arg)
20 + return ioctlsocket(filedes, request, arg);
22 +#define ioctlsocket unix_ioctl
26 static PCCERT_CONTEXT X509_to_cert_context(X509 *cert)
27 @@ -648,11 +658,17 @@ BOOL netconn_connect( netconn_t *conn, c
28 res = sock_get_error( errno );
29 if (res == WSAEWOULDBLOCK || res == WSAEINPROGRESS)
32 + // ReactOS: use select instead of poll
36 - pfd.fd = conn->socket;
37 - pfd.events = POLLOUT;
38 - if (poll( &pfd, 1, timeout ) > 0)
40 + FD_SET(conn->socket, &outfd);
43 + tv.tv_usec = timeout * 1000;
45 + if (select( 0, NULL, &outfd, NULL, &tv ) > 0)
48 res = sock_get_error( errno );
49 @@ -848,7 +864,8 @@ BOOL netconn_query_data_available( netco
51 BOOL netconn_get_next_line( netconn_t *conn, char *buffer, DWORD *buflen )
54 + // ReactOS: use select instead of poll
59 @@ -884,19 +901,21 @@ BOOL netconn_get_next_line( netconn_t *c
63 - pfd.fd = conn->socket;
64 - pfd.events = POLLIN;
66 + FD_SET(conn->socket, &infd);
68 while (recvd < *buflen)
73 + struct timeval tv, *ptv;
74 socklen_t len = sizeof(tv);
76 if ((res = getsockopt( conn->socket, SOL_SOCKET, SO_RCVTIMEO, (void*)&tv, &len ) != -1))
77 - timeout = tv.tv_sec * 1000 + tv.tv_usec / 1000;
81 - if (poll( &pfd, 1, timeout ) > 0)
84 + if (select( 0, &infd, NULL, NULL, ptv ) > 0)
86 if ((res = recv( conn->socket, &buffer[recvd], 1, 0 )) <= 0)
88 --- wine-1.5.4/dlls/winhttp/request.c 2012-06-20 14:30:41 +0200
89 +++ dll/win32/winhttp/request.c 2012-06-21 17:32:47 +0200
92 #include "winhttp_private.h"
94 +#include "inet_ntop.c"
96 WINE_DEFAULT_DEBUG_CHANNEL(winhttp);
98 static const WCHAR attr_accept[] = {'A','c','c','e','p','t',0};
99 --- wine-1.5.4/dlls/winhttp/rsrc.rc 2012-06-20 14:30:41 +0200
100 +++ dll/win32/winhttp/rsrc.rc 2012-07-14 15:25:28 +0200
102 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
105 +/* @makedep: winhttp_tlb.tlb */
106 +1 TYPELIB winhttp_tlb.tlb
108 +/* @makedep: winhttp_tlb.rgs */
109 +1 WINE_REGISTRY winhttp_tlb.rgs
111 /* @makedep: pac.js */
114 --- wine-1.5.4/dlls/winhttp/session.c 2012-07-13 15:34:57 +0200
115 +++ dll/win32/winhttp/session.c 2012-06-23 17:51:47 +0200
116 @@ -95,6 +95,9 @@ static void session_destroy( object_head
117 heap_free( session->proxy_username );
118 heap_free( session->proxy_password );
119 heap_free( session );
125 static BOOL session_query_option( object_header_t *hdr, DWORD option, LPVOID buffer, LPDWORD buflen )
126 @@ -203,6 +206,11 @@ HINTERNET WINAPI WinHttpOpen( LPCWSTR ag
129 HINTERNET handle = NULL;
132 + int error = WSAStartup(MAKEWORD(2, 2), &wsaData);
133 + if (error) ERR("WSAStartup failed: %d\n", error);
136 TRACE("%s, %u, %s, %s, 0x%08x\n", debugstr_w(agent), access, debugstr_w(proxy), debugstr_w(bypass), flags);