You've already forked wine-staging
mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2025-09-12 18:50:20 -07:00
Added patch to implement ws2_32.InetPtonA/W functions.
This commit is contained in:
@@ -328,6 +328,7 @@ patch_enable_all ()
|
||||
enable_wpcap_Dynamic_Linking="$1"
|
||||
enable_ws2_32_APC_Performance="$1"
|
||||
enable_ws2_32_Connect_Time="$1"
|
||||
enable_ws2_32_InetPtonW="$1"
|
||||
enable_ws2_32_TransmitFile="$1"
|
||||
enable_ws2_32_WSACleanup="$1"
|
||||
enable_ws2_32_WSAPoll="$1"
|
||||
@@ -1086,6 +1087,9 @@ patch_enable ()
|
||||
ws2_32-Connect_Time)
|
||||
enable_ws2_32_Connect_Time="$2"
|
||||
;;
|
||||
ws2_32-InetPtonW)
|
||||
enable_ws2_32_InetPtonW="$2"
|
||||
;;
|
||||
ws2_32-TransmitFile)
|
||||
enable_ws2_32_TransmitFile="$2"
|
||||
;;
|
||||
@@ -6576,6 +6580,18 @@ if test "$enable_ws2_32_Connect_Time" -eq 1; then
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ws2_32-InetPtonW
|
||||
# |
|
||||
# | Modified files:
|
||||
# | * dlls/ws2_32/socket.c, dlls/ws2_32/ws2_32.spec
|
||||
# |
|
||||
if test "$enable_ws2_32_InetPtonW" -eq 1; then
|
||||
patch_apply ws2_32-InetPtonW/0001-ws2_32-Implement-InetPtonA-W.patch
|
||||
(
|
||||
echo '+ { "Michael Müller", "ws2_32: Implement InetPtonA/W.", 1 },';
|
||||
) >> "$patchlist"
|
||||
fi
|
||||
|
||||
# Patchset ws2_32-TransmitFile
|
||||
# |
|
||||
# | This patchset fixes the following Wine bugs:
|
||||
|
@@ -0,0 +1,77 @@
|
||||
From 2147c0778c3a31e9f2e16facdf49dedbf7257cf6 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Michael=20M=C3=BCller?= <michael@fds-team.de>
|
||||
Date: Sat, 3 Oct 2015 00:38:08 +0200
|
||||
Subject: ws2_32: Implement InetPtonA/W.
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Signed-off-by: Michael Müller <michael@fds-team.de>
|
||||
---
|
||||
dlls/ws2_32/socket.c | 30 ++++++++++++++++++++++++++++++
|
||||
dlls/ws2_32/ws2_32.spec | 4 +++-
|
||||
2 files changed, 33 insertions(+), 1 deletion(-)
|
||||
|
||||
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
|
||||
index 5cf3e0f..4c2428d 100644
|
||||
--- a/dlls/ws2_32/socket.c
|
||||
+++ b/dlls/ws2_32/socket.c
|
||||
@@ -7456,6 +7456,36 @@ INT WINAPI WS_inet_pton( INT family, PCSTR addr, PVOID buffer)
|
||||
#endif
|
||||
}
|
||||
|
||||
+/***********************************************************************
|
||||
+* InetPtonW (WS2_32.@)
|
||||
+*/
|
||||
+INT WINAPI InetPtonW(INT family, PCWSTR addr, PVOID buffer)
|
||||
+{
|
||||
+ char *addrA;
|
||||
+ int len;
|
||||
+ INT ret;
|
||||
+
|
||||
+ TRACE("family %d, addr '%s', buffer (%p)\n", family, addr ? debugstr_w(addr) : "(null)", buffer);
|
||||
+
|
||||
+ if (!addr)
|
||||
+ {
|
||||
+ SetLastError(WSAEFAULT);
|
||||
+ return SOCKET_ERROR;
|
||||
+ }
|
||||
+
|
||||
+ len = WideCharToMultiByte(CP_ACP, 0, addr, -1, NULL, 0, NULL, NULL);
|
||||
+ if (!(addrA = HeapAlloc(GetProcessHeap(), 0, len)))
|
||||
+ {
|
||||
+ SetLastError(WSA_NOT_ENOUGH_MEMORY);
|
||||
+ return SOCKET_ERROR;
|
||||
+ }
|
||||
+ WideCharToMultiByte(CP_ACP, 0, addr, -1, addrA, len, NULL, NULL);
|
||||
+
|
||||
+ ret = WS_inet_pton(family, addrA, buffer);
|
||||
+
|
||||
+ HeapFree(GetProcessHeap(), 0, addrA);
|
||||
+ return ret;
|
||||
+}
|
||||
|
||||
/***********************************************************************
|
||||
* WSAStringToAddressA (WS2_32.80)
|
||||
diff --git a/dlls/ws2_32/ws2_32.spec b/dlls/ws2_32/ws2_32.spec
|
||||
index f7c6c2d..95c7da1 100644
|
||||
--- a/dlls/ws2_32/ws2_32.spec
|
||||
+++ b/dlls/ws2_32/ws2_32.spec
|
||||
@@ -53,6 +53,8 @@
|
||||
@ stdcall FreeAddrInfoW(ptr)
|
||||
@ stdcall GetAddrInfoW(wstr wstr ptr ptr)
|
||||
@ stdcall GetNameInfoW(ptr long ptr long ptr long long)
|
||||
+@ stdcall InetPtonA(long str ptr) WS_inet_pton
|
||||
+@ stdcall InetPtonW(long wstr ptr)
|
||||
@ stdcall WSApSetPostRoutine(ptr)
|
||||
@ stdcall WPUCompleteOverlappedRequest(long ptr long long ptr)
|
||||
@ stdcall WSAAccept(long ptr ptr ptr long)
|
||||
@@ -121,4 +123,4 @@
|
||||
@ stdcall getaddrinfo(str str ptr ptr) WS_getaddrinfo
|
||||
@ stdcall getnameinfo(ptr long ptr long ptr long long) WS_getnameinfo
|
||||
@ stdcall inet_ntop(long ptr ptr long) WS_inet_ntop
|
||||
-@ stdcall inet_pton(long ptr ptr) WS_inet_pton
|
||||
+@ stdcall inet_pton(long str ptr) WS_inet_pton
|
||||
--
|
||||
2.5.1
|
||||
|
1
patches/ws2_32-InetPtonW/definition
Normal file
1
patches/ws2_32-InetPtonW/definition
Normal file
@@ -0,0 +1 @@
|
||||
Fixes: Implement ws2_32.InetPtonA/W functions
|
Reference in New Issue
Block a user