mirror of
https://github.com/reactos/reactos.git
synced 2025-08-05 23:52:57 +00:00
[JSPROXY] Sync with Wine Staging 4.18. CORE-16441
This commit is contained in:
parent
021b5c1f4d
commit
341a75bff3
2 changed files with 11 additions and 36 deletions
|
@ -16,37 +16,18 @@
|
||||||
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
* Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include "config.h"
|
|
||||||
#include "wine/port.h"
|
|
||||||
|
|
||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <sys/types.h>
|
|
||||||
#ifdef HAVE_SYS_SOCKET_H
|
|
||||||
# include <sys/socket.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_NETINET_IN_H
|
|
||||||
# include <netinet/in.h>
|
|
||||||
#endif
|
|
||||||
#ifdef HAVE_NETDB_H
|
|
||||||
# include <netdb.h>
|
|
||||||
#endif
|
|
||||||
#ifdef __REACTOS__
|
#ifdef __REACTOS__
|
||||||
|
#include <stdio.h>
|
||||||
#define COBJMACROS
|
#define COBJMACROS
|
||||||
#endif
|
#endif
|
||||||
#if defined(__MINGW32__) || defined (_MSC_VER)
|
#include <sys/types.h>
|
||||||
# include <ws2tcpip.h>
|
|
||||||
#else
|
|
||||||
# define closesocket close
|
|
||||||
# define ioctlsocket ioctl
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#include "windef.h"
|
#include "windef.h"
|
||||||
#include "winbase.h"
|
#include "winbase.h"
|
||||||
#ifndef __MINGW32__
|
|
||||||
#define USE_WS_PREFIX
|
|
||||||
#endif
|
|
||||||
#include "winsock2.h"
|
#include "winsock2.h"
|
||||||
#include "ws2ipdef.h"
|
#include "ws2ipdef.h"
|
||||||
|
#include "ws2tcpip.h"
|
||||||
#include "winnls.h"
|
#include "winnls.h"
|
||||||
#include "wininet.h"
|
#include "wininet.h"
|
||||||
#ifndef __REACTOS__
|
#ifndef __REACTOS__
|
||||||
|
@ -57,7 +38,6 @@
|
||||||
#include "activscp.h"
|
#include "activscp.h"
|
||||||
#include "wine/debug.h"
|
#include "wine/debug.h"
|
||||||
#include "wine/heap.h"
|
#include "wine/heap.h"
|
||||||
#include "wine/unicode.h"
|
|
||||||
|
|
||||||
static HINSTANCE instance;
|
static HINSTANCE instance;
|
||||||
|
|
||||||
|
@ -297,7 +277,7 @@ static HRESULT WINAPI dispex_GetNameSpaceParent(
|
||||||
static HRESULT WINAPI dispex_GetDispID(
|
static HRESULT WINAPI dispex_GetDispID(
|
||||||
IDispatchEx *iface, BSTR name, DWORD flags, DISPID *id )
|
IDispatchEx *iface, BSTR name, DWORD flags, DISPID *id )
|
||||||
{
|
{
|
||||||
if (!strcmpW( name, dns_resolveW ))
|
if (!lstrcmpW( name, dns_resolveW ))
|
||||||
{
|
{
|
||||||
*id = DISPID_GLOBAL_DNSRESOLVE;
|
*id = DISPID_GLOBAL_DNSRESOLVE;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
@ -321,9 +301,9 @@ static char *get_computer_name( COMPUTER_NAME_FORMAT format )
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
static void printf_addr( const WCHAR *fmt, WCHAR *buf, struct sockaddr_in *addr )
|
static void printf_addr( const WCHAR *fmt, WCHAR *buf, SIZE_T size, struct sockaddr_in *addr )
|
||||||
{
|
{
|
||||||
sprintfW( buf, fmt,
|
swprintf( buf, fmt,
|
||||||
(unsigned int)(ntohl( addr->sin_addr.s_addr ) >> 24 & 0xff),
|
(unsigned int)(ntohl( addr->sin_addr.s_addr ) >> 24 & 0xff),
|
||||||
(unsigned int)(ntohl( addr->sin_addr.s_addr ) >> 16 & 0xff),
|
(unsigned int)(ntohl( addr->sin_addr.s_addr ) >> 16 & 0xff),
|
||||||
(unsigned int)(ntohl( addr->sin_addr.s_addr ) >> 8 & 0xff),
|
(unsigned int)(ntohl( addr->sin_addr.s_addr ) >> 8 & 0xff),
|
||||||
|
@ -332,7 +312,6 @@ static void printf_addr( const WCHAR *fmt, WCHAR *buf, struct sockaddr_in *addr
|
||||||
|
|
||||||
static HRESULT dns_resolve( const WCHAR *hostname, VARIANT *result )
|
static HRESULT dns_resolve( const WCHAR *hostname, VARIANT *result )
|
||||||
{
|
{
|
||||||
#ifdef HAVE_GETADDRINFO
|
|
||||||
static const WCHAR fmtW[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
|
static const WCHAR fmtW[] = {'%','u','.','%','u','.','%','u','.','%','u',0};
|
||||||
WCHAR addr[16];
|
WCHAR addr[16];
|
||||||
struct addrinfo *ai, *elem;
|
struct addrinfo *ai, *elem;
|
||||||
|
@ -356,15 +335,11 @@ static HRESULT dns_resolve( const WCHAR *hostname, VARIANT *result )
|
||||||
freeaddrinfo( ai );
|
freeaddrinfo( ai );
|
||||||
return S_FALSE;
|
return S_FALSE;
|
||||||
}
|
}
|
||||||
printf_addr( fmtW, addr, (struct sockaddr_in *)elem->ai_addr );
|
printf_addr( fmtW, addr, ARRAY_SIZE(addr), (struct sockaddr_in *)elem->ai_addr );
|
||||||
freeaddrinfo( ai );
|
freeaddrinfo( ai );
|
||||||
V_VT( result ) = VT_BSTR;
|
V_VT( result ) = VT_BSTR;
|
||||||
V_BSTR( result ) = SysAllocString( addr );
|
V_BSTR( result ) = SysAllocString( addr );
|
||||||
return S_OK;
|
return S_OK;
|
||||||
#else
|
|
||||||
FIXME("getaddrinfo not found at build time\n");
|
|
||||||
return S_FALSE;
|
|
||||||
#endif
|
|
||||||
}
|
}
|
||||||
|
|
||||||
static HRESULT WINAPI dispex_InvokeEx(
|
static HRESULT WINAPI dispex_InvokeEx(
|
||||||
|
@ -439,7 +414,7 @@ static HRESULT WINAPI site_GetItemInfo(
|
||||||
IActiveScriptSite *iface, LPCOLESTR name, DWORD mask,
|
IActiveScriptSite *iface, LPCOLESTR name, DWORD mask,
|
||||||
IUnknown **item, ITypeInfo **type_info )
|
IUnknown **item, ITypeInfo **type_info )
|
||||||
{
|
{
|
||||||
if (!strcmpW( name, global_funcsW ) && mask == SCRIPTINFO_IUNKNOWN)
|
if (!lstrcmpW( name, global_funcsW ) && mask == SCRIPTINFO_IUNKNOWN)
|
||||||
{
|
{
|
||||||
*item = (IUnknown *)&global_dispex;
|
*item = (IUnknown *)&global_dispex;
|
||||||
return S_OK;
|
return S_OK;
|
||||||
|
@ -515,9 +490,9 @@ static BSTR include_pac_utils( const WCHAR *script )
|
||||||
data = LoadResource( hmod, rsrc );
|
data = LoadResource( hmod, rsrc );
|
||||||
|
|
||||||
len = MultiByteToWideChar( CP_ACP, 0, data, size, NULL, 0 );
|
len = MultiByteToWideChar( CP_ACP, 0, data, size, NULL, 0 );
|
||||||
if (!(ret = SysAllocStringLen( NULL, len + strlenW( script ) + 1 ))) return NULL;
|
if (!(ret = SysAllocStringLen( NULL, len + lstrlenW( script ) + 1 ))) return NULL;
|
||||||
MultiByteToWideChar( CP_ACP, 0, data, size, ret, len );
|
MultiByteToWideChar( CP_ACP, 0, data, size, ret, len );
|
||||||
strcpyW( ret + len, script );
|
lstrcpyW( ret + len, script );
|
||||||
return ret;
|
return ret;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -87,7 +87,7 @@ dll/win32/iphlpapi # Out of sync
|
||||||
dll/win32/itircl # Synced to WineStaging-4.18
|
dll/win32/itircl # Synced to WineStaging-4.18
|
||||||
dll/win32/itss # Synced to WineStaging-4.18
|
dll/win32/itss # Synced to WineStaging-4.18
|
||||||
dll/win32/jscript # Synced to WineStaging-4.18
|
dll/win32/jscript # Synced to WineStaging-4.18
|
||||||
dll/win32/jsproxy # Synced to WineStaging-4.0
|
dll/win32/jsproxy # Synced to WineStaging-4.18
|
||||||
dll/win32/loadperf # Synced to WineStaging-3.3
|
dll/win32/loadperf # Synced to WineStaging-3.3
|
||||||
dll/win32/lz32 # Synced to WineStaging-3.3
|
dll/win32/lz32 # Synced to WineStaging-3.3
|
||||||
dll/win32/mapi32 # Synced to WineStaging-4.0
|
dll/win32/mapi32 # Synced to WineStaging-4.0
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue