[CMAKE]
[reactos.git] / dll / win32 / wininet / wininet_ros.diff
1 --- wine-1.3.4/dlls/wininet/internet.h 2010-10-01 14:46:44.000000000 -0400
2 +++ dll/win32/wininet/internet.h 2010-10-09 15:34:13.000000000 -0400
3 @@ -462,7 +462,7 @@
4 LPCVOID NETCON_GetCert(WININET_NETCONNECTION *connection);
5 int NETCON_GetCipherStrength(WININET_NETCONNECTION *connection);
6 DWORD NETCON_set_timeout(WININET_NETCONNECTION *connection, BOOL send, int value);
7 -int sock_get_error(int);
8 +#define sock_get_error(x) WSAGetLastError()
9
10 extern void URLCacheContainers_CreateDefaults(void);
11 extern void URLCacheContainers_DeleteAll(void);
12 --- wine-1.3.4/dlls/wininet/http.c 2010-10-01 14:46:44.000000000 -0400
13 +++ dll/win32/wininet/http.c 2010-10-09 15:28:29.000000000 -0400
14 @@ -69,6 +69,8 @@
15 #include "wine/exception.h"
16 #include "wine/unicode.h"
17
18 +#include "inet_ntop.c"
19 +
20 WINE_DEFAULT_DEBUG_CHANNEL(wininet);
21
22 static const WCHAR g_szHttp1_0[] = {'H','T','T','P','/','1','.','0',0};
23 --- wine-1.3.4/dlls/wininet/netconnection.c 2010-10-01 14:46:44.000000000 -0400
24 +++ dll/win32/wininet/netconnection.c 2010-10-09 15:33:53.000000000 -0400
25 @@ -547,6 +547,7 @@
26 return TRUE;
27 }
28
29 +#if 0
30 /* translate a unix error code into a winsock one */
31 int sock_get_error( int err )
32 {
33 @@ -613,6 +614,7 @@
34 #endif
35 return err;
36 }
37 +#endif
38
39 /******************************************************************************
40 * NETCON_create
41 --- wine-1.3.4/dlls/wininet/internet.c 2010-10-01 14:46:44.000000000 -0400
42 +++ dll/win32/wininet/internet.c 2010-10-09 15:33:04.000000000 -0400
43 @@ -3569,19 +3569,22 @@
44
45 LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen)
46 {
47 - struct pollfd pfd;
48 + fd_set infd;
49 + struct timeval tv;
50 BOOL bSuccess = FALSE;
51 INT nRecv = 0;
52 LPSTR lpszBuffer = INTERNET_GetResponseBuffer();
53
54 TRACE("\n");
55
56 - pfd.fd = nSocket;
57 - pfd.events = POLLIN;
58 + FD_ZERO(&infd);
59 + FD_SET(nSocket,&infd);
60 + tv.tv_sec = RESPONSE_TIMEOUT;
61 + tv.tv_usec = 0;
62
63 while (nRecv < MAX_REPLY_LEN)
64 {
65 - if (poll(&pfd,1, RESPONSE_TIMEOUT * 1000) > 0)
66 + if (select(0, &infd, NULL, NULL, &tv) > 0)
67 {
68 if (recv(nSocket, &lpszBuffer[nRecv], 1, 0) <= 0)
69 {