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