mirror of
https://gitlab.winehq.org/wine/wine-staging.git
synced 2024-09-13 09:17:20 -07:00
Rebase against 17ba916c564236c9940ad736ff15a87fc5d1b12f.
This commit is contained in:
parent
d7b8304e38
commit
dc0aa10ad7
@ -1,4 +1,4 @@
|
||||
From b4010603ae2bab3a4fdc8b57efaebe47254eb168 Mon Sep 17 00:00:00 2001
|
||||
From 84c63ad840a0717541969a66124f830de282ffa8 Mon Sep 17 00:00:00 2001
|
||||
From: Daniel Wendt <daniel.wendt@linux.com>
|
||||
Date: Fri, 15 Nov 2013 12:52:37 +0100
|
||||
Subject: [PATCH] gdi32: fix for rotated Arc, ArcTo, Chord and Pie drawing
|
||||
@ -116,12 +116,12 @@ index c6f11ae6a69..e4a5f7bab8b 100644
|
||||
{
|
||||
HeapFree( GetProcessHeap(), 0, points );
|
||||
diff --git a/dlls/gdi32/gdi_private.h b/dlls/gdi32/gdi_private.h
|
||||
index 6d23e7e0ecc..e8e08d00b81 100644
|
||||
index bf7684b53a7..d75708f0d15 100644
|
||||
--- a/dlls/gdi32/gdi_private.h
|
||||
+++ b/dlls/gdi32/gdi_private.h
|
||||
@@ -208,4 +208,7 @@ extern BOOL EMFDC_StretchDIBits( DC_ATTR *dc_attr, INT x_dst, INT y_dst, INT wid
|
||||
INT height_src, const void *bits, const BITMAPINFO *info,
|
||||
UINT coloruse, DWORD rop ) DECLSPEC_HIDDEN;
|
||||
@@ -223,4 +223,7 @@ extern BOOL EMFDC_StrokeAndFillPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
|
||||
extern BOOL EMFDC_StrokePath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
|
||||
extern BOOL EMFDC_WidenPath( DC_ATTR *dc_attr ) DECLSPEC_HIDDEN;
|
||||
|
||||
+BOOL xform_has_rotate_and_uniform_scale_and_shear( const XFORM *xform ) DECLSPEC_HIDDEN;
|
||||
+BOOL xform_decompose_rotation_and_translation( XFORM *xform, XFORM *rotation_and_translation ) DECLSPEC_HIDDEN;
|
||||
|
@ -51,7 +51,7 @@ usage()
|
||||
# Get the upstream commit sha
|
||||
upstream_commit()
|
||||
{
|
||||
echo "60a3e0106246cb91d598a815d4fadf2791011142"
|
||||
echo "17ba916c564236c9940ad736ff15a87fc5d1b12f"
|
||||
}
|
||||
|
||||
# Show version information
|
||||
|
@ -1,133 +0,0 @@
|
||||
From e82ff01a82ef869fd97f19f5827f61eaaab7fb06 Mon Sep 17 00:00:00 2001
|
||||
From: Sebastian Lackner <sebastian@fds-team.de>
|
||||
Date: Thu, 20 Nov 2014 13:27:24 +0100
|
||||
Subject: [PATCH] ws2_32: Implement returning the proper time with
|
||||
SO_CONNECT_TIME.
|
||||
|
||||
Based on a patch by Erich Hoover.
|
||||
|
||||
To avoid calculations on the client-side, the server sends the connect time as relative (negative) value.
|
||||
Needs tools/make_requests.
|
||||
---
|
||||
dlls/ws2_32/socket.c | 21 ++++++++++++++++-----
|
||||
dlls/ws2_32/tests/sock.c | 20 ++++++++++++++++++++
|
||||
server/protocol.def | 1 +
|
||||
server/sock.c | 1 +
|
||||
4 files changed, 38 insertions(+), 5 deletions(-)
|
||||
|
||||
diff --git a/dlls/ws2_32/socket.c b/dlls/ws2_32/socket.c
|
||||
index 79085cf0c2a..2d35f4c9448 100644
|
||||
--- a/dlls/ws2_32/socket.c
|
||||
+++ b/dlls/ws2_32/socket.c
|
||||
@@ -798,6 +798,21 @@ static inline void release_sock_fd( SOCKET s, int fd )
|
||||
close( fd );
|
||||
}
|
||||
|
||||
+static DWORD _get_connect_time(SOCKET s)
|
||||
+{
|
||||
+ NTSTATUS status;
|
||||
+ DWORD connect_time = ~0u;
|
||||
+ SERVER_START_REQ( get_socket_info )
|
||||
+ {
|
||||
+ req->handle = wine_server_obj_handle( SOCKET2HANDLE(s) );
|
||||
+ status = wine_server_call( req );
|
||||
+ if (!status)
|
||||
+ connect_time = reply->connect_time / -10000000;
|
||||
+ }
|
||||
+ SERVER_END_REQ;
|
||||
+ return connect_time;
|
||||
+}
|
||||
+
|
||||
static void _get_sock_errors(SOCKET s, int *events)
|
||||
{
|
||||
SERVER_START_REQ( get_socket_event )
|
||||
@@ -2626,7 +2641,6 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
|
||||
|
||||
case WS_SO_CONNECT_TIME:
|
||||
{
|
||||
- static int pretendtime = 0;
|
||||
struct WS_sockaddr addr;
|
||||
int len = sizeof(addr);
|
||||
|
||||
@@ -2638,10 +2652,7 @@ INT WINAPI WS_getsockopt(SOCKET s, INT level,
|
||||
if (WS_getpeername(s, &addr, &len) == SOCKET_ERROR)
|
||||
*(DWORD *)optval = ~0u;
|
||||
else
|
||||
- {
|
||||
- if (!pretendtime) FIXME("WS_SO_CONNECT_TIME - faking results\n");
|
||||
- *(DWORD *)optval = pretendtime++;
|
||||
- }
|
||||
+ *(DWORD *)optval = _get_connect_time(s);
|
||||
*optlen = sizeof(DWORD);
|
||||
return ret;
|
||||
}
|
||||
diff --git a/dlls/ws2_32/tests/sock.c b/dlls/ws2_32/tests/sock.c
|
||||
index c0b1abcaaa5..b94da0809b8 100644
|
||||
--- a/dlls/ws2_32/tests/sock.c
|
||||
+++ b/dlls/ws2_32/tests/sock.c
|
||||
@@ -4333,11 +4333,15 @@ static void test_send(void)
|
||||
OVERLAPPED ov;
|
||||
BOOL bret;
|
||||
DWORD id, bytes_sent, dwRet;
|
||||
+ DWORD expected_time, connect_time;
|
||||
+ socklen_t optlen;
|
||||
|
||||
memset(&ov, 0, sizeof(ov));
|
||||
|
||||
tcp_socketpair(&src, &dst);
|
||||
|
||||
+ expected_time = GetTickCount();
|
||||
+
|
||||
set_blocking(dst, FALSE);
|
||||
/* force disable buffering so we can get a pending overlapped request */
|
||||
ret = setsockopt(dst, SOL_SOCKET, SO_SNDBUF, (char *) &zero, sizeof(zero));
|
||||
@@ -4410,6 +4414,22 @@ static void test_send(void)
|
||||
ok(ret == SOCKET_ERROR && WSAGetLastError() == ERROR_IO_PENDING,
|
||||
"Failed to start overlapped send %d - %d\n", ret, WSAGetLastError());
|
||||
|
||||
+ expected_time = (GetTickCount() - expected_time) / 1000;
|
||||
+
|
||||
+ connect_time = 0xdeadbeef;
|
||||
+ optlen = sizeof(connect_time);
|
||||
+ ret = getsockopt(dst, SOL_SOCKET, SO_CONNECT_TIME, (char *)&connect_time, &optlen);
|
||||
+ ok(!ret, "getsockopt failed %d\n", WSAGetLastError());
|
||||
+ ok(connect_time >= expected_time && connect_time <= expected_time + 1,
|
||||
+ "unexpected connect time %u, expected %u\n", connect_time, expected_time);
|
||||
+
|
||||
+ connect_time = 0xdeadbeef;
|
||||
+ optlen = sizeof(connect_time);
|
||||
+ ret = getsockopt(src, SOL_SOCKET, SO_CONNECT_TIME, (char *)&connect_time, &optlen);
|
||||
+ ok(!ret, "getsockopt failed %d\n", WSAGetLastError());
|
||||
+ ok(connect_time >= expected_time && connect_time <= expected_time + 1,
|
||||
+ "unexpected connect time %u, expected %u\n", connect_time, expected_time);
|
||||
+
|
||||
end:
|
||||
if (src != INVALID_SOCKET)
|
||||
closesocket(src);
|
||||
diff --git a/server/protocol.def b/server/protocol.def
|
||||
index 98d30ffc4be..e83e78006dd 100644
|
||||
--- a/server/protocol.def
|
||||
+++ b/server/protocol.def
|
||||
@@ -1455,6 +1455,7 @@ enum server_fd_type
|
||||
int family; /* family, see socket manpage */
|
||||
int type; /* type, see socket manpage */
|
||||
int protocol; /* protocol, see socket manpage */
|
||||
+ timeout_t connect_time; /* time the socket was connected (relative) */
|
||||
@END
|
||||
|
||||
|
||||
diff --git a/server/sock.c b/server/sock.c
|
||||
index cf0ba068674..a828af2ec7d 100644
|
||||
--- a/server/sock.c
|
||||
+++ b/server/sock.c
|
||||
@@ -2411,6 +2411,7 @@ DECL_HANDLER(get_socket_info)
|
||||
reply->family = sock->family;
|
||||
reply->type = sock->type;
|
||||
reply->protocol = sock->proto;
|
||||
+ reply->connect_time = -(current_time - sock->connect_time);
|
||||
|
||||
release_object( &sock->obj );
|
||||
}
|
||||
--
|
||||
2.30.2
|
||||
|
@ -1,2 +0,0 @@
|
||||
Fixes: SO_CONNECT_TIME returns the appropriate time
|
||||
Disabled: True
|
@ -1 +1 @@
|
||||
60a3e0106246cb91d598a815d4fadf2791011142
|
||||
17ba916c564236c9940ad736ff15a87fc5d1b12f
|
||||
|
Loading…
Reference in New Issue
Block a user