Module: website
Branch: master
Commit: f1a7cc8f5d84a2dac60bb10781b64830b9f39812
URL: https://source.winehq.org/git/website.git/?a=commit;h=f1a7cc8f5d84a2dac60bb…
Author: Alexandre Julliard <julliard(a)winehq.org>
Date: Fri May 22 20:51:25 2020 +0200
Wine release 5.9
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
news/en/2020052201.xml | 16 ++++++++++++++++
1 file changed, 16 insertions(+)
diff --git a/news/en/2020052201.xml b/news/en/2020052201.xml
new file mode 100644
index 00000000..3ad9bf0a
--- /dev/null
+++ b/news/en/2020052201.xml
@@ -0,0 +1,16 @@
+<news>
+<date>May 22, 2020</date>
+<title>Wine 5.9 Released</title>
+<body>
+<p> The Wine development release 5.9 is now available.</p>
+<p> <a href="{$root}/announce/5.9">What's new</a> in this release:
+<ul>
+ <li>Major progress on the WineD3D Vulkan backend.</li>
+ <li>Initial support for splitting dlls into PE and Unix parts.</li>
+ <li>Support for generating PDB files when building PE dlls.</li>
+ <li>Timestamp updates in the Kernel User Shared Data.</li>
+ <li>Various bug fixes.</li>
+</ul>
+<p>The source is <a href="//dl.winehq.org/wine/source/5.x/wine-5.9.tar.xz">available now</a>.
+Binary packages are in the process of being built, and will appear soon at their respective <a href="{$root}/download">download locations</a>.
+</p></body></news>
Module: wine
Branch: master
Commit: d9855df17f905da97b4bd92227427c4f899babf1
URL: https://source.winehq.org/git/wine.git/?a=commit;h=d9855df17f905da97b4bd922…
Author: Markus Engel <markus_wine(a)familie-engel.online>
Date: Mon May 18 18:35:58 2020 +0200
user32: Force undefined bits in GetKeyState() and GetKeyboardState() to zero.
Only the highest and lowest bits in the return values of these functions
have a meaning, the others are undefined. While the other bits are
always cleared in Windows, wine stores information there. Some programs
expect these undefined bits to be zero, though, so make sure they are
not set.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=30814
Signed-off-by: Markus Engel <markus_wine(a)familie-engel.online>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/user32/input.c | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/dlls/user32/input.c b/dlls/user32/input.c
index b7cdbd84ef..2f8648f177 100644
--- a/dlls/user32/input.c
+++ b/dlls/user32/input.c
@@ -555,7 +555,7 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetKeyState(INT vkey)
{
req->tid = GetCurrentThreadId();
req->key = vkey;
- if (!wine_server_call( req )) retval = (signed char)reply->state;
+ if (!wine_server_call( req )) retval = (signed char)(reply->state & 0x81);
}
SERVER_END_REQ;
TRACE("key (0x%x) -> %x\n", vkey, retval);
@@ -569,6 +569,7 @@ SHORT WINAPI DECLSPEC_HOTPATCH GetKeyState(INT vkey)
BOOL WINAPI DECLSPEC_HOTPATCH GetKeyboardState( LPBYTE state )
{
BOOL ret;
+ UINT i;
TRACE("(%p)\n", state);
@@ -579,6 +580,7 @@ BOOL WINAPI DECLSPEC_HOTPATCH GetKeyboardState( LPBYTE state )
req->key = -1;
wine_server_set_reply( req, state, 256 );
ret = !wine_server_call_err( req );
+ for (i = 0; i < 256; i++) state[i] &= 0x81;
}
SERVER_END_REQ;
return ret;
Module: wine
Branch: master
Commit: fff364274774fe51bdc8a0aee22369aac161dcb7
URL: https://source.winehq.org/git/wine.git/?a=commit;h=fff364274774fe51bdc8a0ae…
Author: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Date: Tue May 19 15:18:48 2020 +0300
winex11.drv: Fix X11DRV_X_to_window_rect to handle windows smaller than the decoration.
A window can be resized to a smaller size than the decoration (title +
borders), such as when it is minimized. In such cases it is necessary
to recompute the minimum bounds, as it is done in the opposite function
X11DRV_window_to_X_rect, since the real information was lost.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48490
Signed-off-by: Gabriel Ivăncescu <gabrielopcode(a)gmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winex11.drv/window.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
diff --git a/dlls/winex11.drv/window.c b/dlls/winex11.drv/window.c
index 595c54a7c0..a16b835424 100644
--- a/dlls/winex11.drv/window.c
+++ b/dlls/winex11.drv/window.c
@@ -1209,12 +1209,16 @@ static void X11DRV_window_to_X_rect( struct x11drv_win_data *data, RECT *rect,
*/
void X11DRV_X_to_window_rect( struct x11drv_win_data *data, RECT *rect, int x, int y, int cx, int cy )
{
- x += data->window_rect.left - data->whole_rect.left;
- y += data->window_rect.top - data->whole_rect.top;
- cx += (data->window_rect.right - data->window_rect.left) -
- (data->whole_rect.right - data->whole_rect.left);
- cy += (data->window_rect.bottom - data->window_rect.top) -
- (data->whole_rect.bottom - data->whole_rect.top);
+ RECT rc;
+
+ get_decoration_rect( data, &rc, &data->window_rect, &data->client_rect );
+
+ x += min( data->window_rect.left - data->whole_rect.left, rc.left );
+ y += min( data->window_rect.top - data->whole_rect.top, rc.top );
+ cx += max( (data->window_rect.right - data->window_rect.left) -
+ (data->whole_rect.right - data->whole_rect.left), rc.right - rc.left );
+ cy += max( (data->window_rect.bottom - data->window_rect.top) -
+ (data->whole_rect.bottom - data->whole_rect.top), rc.bottom - rc.top );
SetRect( rect, x, y, x + cx, y + cy );
}
Module: wine
Branch: master
Commit: 55ba3648379d90642f174e74809b84130d6d1ddc
URL: https://source.winehq.org/git/wine.git/?a=commit;h=55ba3648379d90642f174e74…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com>
Date: Mon May 18 21:04:58 2020 +0200
libwine: Add support for mmap at fixed start addresses on FreeBSD.
The way to implement MAP_TRYFIXED on FreeBSD is call mmap()
with MAP_FIXED | MAP_EXCL, which will allocate the mapping
from the exact starting address if possible, and if that fails,
call mmap() again without them. This gets PE DLLs loading at
their correct base addresses, and fixes a FreeBSD-specific
problem with Cygwin's fork() caused by cygwin1.dll loading at
different base addresses in the parent and child.
Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
libs/wine/mmap.c | 13 ++++++++-----
1 file changed, 8 insertions(+), 5 deletions(-)
diff --git a/libs/wine/mmap.c b/libs/wine/mmap.c
index f2b5adc1d2..0fbe2efea7 100644
--- a/libs/wine/mmap.c
+++ b/libs/wine/mmap.c
@@ -211,18 +211,21 @@ void *wine_anon_mmap( void *start, size_t size, int prot, int flags )
if (!(flags & MAP_FIXED))
{
-#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
- /* Even FreeBSD 5.3 does not properly support NULL here. */
- if( start == NULL ) start = (void *)0x110000;
-#endif
-
#ifdef MAP_TRYFIXED
/* If available, this will attempt a fixed mapping in-kernel */
flags |= MAP_TRYFIXED;
+#elif defined(__FreeBSD__) || defined(__FreeBSD_kernel__)
+ if ( start && mmap( start, size, prot, flags | MAP_FIXED | MAP_EXCL, get_fdzero(), 0 ) )
+ return start;
#elif defined(__svr4__) || defined(__NetBSD__) || defined(__APPLE__)
if ( try_mmap_fixed( start, size, prot, flags, get_fdzero(), 0 ) )
return start;
#endif
+
+#if defined(__FreeBSD__) || defined(__FreeBSD_kernel__) || defined(__DragonFly__)
+ /* Even FreeBSD 5.3 does not properly support NULL here. */
+ if( start == NULL ) start = (void *)0x110000;
+#endif
}
return mmap( start, size, prot, flags, get_fdzero(), 0 );
}
Module: wine
Branch: master
Commit: 5ab64243dafa23cd36ad02ec737fcad9a58a78e4
URL: https://source.winehq.org/git/wine.git/?a=commit;h=5ab64243dafa23cd36ad02ec…
Author: Jacek Caban <jacek(a)codeweavers.com>
Date: Wed May 20 17:54:21 2020 +0200
include: Add winapifamily.h file.
Signed-off-by: Jacek Caban <jacek(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
include/Makefile.in | 1 +
include/winapifamily.h | 62 ++++++++++++++++++++++++++++++++++++++++++++++++++
include/winnt.h | 1 +
3 files changed, 64 insertions(+)
diff --git a/include/Makefile.in b/include/Makefile.in
index 6aff236a7c..2f2d94d574 100644
--- a/include/Makefile.in
+++ b/include/Makefile.in
@@ -715,6 +715,7 @@ SOURCES = \
wia_xp.idl \
wiadef.h \
wimgapi.h \
+ winapifamily.h \
winbase.h \
wincodec.idl \
wincodecsdk.idl \
diff --git a/include/winapifamily.h b/include/winapifamily.h
new file mode 100644
index 0000000000..c1df2e1627
--- /dev/null
+++ b/include/winapifamily.h
@@ -0,0 +1,62 @@
+/*
+ * Copyright 2020 Jacek Caban for CodeWeavers
+ *
+ * This library is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU Lesser General Public
+ * License as published by the Free Software Foundation; either
+ * version 2.1 of the License, or (at your option) any later version.
+ *
+ * This library is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ * Lesser General Public License for more details.
+ *
+ * You should have received a copy of the GNU Lesser General Public
+ * License along with this library; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
+ */
+
+#ifndef _INC_WINAPIFAMILY
+#define _INC_WINAPIFAMILY
+
+#define WINAPI_FAMILY_PC_APP 2
+#define WINAPI_FAMILY_PHONE_APP 3
+#define WINAPI_FAMILY_SYSTEM 4
+#define WINAPI_FAMILY_SERVER 5
+#define WINAPI_FAMILY_DESKTOP_APP 100
+
+#define WINAPI_FAMILY_APP WINAPI_FAMILY_PC_APP
+
+#ifndef WINAPI_FAMILY
+#define WINAPI_FAMILY WINAPI_FAMILY_DESKTOP_APP
+#endif
+
+#ifndef WINAPI_PARTITION_DESKTOP
+#define WINAPI_PARTITION_DESKTOP (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP)
+#endif
+
+#ifndef WINAPI_PARTITION_APP
+#define WINAPI_PARTITION_APP (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP || \
+ WINAPI_FAMILY == WINAPI_FAMILY_PC_APP || \
+ WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+#endif
+
+#ifndef WINAPI_PARTITION_PC_APP
+#define WINAPI_PARTITION_PC_APP (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP || \
+ WINAPI_FAMILY == WINAPI_FAMILY_PC_APP)
+#endif
+
+#ifndef WINAPI_PARTITION_PHONE_APP
+#define WINAPI_PARTITION_PHONE_APP (WINAPI_FAMILY == WINAPI_FAMILY_PHONE_APP)
+#endif
+
+#ifndef WINAPI_PARTITION_SYSTEM
+#define WINAPI_PARTITION_SYSTEM (WINAPI_FAMILY == WINAPI_FAMILY_SYSTEM || \
+ WINAPI_FAMILY == WINAPI_FAMILY_SERVER)
+#endif
+
+#define WINAPI_PARTITION_PHONE WINAPI_PARTITION_PHONE_APP
+
+#define WINAPI_FAMILY_PARTITION(x) x
+
+#endif /* _INC_WINAPIFAMILY */
diff --git a/include/winnt.h b/include/winnt.h
index 46e17c546a..99c3793346 100644
--- a/include/winnt.h
+++ b/include/winnt.h
@@ -23,6 +23,7 @@
#include <basetsd.h>
#include <guiddef.h>
+#include <winapifamily.h>
#ifndef RC_INVOKED
#include <ctype.h>
Module: wine
Branch: master
Commit: a55320f00b7d2b69e709d45fdf6c2afde84d1b23
URL: https://source.winehq.org/git/wine.git/?a=commit;h=a55320f00b7d2b69e709d45f…
Author: Chip Davis <cdavis(a)codeweavers.com>
Date: Sun May 17 17:44:15 2020 -0500
winemac.drv: Use InitOnceExecuteOnce to initialize OpenGL.
Currently, there is a race condition where if two threads call into
OpenGL at the same time, one of them will initialize OpenGL, but the
other will barrel on ahead, thinking GL is already initialized, even
though the first thread hasn't finished initializing it yet. One of the
symptoms of this is that no pixel formats appear to be available,
because the first thread hasn't yet enumerated the available pixel
formats.
Signed-off-by: Chip Davis <cdavis(a)codeweavers.com>
Signed-off-by: Ken Thomases <ken(a)codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/winemac.drv/opengl.c | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/dlls/winemac.drv/opengl.c b/dlls/winemac.drv/opengl.c
index b80c8fffb0..b66af0f1c4 100644
--- a/dlls/winemac.drv/opengl.c
+++ b/dlls/winemac.drv/opengl.c
@@ -4242,7 +4242,7 @@ static void load_extensions(void)
}
-static BOOL init_opengl(void)
+static BOOL CALLBACK init_opengl(INIT_ONCE *init_once, void *context, void **param)
{
static BOOL init_done = FALSE;
unsigned int i;
@@ -4654,13 +4654,15 @@ static struct opengl_funcs opengl_funcs =
*/
struct opengl_funcs * CDECL macdrv_wine_get_wgl_driver(PHYSDEV dev, UINT version)
{
+ static INIT_ONCE opengl_init = INIT_ONCE_STATIC_INIT;
+
if (version != WINE_WGL_DRIVER_VERSION)
{
ERR("version mismatch, opengl32 wants %u but macdrv has %u\n", version, WINE_WGL_DRIVER_VERSION);
return NULL;
}
- if (!init_opengl()) return (void *)-1;
+ if (!InitOnceExecuteOnce(&opengl_init, init_opengl, NULL, NULL)) return (void *)-1;
return &opengl_funcs;
}
Module: wine
Branch: master
Commit: 93082b3d52b4b2489e75be80347a0ea2a0ddb607
URL: https://source.winehq.org/git/wine.git/?a=commit;h=93082b3d52b4b2489e75be80…
Author: Martin Storsjo <martin(a)martin.st>
Date: Mon May 18 15:16:27 2020 +0300
ntdll: Fix arm64 unwind across ELF/PE boundaries.
The previous implementation might have given the impression of
working, as long in some cases where the PE code actually used frame
pointers, but turned out to be subly wrong.
This essentially reverts the functional aspects of 1c9fdaab0f4.
Use the new value of the Lr register, after fetching the registers
from unw_step, as the return value.
To make single-stepping unwinding work properly, treat the registers
consistently:
- Make RtlCaptureContext store the current values of x29/Fp and x30/Lr
from within the function, not the ones backed up from the stack.
- After unwinding one step, first fetch the new values of all registers,
including the new value of Lr - then use this value of Lr to set the
new value of Pc (the address to actually return to).
This makes the unwinding actually coherent in reading unwind opcodes and
return addresses from one single function; previously these were out of
sync where the return address ended up being read from the function
one step further up in the call stack.
This fixes unwinding for setjmp for binaries compiled with clang
(in mingw mode).
Signed-off-by: Martin Storsjo <martin(a)martin.st>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/ntdll/signal_arm64.c | 5 ++---
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git a/dlls/ntdll/signal_arm64.c b/dlls/ntdll/signal_arm64.c
index 9f84d3fbfd..30d445b408 100644
--- a/dlls/ntdll/signal_arm64.c
+++ b/dlls/ntdll/signal_arm64.c
@@ -265,8 +265,7 @@ __ASM_STDCALL_FUNC( RtlCaptureContext, 8,
"stp x23, x24, [x0, #0xc0]\n\t" /* context->X23,X24 */
"stp x25, x26, [x0, #0xd0]\n\t" /* context->X25,X26 */
"stp x27, x28, [x0, #0xe0]\n\t" /* context->X27,X28 */
- "ldp x1, x2, [x29]\n\t"
- "stp x1, x2, [x0, #0xf0]\n\t" /* context->Fp,Lr */
+ "stp x29, x30, [x0, #0xf0]\n\t" /* context->Fp,Lr */
"add x1, x29, #0x10\n\t"
"stp x1, x30, [x0, #0x100]\n\t" /* context->Sp,Pc */
"mov w1, #0x400000\n\t" /* CONTEXT_ARM64 */
@@ -545,7 +544,6 @@ static NTSTATUS libunwind_virtual_unwind( ULONG_PTR ip, ULONG_PTR *frame, CONTEX
*handler = (void *)info.handler;
*handler_data = (void *)info.lsda;
*frame = context->Sp;
- context->Pc = context->u.s.Lr;
unw_get_reg( &cursor, UNW_AARCH64_X0, (unw_word_t *)&context->u.s.X0 );
unw_get_reg( &cursor, UNW_AARCH64_X1, (unw_word_t *)&context->u.s.X1 );
unw_get_reg( &cursor, UNW_AARCH64_X2, (unw_word_t *)&context->u.s.X2 );
@@ -578,6 +576,7 @@ static NTSTATUS libunwind_virtual_unwind( ULONG_PTR ip, ULONG_PTR *frame, CONTEX
unw_get_reg( &cursor, UNW_AARCH64_X29, (unw_word_t *)&context->u.s.Fp );
unw_get_reg( &cursor, UNW_AARCH64_X30, (unw_word_t *)&context->u.s.Lr );
unw_get_reg( &cursor, UNW_AARCH64_SP, (unw_word_t *)&context->Sp );
+ context->Pc = context->u.s.Lr;
TRACE( "next function pc=%016lx%s\n", context->Pc, rc ? "" : " (last frame)" );
TRACE(" x0=%016lx x1=%016lx x2=%016lx x3=%016lx\n",
Module: wine
Branch: master
Commit: 0fd3f0266e05f6afa710fa2b5a254b0ed88bac0f
URL: https://source.winehq.org/git/wine.git/?a=commit;h=0fd3f0266e05f6afa710fa2b…
Author: Damjan Jovanovic <damjan.jov(a)gmail.com>
Date: Sun May 17 12:49:08 2020 +0200
ntdll: Fix ELF initializer address calculations on FreeBSD.
dlinfo() doesn't conform to a standard, each platform implements in differently,
if at all. On GNU and NetBSD its l_addr field returned is the "relocbase",
the relative offset between addresses wanted by the file and addresses obtained
in memory (==0 when no relocation occurred), which we add to d_un.d_ptr to
obtain the memory address where the initializer is. On FreeBSD (and possibly
Solaris) this won't work, as l_addr is the "mapbase" instead, the absolute
starting memory address where the binary was loaded, resulting in wrong
calculations and crashes on startup as we call into wrong addresses.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=49139
Signed-off-by: Damjan Jovanovic <damjan.jov(a)gmail.com>
Signed-off-by: Alexandre Julliard <julliard(a)winehq.org>
---
dlls/ntdll/loader.c | 40 ++++++++++++++++++++++++++++++++++++----
1 file changed, 36 insertions(+), 4 deletions(-)
diff --git a/dlls/ntdll/loader.c b/dlls/ntdll/loader.c
index fa65ae1e9f..cdb25fc78c 100644
--- a/dlls/ntdll/loader.c
+++ b/dlls/ntdll/loader.c
@@ -1317,6 +1317,35 @@ static void call_tls_callbacks( HMODULE module, UINT reason )
}
}
+#ifdef __FreeBSD__
+/* The PT_LOAD segments are sorted in increasing order, and the first
+ * starts at the beginning of the ELF file. By parsing the file, we can
+ * find that first PT_LOAD segment, from which we can find the base
+ * address it wanted, and knowing mapbase where the binary was actually
+ * loaded, use them to work out the relocbase offset. */
+static BOOL get_relocbase(caddr_t mapbase, caddr_t *relocbase)
+{
+ Elf_Half i;
+#ifdef _WIN64
+ const Elf64_Ehdr *elf_header = (Elf64_Ehdr*) mapbase;
+#else
+ const Elf32_Ehdr *elf_header = (Elf32_Ehdr*) mapbase;
+#endif
+ const Elf_Phdr *prog_header = (const Elf_Phdr *)(mapbase + elf_header->e_phoff);
+
+ for (i = 0; i < elf_header->e_phnum; i++)
+ {
+ if (prog_header->p_type == PT_LOAD)
+ {
+ caddr_t desired_base = (caddr_t)((prog_header->p_vaddr / prog_header->p_align) * prog_header->p_align);
+ *relocbase = (caddr_t) (mapbase - desired_base);
+ return TRUE;
+ }
+ prog_header++;
+ }
+ return FALSE;
+}
+#endif
/*************************************************************************
* call_constructors
@@ -1339,14 +1368,17 @@ static void call_constructors( WINE_MODREF *wm )
if (dlinfo( wm->so_handle, RTLD_DI_LINKMAP, &map ) == -1) return;
for (dyn = map->l_ld; dyn->d_tag; dyn++)
{
-#define GET_PTR(base,ptr) ((ptr) > (base) ? (ptr) : (base) + (ptr))
+ caddr_t relocbase = (caddr_t)map->l_addr;
+
+#ifdef __FreeBSD__ /* FreeBSD doesn't relocate l_addr */
+ if (!get_relocbase(map->l_addr, &relocbase)) return;
+#endif
switch (dyn->d_tag)
{
- case 0x60009990: init_array = (void *)GET_PTR( map->l_addr, dyn->d_un.d_ptr ); break;
+ case 0x60009990: init_array = (void *)(relocbase + dyn->d_un.d_val); break;
case 0x60009991: init_arraysz = dyn->d_un.d_val; break;
- case 0x60009992: init_func = (void *)GET_PTR( map->l_addr, dyn->d_un.d_ptr ); break;
+ case 0x60009992: init_func = (void *)(relocbase + dyn->d_un.d_val); break;
}
-#undef GET_PTR
}
TRACE( "%s: got init_func %p init_array %p %lu\n", debugstr_us( &wm->ldr.BaseDllName ),