Second version of !33, taking Zeb's suggestions.
The refactoring allowed to encompass all remaining features of the patch series in these 4 patches.
The remaining patches (PART 3/3) just contain additional tests:
https://gitlab.winehq.org/fcasas/vkd3d/-/commits/complex_broadcasts_4/
--
v2: vkd3d-shader/hlsl: Support explicit cast between component-wise compatible types.
vkd3d-shader/hlsl: Support implicit casts between component-wise equal types.
vkd3d-shader/hlsl: Remove incorrect criteria for accepting implicit casts.
vkd3d-shader/hlsl: Handle complex types in add_cast().
tests: Add additional tests for implicit casts that should fail.
vkd3d-shader/hlsl: Rename "t1" and "t2" arguments as "src" and "dst".
https://gitlab.winehq.org/wine/vkd3d/-/merge_requests/35
Also unifies hidden file handling.
Fixes bug [53826](https://bugs.winehq.org/show_bug.cgi?id=53826).
--
v3: ntdll: Ensure that attributes are kept the same when renaming a file.
ntdll: Set xattr in NtCreateFile if inferred and requested attributes don't match.
ntdll: Only infer hidden attribute from file name if xattr is not present.
ntdll: Consistently handle dot files in file functions.
ntdll: Do not open-code hidden file handling in get_dir_data_entry.
ntdll/tests: Add test for file attributes of files with names beginning with a dot.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1148
This series is mainly a change in internal structures for
describing functions:
- symt_function doesn't support multi range of addresses
- while symt_inlinesite does
That's the major difference between the two.
So the aim of this serie is to decribe function and inline sites with
a single structure.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1161
--
v2: comctl32: Add support for specyfying extra data in CreatePropertySheetPage.
comctl32: Fix PROPSHEETPAGE[AW] structure content in messages and callbacks.
comctl32: Don't use PROPSHEETPAGE structure to store internal HPROPSHEETPAGE data.
comctl32: Create page if PROPSHEETPAGE was passed as HPROPSHEETPAGE to PropertySheetAW or PSM_INSERTPAGE.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1122
On Tue Oct 25 00:23:21 2022 +0000, Jinoh Kang wrote:
> > I haven't seen any software that uses this, but some older software
> out there might use it, so it's good idea to export it.
> In this case especially, I suggest you to add tests that exercise the
> newly exercised variable. Otherwise there's no way to verify if the
> type definition or the value is correct. It also becomes a maintenance
> burden with no clear benefit if no apps indeed use it.
will add some tests
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1139#note_11982
This is wine-7.0.1-rc1, so not ready yet to merge.
--
v3: Release 7.0.1.
gitlab: Import the gitlab CI from the master branch (devel tree)
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/955
This is wine-7.0.1-rc1, so not ready yet to merge.
--
v2: Release 7.0.1.
gitlab: Import the gitlab CI from the master branch (devel tree)
light.msstyles: Add Menu parts.
uxtheme: Support parsing menu class.
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/955
Overwatch 2 doesn't like the win32u `-syscall` conversion that happened a while back, because it hooks KiUserCallbackDispatcher. This MR fixes it up to match what Overwatch 2 expects.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1152
> I haven't seen any software that uses this, but some older software out there might use it, so it's good idea to export it.
In this case especially, I suggest you to add tests that exercise the newly exercised variable. Otherwise there's no way to verify if the type definition or the value is correct. It also becomes a maintenance burden with no clear benefit if no apps indeed use it.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1139#note_11910
This should move all of the remaining interfaces out of basedoc, except for IDispatchEx (and some fields will still remain); those will be for next MR.
Because all of the remaining interfaces are in the `htmldoc.c` file, and they typically tend to just forward to the HTMLDocumentNode, I'm using some macros inspired by the HTMLWINDOW7_ONEVENT_PROPERTY_\* in `htmlwindow.c` to reduce duplication. The ones that are exceptions are implemented normally without macros.
The first commit converts all of the non-IHTMLDocument\* interfaces because most of the methods are FIXMEs/unimplemented, so splitting it up isn't worth it.
--
v4: mshtml: Move the IHTMLDocument7 interface out of basedoc.
mshtml: Move the IHTMLDocument6 interface out of basedoc.
mshtml: Move the IHTMLDocument5 interface out of basedoc.
mshtml: Move the IHTMLDocument4 interface out of basedoc.
mshtml: Move the IHTMLDocument3 interface out of basedoc.
mshtml: Move the IHTMLDocument2 interface out of basedoc.
mshtml: Move the remaining non-IHTMLDocument* interfaces out of basedoc.
mshtml: Move HTMLDocumentObj implementation to oleobj.c.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1125
On Thu Oct 20 10:02:00 2022 +0000, **** wrote:
> Marvin replied on the mailing list:
> ```
> Hi,
> It looks like your patch introduced the new failures shown below.
> Please investigate and fix them before resubmitting your patch.
> If they are not new, fixing them anyway would help a lot. Otherwise
> please ask for the known failures list to be updated.
> The full results can be found at:
> https://testbot.winehq.org/JobDetails.pl?Key=125183
> Your paranoid android.
> === debian11 (build log) ===
> Task: Could not create the win32 wineprefix: Failed to disable the crash
> dialogs:
> Task: WineTest did not produce the win32 report
> ```
Why was this merge request accepted when it clearly breaks the creation of 32-bit wineprefixes?
The consequence was predictable, we've lost the 32-bit Wine test results ever since:
https://test.winehq.org/data/patterns-tb-wine.html
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1089#note_11891
This should move all of the remaining interfaces out of basedoc, except for IDispatchEx (and some fields will still remain); those will be for next MR.
Because all of the remaining interfaces are in the `htmldoc.c` file, and they typically tend to just forward to the HTMLDocumentNode, I'm using some macros inspired by the HTMLWINDOW7_ONEVENT_PROPERTY_\* in `htmlwindow.c` to reduce duplication. The ones that are exceptions are implemented normally without macros.
The first commit converts all of the non-IHTMLDocument\* interfaces because most of the methods are FIXMEs/unimplemented, so splitting it up isn't worth it.
--
v3: mshtml: Move the IHTMLDocument7 interface out of basedoc.
mshtml: Move the IHTMLDocument6 interface out of basedoc.
mshtml: Move the IHTMLDocument5 interface out of basedoc.
mshtml: Move the IHTMLDocument4 interface out of basedoc.
mshtml: Move the IHTMLDocument3 interface out of basedoc.
mshtml: Move the IHTMLDocument2 interface out of basedoc.
mshtml: Move the remaining non-IHTMLDocument* interfaces out of basedoc.
mshtml: Move HTMLDocumentObj implementation to oleobj.c.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1125
This is wine-7.0.1-rc1, so not ready yet to merge.
--
This merge request has too many patches to be relayed via email.
Please visit the URL below to see the contents of the merge request.
https://gitlab.winehq.org/wine/wine/-/merge_requests/955
The whole joystick list is refreshed anyway, so probably no reason to track the delay per joystick.
Fixes FPS drops happening each 2-3 seconds in Super House of Dead Ninjas. The game normally calls joyGetPosEx() for joystick 0 only, but once per second it scans all the 16 possible joysticks and for 15 of those joyGetPosEx() results in lengthy joystick list refresh, causing FPS drop in this otherwise not demanding game.
--
v2: winmm: Use a global timeout for refreshing joystick devices.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1142
I was really confused about whether strdupW or wcsdup is preferred in shell32. Since strdupW is deprecated, let's just get rid of it so that no one else has to wonder.
--
v2: shell32: Remove unused function strdupW.
shell32: Don't use strdupW or heap_* functions in shelllink.c.
shell32: Don't use strdupW or heap_* functions in shelldispatch.c.
shell32: Don't use strdupW or heap_* functions in shellole.c.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1103
Interpreting the fist two bytes of the `sockaddr` struct as `sa_family`
produces incorrect behaviour on macOS and (presumbly) BSD.
This change uses both Unix and Windows socket headers to convert the libpcap provided sockaddr before duplicating it.
This fixes sockaddr being always NULL on macOS/BSD and ipv6 addresses not working in general since `AF_INET6` differs on Windows(23), macOS(30) and Linux(10)
For reference https://www.ibm.com/docs/en/i/7.3?topic=family-af-inet-address and this is from the <sys/socket.h> on macOS
```
/*
* [XSI] Structure used by kernel to store most addresses.
*/
struct sockaddr {
__uint8_t sa_len; /* total length */
sa_family_t sa_family; /* [XSI] address family */
char sa_data[14]; /* [XSI] addr value (actually larger) */
};
```
--
v5: wpcap: Convert unix sockaddr to win32 sockaddr
https://gitlab.winehq.org/wine/wine/-/merge_requests/1015
This fixes data race in ARM/ARM64 platforms, and prevents potential
memory access reordering by the compiler.
--
v3: gdiplus: Replace GpImage's busy flag with SRWLOCK.
gdiplus: Avoid copying GpImage's busy flag in select_frame_wic().
gdiplus: Avoid recursively locking image in GdipImageRotateFlip.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1003
This change has been in Proton to fix a bug in the DayZ launcher.
The launcher is a .NET application that, best I can tell, contains marshaling code that calls SetWindowPlacement incorrectly. This results in undefined memory being passed in and broken values returned by GetWindowPlacement. I think the value passed in must be broken on Windows, but as the tests show, Windows rejects SetWindowPlacement calls that don't have length set correctly (but not GetWindowPlacement, as zeroing the structure to give it an invalid length in `other_process_proc` shows).
--
v2: win32u: Reject invalid length in SetWindowPlacement.
user32: Test Get/SetWindowPlacement with invalid length.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1081
On Fri Oct 21 13:37:13 2022 +0000, Bartosz Kosiorek wrote:
> changed this line in [version 14 of the diff](/wine/wine/-/merge_requests/1120/diffs?diff_id=14967&start_sha=1fe0022187d425723510d747a81973ae0a57dd29#5cc40c9a9717f9205417155123fc4bce95d55d9d_651_651)
I implemented it as you said:
```
if(_ismbblead_l(*str, locale) && (str[1] != '\n'))
return 2;
return 1;
```
But maybe se should compare it to zero:
```
if(_ismbblead_l(*str, locale) && (str[1] != 0))
return 2;
return 1;
```
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1120#note_11828
On Sat Oct 22 13:16:09 2022 +0000, Bartosz Kosiorek wrote:
> changed this line in [version 16 of the diff](/wine/wine/-/merge_requests/1120/diffs?diff_id=15105&start_sha=01947548572fd5e442ee7677a63d2ff3c0f166e2#18ec41aa1588580e1f59f4c1c498c00b98b78b89_1012_1012)
true, fixes.
Thanks!
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1120#note_11802
As far as my testing goes, the message box is never shown on Windows when abort() is called with retail runtime is used, regardless of error mode and abort behaviour. That is not the case with _assert which still can show a dialog even in release mode.
It happens rather often that an app meets the error condition during the process exit and that goes silent on Windows while we display the abort dialog on app's exit.
The test program below shows that (and the same behaviour is, e. g., with ucrtbase vs ucrtbased).
```
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
void CDECL _set_app_type(int app_type);
#define D(name) static typeof(name) *p_##name
#define L(name) p_##name = (void *)GetProcAddress(hdll, #name); if (!p_##name) printf("NULL %s.\n", #name)
D(abort);
D(_set_app_type);
D(_set_abort_behavior);
D(_set_error_mode);
int main(int argc, char *argv[])
{
HMODULE hdll = LoadLibraryA("msvcrt.dll");
printf("hdll %p.\n", hdll);
L(_set_app_type);
if (!p__set_app_type)
if (!(p__set_app_type = (void *)GetProcAddress(hdll, "__set_app_type")))
printf("NULL p__set_app_type.\n");
L(abort);
L(_set_abort_behavior);
L(_set_error_mode);
p__set_app_type(2);
if (p__set_abort_behavior)
p__set_abort_behavior(_WRITE_ABORT_MSG, _WRITE_ABORT_MSG);
p__set_error_mode(_OUT_TO_MSGBOX);
p_abort();
}
```
--
v3: msvcrt: Display message box in abort() for specific CRT versions only.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1128
--
v4: ntdll/tests: Add more tests for \Device\NamedPipe and \Device\NamedPipe\.
ntdll/tests: Add tests for pipe names.
kernel32/tests: Add test for pipe name with a trailing backslash.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1070
Chip Davis (@cdavis5e) commented about dlls/msvcrt/environ.c:
> /*********************************************************************
> * _wputenv_s (MSVCRT.@)
> */
> -int CDECL _wputenv_s(const wchar_t *name, const wchar_t *value)
> +errno_t CDECL _wputenv_s(const wchar_t *name, const wchar_t *value)
> {
> - int ret;
> + errno_t ret = 0;
>
> TRACE("%s %s\n", debugstr_w(name), debugstr_w(value));
>
> if (!MSVCRT_CHECK_PMT(name != NULL)) return -1;
> if (!MSVCRT_CHECK_PMT(value != NULL)) return -1;
I hate to be the bearer of bad news, since this was already merged, but it looks like you missed these two.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1135#note_11787
Interpreting the fist two bytes of the `sockaddr` struct as `sa_family`
produces incorrect behaviour on macOS and (presumbly) BSD.
This change uses both Unix and Windows socket headers to convert the libpcap provided sockaddr before duplicating it.
This fixes sockaddr being always NULL on macOS/BSD and ipv6 addresses not working in general since `AF_INET6` differs on Windows(23), macOS(30) and Linux(10)
For reference https://www.ibm.com/docs/en/i/7.3?topic=family-af-inet-address and this is from the <sys/socket.h> on macOS
```
/*
* [XSI] Structure used by kernel to store most addresses.
*/
struct sockaddr {
__uint8_t sa_len; /* total length */
sa_family_t sa_family; /* [XSI] address family */
char sa_data[14]; /* [XSI] addr value (actually larger) */
};
```
--
v4: wpcap: Convert unix sockaddr to win32 sockaddr
https://gitlab.winehq.org/wine/wine/-/merge_requests/1015
The whole joystick list is refreshed anyway, so probably no reason to track the delay per joystick.
Fixes FPS drops happening each 2-3 seconds in Super House of Dead Ninjas. The game normally calls joyGetPosEx() for joystick 0 only, but once per second it scans all the 16 possible joysticks and for 15 of those joyGetPosEx() results in lengthy joystick list refresh, causing FPS drop in this otherwise not demanding game.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1142
Interpreting the fist two bytes of the `sockaddr` struct as `sa_family`
produces incorrect behaviour on macOS and (presumbly) BSD.
This change is however still backwards compatible with Linux since
`sa_family` is of effective type `uint8_t` and `sa_len` is currently disregarded.
For reference https://www.ibm.com/docs/en/i/7.3?topic=family-af-inet-address and this is from the <sys/socket.h> on macOS
```
/*
* [XSI] Structure used by kernel to store most addresses.
*/
struct sockaddr {
__uint8_t sa_len; /* total length */
sa_family_t sa_family; /* [XSI] address family */
char sa_data[14]; /* [XSI] addr value (actually larger) */
};
```
--
v2: wpcap: Convert unix sockaddr to win32 sockaddr
wpcap: Use oblique struct for pcap sockaddr
https://gitlab.winehq.org/wine/wine/-/merge_requests/1015
On Fri Oct 21 23:19:45 2022 +0000, Hans Leidekker wrote:
> We should move conversion of the sockaddr structures to the Unix side.
> That way we can get the definitions from the Unix headers, though we
> still need to allocate memory for the structures on the PE side.
To leave the allocation on the PE side I left the sockaddr duplication more or less untouched and fix up the input address on the Unix side before.
I hope this is alright (seemed to work fine during testing at least)
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/1015#note_11774
I haven't seen any software that uses this, but some older software out there might use it, so it's good idea to export it.
--
v3: ntoskrnl.exe: add KeNumberProcessors export.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1139
I haven't seen any software that uses this, but some older software out there might use it, so it's good idea to export it.
--
v2: ntoskrnl.exe: add KeNumberProcessors export.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1139
This should move all of the remaining interfaces out of basedoc, except for IDispatchEx (and some fields will still remain); those will be for next MR.
Because all of the remaining interfaces are in the `htmldoc.c` file, and they typically tend to just forward to the HTMLDocumentNode, I'm using some macros inspired by the HTMLWINDOW7_ONEVENT_PROPERTY_\* in `htmlwindow.c` to reduce duplication. The ones that are exceptions are implemented normally without macros.
The first commit converts all of the non-IHTMLDocument\* interfaces because most of the methods are FIXMEs/unimplemented, so splitting it up isn't worth it.
--
v2: mshtml: Move the IHTMLDocument7 interface out of basedoc.
mshtml: Move the IHTMLDocument6 interface out of basedoc.
mshtml: Move the IHTMLDocument5 interface out of basedoc.
mshtml: Move the IHTMLDocument4 interface out of basedoc.
mshtml: Move the IHTMLDocument3 interface out of basedoc.
mshtml: Move the IHTMLDocument2 interface out of basedoc.
mshtml: Move the remaining non-IHTMLDocument* interfaces out of basedoc.
mshtml: Move HTMLDocumentObj implementation to oleobj.c.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1125
As far as my testing goes, the message box is never shown on Windows when abort() is called with retail runtime is used, regardless of error mode and abort behaviour. That is not the case with _assert which still can show a dialog even in release mode.
It happens rather often that an app meets the error condition during the process exit and that goes silent on Windows while we display the abort dialog on app's exit.
The test program below shows that (and the same behaviour is, e. g., with ucrtbase vs ucrtbased).
```
#include <windows.h>
#include <stdio.h>
#include <stdlib.h>
void CDECL _set_app_type(int app_type);
#define D(name) static typeof(name) *p_##name
#define L(name) p_##name = (void *)GetProcAddress(hdll, #name); if (!p_##name) printf("NULL %s.\n", #name)
D(abort);
D(_set_app_type);
D(_set_abort_behavior);
D(_set_error_mode);
int main(int argc, char *argv[])
{
HMODULE hdll = LoadLibraryA("msvcrt.dll");
printf("hdll %p.\n", hdll);
L(_set_app_type);
if (!p__set_app_type)
if (!(p__set_app_type = (void *)GetProcAddress(hdll, "__set_app_type")))
printf("NULL p__set_app_type.\n");
L(abort);
L(_set_abort_behavior);
L(_set_error_mode);
p__set_app_type(2);
if (p__set_abort_behavior)
p__set_abort_behavior(_WRITE_ABORT_MSG, _WRITE_ABORT_MSG);
p__set_error_mode(_OUT_TO_MSGBOX);
p_abort();
}
```
--
v2: msvcrt: Display message box in abort() for specific CRT versions only.
https://gitlab.winehq.org/wine/wine/-/merge_requests/1128
With this series it's now possible to run and pass `user32:monitor` and `user32:sysparams` tests with nulldrv, and so most `user32` tests (except for a few desktop cursor position tests). This still requires some prefix configuration to enable the nulldrv driver, or a change like https://gitlab.winehq.org/rbernon/wine/-/commit/753368ad0ec52f03f8d6e78ca79… to enable it when `DISPLAY` environment variable is unset.
This then shows that some of the user32 tests are failing with winex11 but passing with nulldrv, as in https://gitlab.winehq.org/rbernon/wine/-/commit/6d5f4109a514a0dc266899fcacf….
--
v11: win32u: Read mode from the registry if GetCurrentDisplaySettings fails.
win32u: Write display settings to the registry in apply_display_settings.
win32u: Lock display devices while applying display settings.
winemac.drv: Avoid calling back to win32u to find the primary adapter.
winex11.drv: Avoid calling back to win32u to find the primary adapter.
win32u: Add an is_primary parameter to ChangeDisplaySettings.
win32u: Force update display cache after NtUserChangeDisplaySettingsEx.
win32u: Add a BOOL force parameter to update_display_cache.
https://gitlab.winehq.org/wine/wine/-/merge_requests/551