Author: tfaber
Date: Wed Jun 20 15:10:50 2012
New Revision: 56761
URL:
http://svn.reactos.org/svn/reactos?rev=56761&view=rev
Log:
[WININET]
- Fix sock_namelen type in FTP_Connect. Already sent to Wine.
- Fix warnings
Modified:
trunk/reactos/dll/win32/wininet/CMakeLists.txt
trunk/reactos/dll/win32/wininet/ftp.c
trunk/reactos/dll/win32/wininet/http.c
trunk/reactos/dll/win32/wininet/inet_ntop.c
trunk/reactos/dll/win32/wininet/internet.h
trunk/reactos/dll/win32/wininet/wininet_ros.diff
Modified: trunk/reactos/dll/win32/wininet/CMakeLists.txt
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/CMakeLis…
==============================================================================
--- trunk/reactos/dll/win32/wininet/CMakeLists.txt [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/CMakeLists.txt [iso-8859-1] Wed Jun 20 15:10:50 2012
@@ -20,22 +20,15 @@
urlcache.c
utility.c
wininet_main.c
+ rsrc.rc
+ version.rc
${CMAKE_CURRENT_BINARY_DIR}/wininet_stubs.c
${CMAKE_CURRENT_BINARY_DIR}/wininet.def)
-add_library(wininet SHARED
- ${SOURCE}
- rsrc.rc
- version.rc)
+add_library(wininet SHARED ${SOURCE})
set_module_type(wininet win32dll)
target_link_libraries(wininet wine ${PSEH_LIB} zlib)
add_delay_importlibs(wininet secur32 crypt32 cryptui)
add_importlibs(wininet mpr shlwapi shell32 user32 advapi32 ws2_32 msvcrt kernel32 ntdll)
add_cd_file(TARGET wininet DESTINATION reactos/system32 FOR all)
-
-if(NOT MSVC)
- # FIXME:
http://www.cmake.org/Bug/view.php?id=12998
- #allow_warnings(wininet)
- set_source_files_properties(${SOURCE} PROPERTIES COMPILE_FLAGS
"-Wno-error")
-endif()
Modified: trunk/reactos/dll/win32/wininet/ftp.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/ftp.c?re…
==============================================================================
--- trunk/reactos/dll/win32/wininet/ftp.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/ftp.c [iso-8859-1] Wed Jun 20 15:10:50 2012
@@ -2433,7 +2433,7 @@
static const WCHAR szEmpty[] = {'\0'};
struct sockaddr_in socketAddr;
INT nsocket = -1;
- UINT sock_namelen;
+ socklen_t sock_namelen;
BOOL bSuccess = FALSE;
ftp_session_t *lpwfs = NULL;
char szaddr[INET_ADDRSTRLEN];
Modified: trunk/reactos/dll/win32/wininet/http.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/http.c?r…
==============================================================================
--- trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/http.c [iso-8859-1] Wed Jun 20 15:10:50 2012
@@ -1901,6 +1901,9 @@
}
return;
}
+#else
+ // silence unused function warning
+ (void)collect_connections_proc;
#endif
INTERNET_SendCallback(&req->hdr, req->hdr.dwContext,
Modified: trunk/reactos/dll/win32/wininet/inet_ntop.c
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/inet_nto…
==============================================================================
--- trunk/reactos/dll/win32/wininet/inet_ntop.c [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/inet_ntop.c [iso-8859-1] Wed Jun 20 15:10:50 2012
@@ -27,7 +27,7 @@
#ifdef SPRINTF_CHAR
# define SPRINTF(x) strlen(sprintf/**/x)
#else
-# define SPRINTF(x) ((size_t)sprintf x)
+# define SPRINTF(x) ((socklen_t)sprintf x)
#endif
/*
@@ -35,10 +35,10 @@
* sizeof(int) < 4. sizeof(int) > 4 is fine; all the world's not a VAX.
*/
-static const char *inet_ntop4(const u_char *src, char *dst, size_t size);
+static const char *inet_ntop4(const u_char *src, char *dst, socklen_t size);
#ifdef INET6
-static const char *inet_ntop6(const u_char *src, char *dst, size_t size);
+static const char *inet_ntop6(const u_char *src, char *dst, socklen_t size);
#endif
/* char *
@@ -50,7 +50,7 @@
* Paul Vixie, 1996.
*/
const char *
-inet_ntop(int af, const void *src, char *dst, size_t size)
+inet_ntop(int af, const void *src, char *dst, socklen_t size)
{
switch (af) {
@@ -79,7 +79,7 @@
* Paul Vixie, 1996.
*/
static const char *
-inet_ntop4(const u_char *src, char *dst, size_t size)
+inet_ntop4(const u_char *src, char *dst, socklen_t size)
{
static const char fmt[] = "%u.%u.%u.%u";
char tmp[sizeof "255.255.255.255"];
@@ -100,7 +100,7 @@
* Paul Vixie, 1996.
*/
static const char *
-inet_ntop6(const u_char *src, char *dst, size_t size)
+inet_ntop6(const u_char *src, char *dst, socklen_t size)
{
/*
* Note that int32_t and int16_t need only be "at least" large enough
@@ -178,7 +178,7 @@
/*
* Check for overflow, copy, and we're done.
*/
- if ((size_t)(tp - tmp) > size) {
+ if ((socklen_t)(tp - tmp) > size) {
WSASetLastError(WSAEINVAL);
return (NULL);
}
Modified: trunk/reactos/dll/win32/wininet/internet.h
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/internet…
==============================================================================
--- trunk/reactos/dll/win32/wininet/internet.h [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/internet.h [iso-8859-1] Wed Jun 20 15:10:50 2012
@@ -540,6 +540,25 @@
int sock_get_error(int) DECLSPEC_HIDDEN;
#else
#define sock_get_error(x) WSAGetLastError()
+const char *inet_ntop(int, const void *, char *, socklen_t);
+
+static inline long unix_recv(int socket, void *buffer, size_t length, int flags)
+{
+ return recv(socket, buffer, length, flags);
+}
+#define recv unix_recv
+
+static inline int unix_ioctl(int filedes, long request, void *arg)
+{
+ return ioctlsocket(filedes, request, arg);
+}
+#define ioctlsocket unix_ioctl
+
+static inline int unix_getsockopt(int socket, int level, int option_name, void
*option_value, socklen_t *option_len)
+{
+ return getsockopt(socket, level, option_name, option_value, option_len);
+}
+#define getsockopt unix_getsockopt
#endif
extern void URLCacheContainers_CreateDefaults(void) DECLSPEC_HIDDEN;
Modified: trunk/reactos/dll/win32/wininet/wininet_ros.diff
URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wininet/wininet_…
==============================================================================
--- trunk/reactos/dll/win32/wininet/wininet_ros.diff [iso-8859-1] (original)
+++ trunk/reactos/dll/win32/wininet/wininet_ros.diff [iso-8859-1] Wed Jun 20 15:10:50
2012
@@ -1,6 +1,6 @@
---- wine-1.5.4/Wine/dlls/wininet/internet.h 2012-06-20 14:38:39 +0200
-+++ dll/win32/wininet/internet.h 2012-06-20 14:51:41 +0200
-@@ -536,7 +536,11 @@ BOOL NETCON_is_alive(netconn_t*) DECLSPE
+--- wine-1.5.4/dlls/wininet/internet.h 2012-06-20 14:38:39 +0200
++++ dll/win32/wininet/internet.h 2012-06-20 16:49:05 +0200
+@@ -536,7 +536,30 @@ BOOL NETCON_is_alive(netconn_t*) DECLSPE
LPCVOID NETCON_GetCert(netconn_t *connection) DECLSPEC_HIDDEN;
int NETCON_GetCipherStrength(netconn_t*) DECLSPEC_HIDDEN;
DWORD NETCON_set_timeout(netconn_t *connection, BOOL send, DWORD value)
DECLSPEC_HIDDEN;
@@ -8,12 +8,31 @@
int sock_get_error(int) DECLSPEC_HIDDEN;
+#else
+#define sock_get_error(x) WSAGetLastError()
++const char *inet_ntop(int, const void *, char *, socklen_t);
++
++static inline long unix_recv(int socket, void *buffer, size_t length, int flags)
++{
++ return recv(socket, buffer, length, flags);
++}
++#define recv unix_recv
++
++static inline int unix_ioctl(int filedes, long request, void *arg)
++{
++ return ioctlsocket(filedes, request, arg);
++}
++#define ioctlsocket unix_ioctl
++
++static inline int unix_getsockopt(int socket, int level, int option_name, void
*option_value, socklen_t *option_len)
++{
++ return getsockopt(socket, level, option_name, option_value, option_len);
++}
++#define getsockopt unix_getsockopt
+#endif
extern void URLCacheContainers_CreateDefaults(void) DECLSPEC_HIDDEN;
extern void URLCacheContainers_DeleteAll(void) DECLSPEC_HIDDEN;
---- wine-1.5.4/Wine/dlls/wininet/netconnection.c 2012-06-20 14:38:39 +0200
-+++ dll/win32/wininet/netconnection.c 2012-06-20 14:52:22 +0200
+--- wine-1.5.4/dlls/wininet/netconnection.c 2012-06-20 14:38:39 +0200
++++ dll/win32/wininet/netconnection.c 2012-06-20 15:50:06 +0200
@@ -523,12 +523,16 @@ DWORD create_netconn(BOOL useSSL, server
if(result == -1)
{
@@ -51,8 +70,8 @@
/******************************************************************************
* NETCON_secure_connect
---- wine-1.5.4/Wine/dlls/wininet/internet.c 2012-06-20 14:38:38 +0200
-+++ dll/win32/wininet/internet.c 2012-06-20 14:58:51 +0200
+--- wine-1.5.4/dlls/wininet/internet.c 2012-06-20 14:38:38 +0200
++++ dll/win32/wininet/internet.c 2012-06-20 15:50:05 +0200
@@ -292,7 +292,9 @@ BOOL WINAPI DllMain (HINSTANCE hinstDLL,
if (g_dwTlsErrIndex == TLS_OUT_OF_INDEXES)
return FALSE;
@@ -91,10 +110,8 @@
{
if (recv(nSocket, &lpszBuffer[nRecv], 1, 0) <= 0)
{
-Index: dll/win32/wininet/urlcache.c
-===================================================================
---- wine-1.5.4/Wine/dlls/wininet/urlcache.c 2012-06-20 14:30:41 +0200
-+++ dll/win32/wininet/urlcache.c 2012-06-20 14:54:06 +0200
+--- wine-1.5.4/dlls/wininet/urlcache.c 2012-06-20 14:30:41 +0200
++++ dll/win32/wininet/urlcache.c 2012-06-20 15:50:06 +0200
@@ -189,6 +189,8 @@ typedef struct _URLCACHECONTAINER
/* List of all containers available */
@@ -160,10 +177,8 @@
LIST_FOR_EACH_ENTRY(pContainer, &UrlContainers, URLCACHECONTAINER, entry)
{
/* The URL cache has prefix L"" (unlike Cookies and History) */
-Index: dll/win32/wininet/http.c
-===================================================================
---- wine-1.5.4/Wine/dlls/wininet/http.c 2012-06-20 14:38:38 +0200
-+++ dll/win32/wininet/http.c 2012-06-20 14:49:11 +0200
+--- wine-1.5.4/dlls/wininet/http.c 2012-06-20 15:19:57 +0200
++++ dll/win32/wininet/http.c 2012-06-20 16:24:11 +0200
@@ -73,6 +73,9 @@
#include "wine/exception.h"
#include "wine/unicode.h"
@@ -218,10 +233,13 @@
req->netconn = NULL;
run_collector = !collector_running;
-@@ -1888,6 +1901,7 @@ static void http_release_netconn(http_re
+@@ -1888,6 +1901,10 @@ static void http_release_netconn(http_re
}
return;
}
++#else
++ // silence unused function warning
++ (void)collect_connections_proc;
+#endif
INTERNET_SendCallback(&req->hdr, req->hdr.dwContext,