This reworks `set_native_thread_name()` for macOS to not rely on mach thread ports returned server side (which were potentially colliding cross-process anyways) and re-implements what `pthread_setname_np()` would do on wines side, with additionally allowing setting threadnames cross-process.
On the kernel side `bsd_setthreadname()` is apparently "known to race with regards to the contents of the thread name", so that is only exposed for the thread calling it on itself.
Since the pthread struct is private, the location of the thread name is determined at runtime (although in practice, it is constant (80 bytes) from at least 10.15 up to 14.0).
This has an effect on both `pthread_getname_np()` and the `NSThread` implementation on top a native library would use.
Cross-thread naming is only not visible to external debuggers, which have acquired a mach port right and calling `thread_info()` with `THREAD_EXTENDED_INFO`
--
v2: ntdll: Reimplement set_native_thread_name() for macOS.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4854
--
v8: gdiplus: Implement font linking for gdiplus.
gdiplus/tests: Add interactive test for font linking.
gdiplus: Replace HDC with GpGraphics in parameters.
mlang: Fix bug with codepage priority in GetStrCodePages.
mlang/tests: Test codepages priority bug in GetStrCodepages.
mlang: Implement GetGlobalFontLinkObject.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4082
Fixes a crash in Microsoft Flight Simulator (which passes some currently invalid values to ucrtbase._gmtime64() and doesn't expect NULL result).
It looks like any msvcrt version on modern Windows accepts wider range of values. Meanwhile, the exact range is different for ucrtbase vs older CRT versions (the exact values for ucrtbase also vary before Win10 1909). Also, older msvcrt.dll matches what we have in Wine now. So the patch keeps old msvcrt behavior, adds universally correct limits for msvcrt 70-120 and the latest (Win10 1909+) for ucrtbase.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/5024
This series' main purpose is to fix the handles' attributes
of standard I/O handles in CreateProcess.
Needed behavior in CreateProcess is implemented by supporting
the DUPLICATE_SAME_ATTRIBUTES option in NtDuplicateObject() and
DuplicateHandle().
This option is not documented in SDK, but is in DDK.
Manifest constant has been added to DDK header (maybe now
Wine's DUPLICATE_MAKE_GLOBAL could be moved here to).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4613
copy implementation of CopyFileExW into CopyFile2,
then implement CopyFileExW in terms of CopyFile2
should fix https://bugs.winehq.org/show_bug.cgi?id=55897, as Python does not use any new functionality nor the callback parameter from CopyFile2.
- followed [the Wiki](https://wiki.winehq.org/Developer_Hints#Implementing_new_API_calls) for adding a new API call
- run `file.c` tests and they seem to pass
I have not written extensive documentation since the original function didn't seem to have any; I can do that if recommended.
I originally intended to implement the callback functionality in this MR as well, but realized that would be better as a follow-up.
--
v2: - replace BOOL with HRESULT
https://gitlab.winehq.org/wine/wine/-/merge_requests/5020
--
v3: mshtml/tests: Test builtin function default value getter with custom
mshtml: Expose the IHTMLEventObj5 props to scripts.
mshtml: Implement `initMessageEvent` for MessageEvents.
mshtml: Implement `origin` prop for MessageEvents.
mshtml: Implement `data` getter for MessageEvent objs.
mshtml: Return E_ABORT from postMessage called without a caller
mshtml: Implement `source` prop for MessageEvents.
mshtml: Use a hook to implement postMessage.
https://gitlab.winehq.org/wine/wine/-/merge_requests/4986
When two sends are performed in parallel on a socket the send which came second to server's (socked_send) will always considered blocking if the first send hasn't performed set_async_direct_result() in client's ntdll yet. Similarly, if select() is coming shortly after send() it may report socket as not write ready. We don't care for avoiding a race here because if those two sends or send / select are not synced by app it is unlikely possible for an app to depend on which gets processed first, and the one which was called earlier in wall time now also is not guaranteed to be actually processed first.
The patches fix Tekken 8 which gets frequently disconnected from multiplayer matches. The game treats WSAEWOULDBLOCK from send() on its non-blocking UDP socket, as well as the same socket not reported as write ready from select as a disconnection condition. Those conditions normally (outside of actual network problem / contention) only happen due to the races described above (while the game performs send() concurrently from different threads or is racing send with select).
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/4967