Rebase against 002af352fac43d170aad216bf15098b27555539a.

This commit is contained in:
Sebastian Lackner 2016-08-30 20:44:42 +02:00
parent 39c7e02819
commit 8ca9f08b92
3 changed files with 5 additions and 92 deletions

View File

@ -1,85 +0,0 @@
From c3170561ea6c0de42ae71925e31e08941e1b96dc Mon Sep 17 00:00:00 2001
From: Sebastian Lackner <sebastian@fds-team.de>
Date: Sun, 31 Jul 2016 00:03:02 +0200
Subject: server: Workaround duplicate condition warning of GCC 6.
---
server/request.c | 13 ++++++++++---
server/sock.c | 9 ++++++++-
2 files changed, 18 insertions(+), 4 deletions(-)
diff --git a/server/request.c b/server/request.c
index 597bf88..483884b 100644
--- a/server/request.c
+++ b/server/request.c
@@ -220,6 +220,13 @@ const void *get_req_data_after_objattr( const struct object_attributes *attr, da
return ptr;
}
+static inline int should_retry( int err )
+{
+ if (err == EWOULDBLOCK) return 1;
+ if (err == EAGAIN) return 1;
+ return 0;
+}
+
/* write the remaining part of the reply */
void write_reply( struct thread *thread )
{
@@ -241,7 +248,7 @@ void write_reply( struct thread *thread )
}
if (errno == EPIPE)
kill_thread( thread, 0 ); /* normal death */
- else if (errno != EWOULDBLOCK && errno != EAGAIN)
+ else if (!should_retry( errno ))
fatal_protocol_error( thread, "reply write: %s\n", strerror( errno ));
}
@@ -368,7 +375,7 @@ error:
kill_thread( thread, 0 );
else if (ret > 0)
fatal_protocol_error( thread, "partial read %d\n", ret );
- else if (errno != EWOULDBLOCK && errno != EAGAIN)
+ else if (!should_retry( errno ))
fatal_protocol_error( thread, "read: %s\n", strerror( errno ));
}
@@ -449,7 +456,7 @@ int receive_fd( struct process *process )
}
else
{
- if (errno != EWOULDBLOCK && errno != EAGAIN)
+ if (!should_retry( errno ))
{
fprintf( stderr, "Protocol error: process %04x: ", process->id );
perror( "recvmsg" );
diff --git a/server/sock.c b/server/sock.c
index dc10d2a..4f76163 100644
--- a/server/sock.c
+++ b/server/sock.c
@@ -1065,6 +1065,13 @@ static void ifchange_wake_up( struct object *obj, unsigned int status )
}
}
+static inline int should_retry( int err )
+{
+ if (err == EWOULDBLOCK) return 1;
+ if (err == EAGAIN) return 1;
+ return 0;
+}
+
static void ifchange_poll_event( struct fd *fd, int event )
{
struct object *ifchange = get_fd_user( fd );
@@ -1075,7 +1082,7 @@ static void ifchange_poll_event( struct fd *fd, int event )
r = recv( get_unix_fd(fd), buffer, sizeof(buffer), MSG_DONTWAIT );
if (r < 0)
{
- if (errno == EWOULDBLOCK || errno == EAGAIN)
+ if (should_retry( errno ))
return; /* retry when poll() says the socket is ready */
status = sock_get_ntstatus( errno );
}
--
2.9.0

View File

@ -52,7 +52,7 @@ usage()
# Get the upstream commit sha
upstream_commit()
{
echo "d3cb5c24a5ebbc7dcfb181a56f0f55cf3d1a1c30"
echo "002af352fac43d170aad216bf15098b27555539a"
}
# Show version information
@ -2347,11 +2347,10 @@ fi
# | dlls/d3d9/tests/visual.c, dlls/d3d9/texture.c, dlls/ddraw/viewport.c, dlls/dsound/primary.c, dlls/dwrite/layout.c,
# | dlls/msxml3/schema.c, dlls/netapi32/netapi32.c, dlls/oleaut32/oleaut.c, dlls/rpcrt4/cstub.c, dlls/vbscript/vbdisp.c,
# | dlls/winealsa.drv/mmdevdrv.c, dlls/wined3d/glsl_shader.c, include/d3dtypes.h, include/wine/list.h,
# | include/wine/rbtree.h, include/winnt.h, server/request.c, server/sock.c, tools/makedep.c
# | include/wine/rbtree.h, include/winnt.h, tools/makedep.c
# |
if test "$enable_Compiler_Warnings" -eq 1; then
patch_apply Compiler_Warnings/0015-include-Avoid-shift-overflow-warning.patch
patch_apply Compiler_Warnings/0017-server-Workaround-duplicate-condition-warning-of-GCC.patch
patch_apply Compiler_Warnings/0018-Appease-the-blessed-version-of-gcc-4.5-when-Werror-i.patch
patch_apply Compiler_Warnings/0019-dsound-Avoid-implicit-cast-of-interface-pointer.patch
patch_apply Compiler_Warnings/0020-amstream-Avoid-implicit-cast-of-interface-pointer.patch
@ -2368,7 +2367,6 @@ if test "$enable_Compiler_Warnings" -eq 1; then
patch_apply Compiler_Warnings/0031-include-Check-element-type-in-CONTAINING_RECORD-and-.patch
(
echo '+ { "Sebastian Lackner", "include: Avoid shift overflow warning.", 1 },';
echo '+ { "Sebastian Lackner", "server: Workaround duplicate condition warning of GCC 6.", 1 },';
echo '+ { "Erich E. Hoover", "Appease the blessed version of gcc (4.5) when -Werror is enabled.", 1 },';
echo '+ { "Sebastian Lackner", "dsound: Avoid implicit cast of interface pointer.", 1 },';
echo '+ { "Sebastian Lackner", "amstream: Avoid implicit cast of interface pointer.", 1 },';

View File

@ -1,4 +1,4 @@
From b8426b424f9ed456f29189459f27ab51b1a9bd7c Mon Sep 17 00:00:00 2001
From bfbda74851ae4de3b0b185862af566005b477930 Mon Sep 17 00:00:00 2001
From: Felix Yan <felixonmars@gmail.com>
Date: Tue, 23 Sep 2014 23:22:17 +0800
Subject: winex11.drv: Update a candidate window's position with over-the-spot
@ -120,7 +120,7 @@ index 68aa699..cba4aa9 100644
void (CDECL *pThreadDetach)(void);
} USER_DRIVER;
diff --git a/dlls/winex11.drv/winex11.drv.spec b/dlls/winex11.drv/winex11.drv.spec
index 7cdce52..167ecb2 100644
index ceb0f56..5552bdb 100644
--- a/dlls/winex11.drv/winex11.drv.spec
+++ b/dlls/winex11.drv/winex11.drv.spec
@@ -53,6 +53,7 @@
@ -128,9 +128,9 @@ index 7cdce52..167ecb2 100644
@ cdecl WindowPosChanged(long long long ptr ptr ptr ptr ptr) X11DRV_WindowPosChanged
@ cdecl SystemParametersInfo(long long ptr long) X11DRV_SystemParametersInfo
+@ cdecl UpdateCandidatePos(long ptr) X11DRV_UpdateCandidatePos
@ cdecl ThreadDetach() X11DRV_ThreadDetach
# WinTab32
@ cdecl AttachEventQueueToTablet(long) X11DRV_AttachEventQueueToTablet
diff --git a/dlls/winex11.drv/xim.c b/dlls/winex11.drv/xim.c
index e51169d..069115d 100644
--- a/dlls/winex11.drv/xim.c