64-bit volatile accesses are not atomic on i386. Both
i686-w64-mingw32-gcc and x86 MSVC splits 64-bit loads into a pair of
load/store ops.
Fix this by using a FILD/FISTP pair, which is also used to implement C11
atomics by i686-w64-mingw32-gcc.
Fixes: f82b1c1fcf770a5d6fa02c3f286282be79a201b8
--
v3: include: Prevent misuse of __WINE_ATOMIC_* helper macros for non-atomic large accesses.
include: Fix ReadNoFence64 on i386.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7237
64-bit volatile accesses are not atomic on i386. Both
i686-w64-mingw32-gcc and x86 MSVC splits 64-bit loads into two
load/stores of a pair of 32-bit words.
Fix this by using FILD/FSTP pair, which is used to implement C11 atomics
by i686-w64-mingw32-gcc.
Fixes: f82b1c1fcf770a5d6fa02c3f286282be79a201b8
--
v2: include: Prevent misuse of __WINE_ATOMIC_* helper macros for non-atomic large accesses.
include: Fix ReadNoFence64 on i386.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7237
64-bit volatile accesses are not atomic on i386. Both
i686-w64-mingw32-gcc and x86 MSVC splits 64-bit loads into two
load/stores of a pair of 32-bit words.
Fix this by using FILD/FSTP pair, which is used to implement C11 atomics
by i686-w64-mingw32-gcc.
Fixes: f82b1c1fcf770a5d6fa02c3f286282be79a201b8
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7237
"DIR /o" (no order specifier after /o) hasn't functioned the same as it does on Windows. This change makes the functionality of /o by itself equivalent to behavior on Windows.
--
v12: programs/cmd: Tests patch from @epo
https://gitlab.winehq.org/wine/wine/-/merge_requests/7131
"DIR /o" (no order specifier after /o) hasn't functioned the same as it does on Windows. This change makes the functionality of /o by itself equivalent to behavior on Windows.
--
v10: programs/cmd: Cleanup DIR /O logic.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7131
On Fri Jan 31 17:26:57 2025 +0000, eric pouech wrote:
> Thanks for the submission.
> I'm not thrilled by the outcome style-wise, but given the starting
> point, I fully agree with you that it'll way too large to go further.
> Two remarks though:
> The commit message should read: "programs/cmd: Cleanup DIR /O logic."
> (without the quotes) we want to trace which module is addressed by the
> change, and commit line should be terminated by a '.'
> Content-wise, we definitively need to embed the tests (as the ones I
> posted above) inside the merge request in order to detect potential
> further regressions. This means the MR shall contain two patches:
> * first patch in MR: the tests (marked with @todo_wine@ for the failing
> ones),
> * the second patch in MR: basically your current patch + removal of
> @todo_wine@ that now pass.
> Either you feel up to do it (feel free to use the patch of tests above);
> if not, I can repackage your patch into the desired form.
Thanks for the feedback and guidance. I appreciate it.
I can certainly try to change the commit message and add the test patch to the MR. I was never able to get the tests to run on my system, however. I believe that it's likely that my build is inadequate. I am not building a full Wine with WOW64 support, etc. Perhaps the CI will run the tests and perhaps I can see the results to see if they are failing, etc.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7131#note_93332
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v11: dlls/oleaut32: ptr_size should be a ULONG
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/7203
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v10: dlls/oleaut32: ITypeComp::BindType() should dispatch ITypeLibComp::BindType()
dlls/oleaut32: Invert if stmt in ITypeInfoImpl_Constructor()
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/7203
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v9: dlls/oleaut32: Validate args of ITypeLib2_fnIsName()
dlls/oleaut32: Consistently use TLB_get_bstr()
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/7203
Thanks for the submission.
I'm not thrilled by the outcome style-wise, but given the starting point, I fully agree with you that it'll way too large to go further.
Two remarks though:
The commit message should read: "programs/cmd: Cleanup DIR /O logic."
(without the quotes) we want to trace which module is addressed by the change, and commit line should be terminated by a '.'
Content-wise, we definitively need to embed the tests (as the ones I posted above) inside the merge request in order to detect potential further regressions. This means the MR shall contain two patches:
* first patch in MR: the tests (marked with @todo_wine@ for the failing ones),
* the second patch in MR: basically your current patch + removal of @todo_wine@ that now pass.
Either you feel up to do it (feel free to use the patch of tests above); if not, I can repackage your patch into the desired form.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7131#note_93325
This PR updates the behaviour of `NtQueryDirectoryFile`, bringing it in line with current Windows behaviour. The need for this update was discovered when attempting to build the Unreal Engine with MSVC under Wine. In certain cases conditional include statements do not behave as expected, due to MSVC depending on undocumented behaviour of `NtQueryDirectoryFile`.
We ran tests on multiple versions of Windows, and discovered that the behaviour has changed since the original Wine implementation, but the documentation has not. The source code for our test tool, and a set of results can be found [here](https://github.com/TensorWorks/NtQueryDirectoryFile-Test). As of Windows 8, calling `NtQueryDirectoryFile` with a re-used handle, a new mask, and setting the `RestartScan` flag to True, causes the cached results to be erased and a new scan to be performed with the updated mask. Currently, Wine performs as did earlier versions of Windows, where the changed mask is ignored, and the cache is reused. This can cause `NtQueryDirectoryFile` under Wine to falsely report that files exist, when they do not.
This PR corrects this behaviour, invalidating the cache when required. Implementing this exposed further undocumented behaviour of `NtQueryDirectoryFile`, where a search for a non-existent file will return either `STATUS_NO_MORE_FILES` or `STATUS_NO_SUCH_FILE`, depending on whether or not the handle had been previously used regardless of the value of `RestartScan`. This was reflected in a `winetest` which allowed for the response to be either `STATUS_SUCCESS` or `STATUS_NO_MORE_FILES`.
This patch also adds unit tests for the new behaviour of `NtQueryDirectoryFile`. These tests pass when running `winetest` under Windows, and under Wine with these changes in place, but they will fail under older versions of Wine. If run under older versions of Windows the test suite will detect that this functionality is not supported, and will not run the updated tests.
--
v10: ntdll.dll: Update NtQueryDirectoryFile to align with current Windows behaviour
ntdll: Test updated NtQueryDirectoryFile mask reset behaviour
https://gitlab.winehq.org/wine/wine/-/merge_requests/6904
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v8: dlls/oleaut32: Validate args of ITypeLibComp_fnBind()
dlls/oleaut32: Fix wFlags check in ITypeLibComp_fnBind()
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/7203
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v7: dlls/oleaut32: Shink down ITypeLibComp_fnBind() verbosity some
dlls/oleaut32: Use consistent param identifers in ITypeComp
dlls/oleaut32: Validate arguments correctly in ITypeComp interface
dlls/oleaut32: fn(Is|Find)Name should set szNameBuf with correct case
dlls/oleaut32: Use array indexing in ITypeLib2_Constructor_SLTG()
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/7203
I don't think these are serious problems, but Clang 21's defaults (from llvm-mingw nightly) were resulting in build failures with `--enable-werror` due to `-Wtautological-compare` and `-Wunused-function`. I hope that the buffer wrap checking is somewhat idiomatic/standard.
If necessary, I can split off the winevulkan change, but it seems minor enough to be grouped in this MR.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/7231
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v6: dlls/oleaut32: Use consistent param identifers in ITypeComp
dlls/oleaut32: Validate arguments correctly in ITypeComp interface
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/7203
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v5: dlls/oleaut32: fn(Is|Find)Name should set szNameBuf with correct case
dlls/oleaut32: Use array indexing in ITypeLib2_Constructor_SLTG()
dlls/oleaut32: Use consistent param identifiers in fnFindName
https://gitlab.winehq.org/wine/wine/-/merge_requests/7203
On Thu Jan 16 14:02:03 2025 +0000, Patrick Laimbock wrote:
> > I don't want to break something else this late.
> That makes total sense :smiley:
> I'm happy to test anything so feel free to ping me.
Hi Rémi and co, is there any movement on this? (an open mr or the like) Now that wine 10 is done could we consider getting this fix in?
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/6569#note_93309
The intention is to have ICreateTypeLib2_fnDeleteTypeInfo() fully implemented such that Cashbooks can run on Linux. I believe this should fix a number of other Windows apps that lean heavily on oleaut32.dll as well.
--
v4: dlls/oleaut32: Mostly mirror fnFindName impl in typelib.c
dlls/oleaut32: Use common and correct identifiers in typelib.c
https://gitlab.winehq.org/wine/wine/-/merge_requests/7203