b326c853b988c4f39934862f9154b8adc664386c
[reactos.git] / reactos / dll / win32 / wininet / wininet_ros.diff
1 --- D:/Wine-CVS/wine/dlls/wininet/http.c Wed May 28 14:33:28 2008
2 +++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/http.c Sat May 31 11:59:23 2008
3 @@ -61,6 +61,8 @@
4 #include "wine/debug.h"
5 #include "wine/unicode.h"
6
7 +#include "inet_ntop.c"
8 +
9 WINE_DEFAULT_DEBUG_CHANNEL(wininet);
10
11 static const WCHAR g_szHttp1_0[] = {'H','T','T','P','/','1','.','0',0};
12 @@ -1617,8 +1619,9 @@
13
14 if(req->lpszCacheFile) {
15 BOOL res;
16 + DWORD dwBytesWritten;
17
18 - res = WriteFile(req->hCacheFile, buffer, bytes_read, NULL, NULL);
19 + res = WriteFile(req->hCacheFile, buffer, bytes_read, &dwBytesWritten, NULL);
20 if(!res)
21 WARN("WriteFile failed: %u\n", GetLastError());
22 }
23 --- D:/Wine-CVS/wine/dlls/wininet/internet.c Wed May 28 14:33:28 2008
24 +++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/internet.c Fri May 30 18:04:29 2008
25 @@ -3101,19 +3101,22 @@
26
27 LPSTR INTERNET_GetNextLine(INT nSocket, LPDWORD dwLen)
28 {
29 - struct pollfd pfd;
30 + struct timeval tv;
31 + fd_set infd;
32 BOOL bSuccess = FALSE;
33 INT nRecv = 0;
34 LPSTR lpszBuffer = INTERNET_GetResponseBuffer();
35
36 TRACE("\n");
37
38 - pfd.fd = nSocket;
39 - pfd.events = POLLIN;
40 + FD_ZERO(&infd);
41 + FD_SET(nSocket, &infd);
42 + tv.tv_sec=RESPONSE_TIMEOUT;
43 + tv.tv_usec=0;
44
45 while (nRecv < MAX_REPLY_LEN)
46 {
47 - if (poll(&pfd,1, RESPONSE_TIMEOUT * 1000) > 0)
48 + if (select(nSocket+1,&infd,NULL,NULL,&tv) > 0)
49 {
50 if (recv(nSocket, &lpszBuffer[nRecv], 1, 0) <= 0)
51 {
52 --- D:/Wine-CVS/wine/dlls/wininet/internet.h Fri Mar 28 20:13:36 2008
53 +++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/internet.h Thu May 29 19:01:31 2008
54 @@ -23,6 +23,9 @@
55 #ifndef _WINE_INTERNET_H_
56 #define _WINE_INTERNET_H_
57
58 +/* ReactOS-specific definitions */
59 +#define CP_UNIXCP CP_THREAD_ACP
60 +
61 #ifndef __WINE_CONFIG_H
62 # error You must include config.h to use this header
63 #endif
64 --- D:/Wine-CVS/wine/dlls/wininet/netconnection.c Sat May 17 12:09:49 2008
65 +++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/netconnection.c Sat May 31 12:01:55 2008
66 @@ -64,7 +64,7 @@
67 #include "winsock2.h"
68
69 #define RESPONSE_TIMEOUT 30 /* FROM internet.c */
70 -
71 +#define sock_get_error(x) WSAGetLastError()
72
73 WINE_DEFAULT_DEBUG_CHANNEL(wininet);
74
75 @@ -206,6 +206,7 @@
76 return TRUE;
77 }
78
79 +#if 0
80 /* translate a unix error code into a winsock one */
81 static int sock_get_error( int err )
82 {
83 @@ -272,6 +273,7 @@
84 #endif
85 return err;
86 }
87 +#endif
88
89 /******************************************************************************
90 * NETCON_create
91 @@ -616,16 +618,19 @@
92
93 if (!connection->useSSL)
94 {
95 - struct pollfd pfd;
96 + struct timeval tv;
97 + fd_set infd;
98 BOOL bSuccess = FALSE;
99 DWORD nRecv = 0;
100
101 - pfd.fd = connection->socketFD;
102 - pfd.events = POLLIN;
103 + FD_ZERO(&infd);
104 + FD_SET(connection->socketFD, &infd);
105 + tv.tv_sec=RESPONSE_TIMEOUT;
106 + tv.tv_usec=0;
107
108 while (nRecv < *dwBuffer)
109 {
110 - if (poll(&pfd,1, RESPONSE_TIMEOUT * 1000) > 0)
111 + if (select(connection->socketFD+1,&infd,NULL,NULL,&tv) > 0)
112 {
113 if (recv(connection->socketFD, &lpszBuffer[nRecv], 1, 0) <= 0)
114 {
115 --- D:/Wine-CVS/wine/dlls/wininet/rsrc.rc Thu May 08 21:26:20 2008
116 +++ D:/ReactOS-Trunk/reactos/dll/win32/wininet/rsrc.rc Thu May 29 18:57:29 2008
117 @@ -60,4 +60,5 @@
118 #include "wininet_Ru.rc"
119 #include "wininet_Si.rc"
120 #include "wininet_Sv.rc"
121 +#include "wininet_Uk.rc"
122 #include "wininet_Tr.rc"