Windows 10 [received support](https://devblogs.microsoft.com/commandline/af_unix-comes-to-window… for AF_UNIX sockets in Insider Build 17063. This merge request adds basic support for AF_UNIX sockets to ws2_32 and wineserver.
Of particular note is the difficulty in handling `sun_path`. Most of the functions that allow for translating Windows paths to Unix paths are not accessible from ws2_32. I considered the following options:
* Pass the Windows path to wineserver and do the conversion there.
* This is, as far as I can tell, not possible without major rearchitecting. wineserver does not have functions to translate Windows paths to Unix paths, for obvious reasons.
* Obtain the current working directory of the requesting process and temporarily change directories to there.
* This only handles relative paths and fails for absolute paths, UNC paths, etc.
* Conditionally change directories based on whether the path is relative or not.
* This is error-prone and wineserver does not have the requisite functions to do this cleanly.
I ultimately decided to pass the translated Unix path to wineserver, which changes directories to `dirname(path)`. It then provides `bind` and `connect` with `basename(path)`. This is not threadsafe, but wineserver is not (currently) multithreaded.
Abstract sockets are supported by this patch.
--
v24: ws2_32/tests: Add test for AF_UNIX sockets.
server: Fix getsockname() and accept() on AF_UNIX sockets.
server: Introduce error when attempting to connect() to abstract AF_UNIX sockets.
server: Allow for deletion of socket files.
ws2_32: Add support for AF_UNIX sockets.
ntdll/unix: Add support for AF_UNIX sockets to multiple functions.
ws2_32: Add afunix.h header.
https://gitlab.winehq.org/wine/wine/-/merge_requests/2786
Windows 10 [received support](https://devblogs.microsoft.com/commandline/af_unix-comes-to-window… for AF_UNIX sockets in Insider Build 17063. This merge request adds basic support for AF_UNIX sockets to ws2_32 and wineserver.
Of particular note is the difficulty in handling `sun_path`. Most of the functions that allow for translating Windows paths to Unix paths are not accessible from ws2_32. I considered the following options:
* Pass the Windows path to wineserver and do the conversion there.
* This is, as far as I can tell, not possible without major rearchitecting. wineserver does not have functions to translate Windows paths to Unix paths, for obvious reasons.
* Obtain the current working directory of the requesting process and temporarily change directories to there.
* This only handles relative paths and fails for absolute paths, UNC paths, etc.
* Conditionally change directories based on whether the path is relative or not.
* This is error-prone and wineserver does not have the requisite functions to do this cleanly.
I ultimately decided to pass the translated Unix path to wineserver, which changes directories to `dirname(path)`. It then provides `bind` and `connect` with `basename(path)`. This is not threadsafe, but wineserver is not (currently) multithreaded.
Abstract sockets are supported by this patch.
--
v23: kernel32/tests: Extend console inheritance tests.
shell32: Don't show size for inaccessible drives in My Computer.
shell32: Show >4GB values in size columns of My Computer.
win32u: Remove duplicated d3dkmdt.h include.
user32: Remove no longer used setupapi import.
winex11: Set the window cursor immediately in SetCursor.
wineandroid: Set the window cursor immediately in SetCursor.
win32u: Notify drivers of cursor changes on WM_WINE_SETCURSOR.
win32u: Add a hwnd parameter to SetCursor driver entry points.
server: Introduce and send new WM_WINE_SETCURSOR hardware message.
server: Keep track of the current desktop cursor handle.
server: Update desktop cursor window when cursor pos changes.
ntdll: Make only the necessary pages writable in the ARM64EC code map.
ntdll: Load modules with a high base address in high memory.
ntdll: Allocate 64-bit and kernel stacks in high memory.
ntdll: Support the lower memory limit in MEM_ADDRESS_REQUIREMENTS.
server: Also enforce the size of varargs data structures.
kernel32/tests: Fix the PROCESS_BASIC_INFORMATION exit status type.
wineoss: Implement main_loop in unixlib.
winecoreaudio: Implement main_loop in unixlib.
winealsa: Implement main_loop in unixlib.
winepulse: Move main loop logic into mmdevapi.
uiautomationcore: Unconditionally match all events registered on the desktop node with a scope of subtree.
uiautomationcore: Implement UiaRaiseAutomationEvent.
uiautomationcore: Add support for cloning UiaCondition structures.
uiautomationcore: Clone UiaCacheRequest structure passed to UiaAddEvent.
uiautomationcore: Store all events in an event list.
wineps.drv: Use afm FamilyName instead of FullName.
win32u: Cleanup naming and log messages for QueryDisplayConfig.
win32u: Move QueryDisplayConfig from user32.
win32u: Move fullscreen window cursor clipping from winex11.
winex11: Move clip_fullscreen_window foreground check inside it.
win32u: Add a clipping_cursor member to user_thread_info.
win32u: Add a clipping_reset member to user_thread_info.
win32u: Move grab_pointer registry option from winex11.
winex11: Remove now unnecessary WM_X11DRV_CLIP_CURSOR_NOTIFY.
imm32: Avoid resizing IMCC to zero-size buffer.
winepulse: Return E_NOTIMPL when the property is not found.
winepulse: Don't overwrite the result in the insufficient buffer case.
wow64: Don't force wow64 dlls to load at low addresses.
winegcc: Fix an uninitialized variable warning in the PE build.
loader: Make the loader position-independent on 64-bit.
makefiles: Define WINE_UNIX_LIB for all files that are built for Unix.
include: Remove redundant __WINE_USE_MSVCRT checks.
windows.media.speech: Fix memory leak on error path in session_worker_thread_cb (scan-build).
server: Use hardware message category when checking filter.
server: Pass the message code to get_hardware_msg_bit.
user32: Add GetSystemDpiForProcess export.
ntdll: Allow RtlAllocateHeap to crash with invalid handle.
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/2786
This MR supercedes !1895 as a solution to bug [#50771](https://bugs.winehq.org/show_bug.cgi?id=50771). Rather than fixing the problem of Wine's inability to modify the attributes of read-only files, this patch set instead implements `FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE` which the Msys2 and Cygwin runtime libriries can use to avoid needing to modify attributes.
--
v2: ntdll: Implemented FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE
ntdll/tests: Added tests for FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE
https://gitlab.winehq.org/wine/wine/-/merge_requests/3073
This MR supercedes !1895 as a solution to bug [#50771](https://bugs.winehq.org/show_bug.cgi?id=50771). Rather than fixing the problem of Wine's inability to modify the attributes of read-only files, this patch set instead implements `FILE_DISPOSITION_IGNORE_READONLY_ATTRIBUTE` which the Msys2 and Cygwin runtime libriries can use to avoid needing to modify attributes.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3073
We don't need the window anymore, it was only used to send ClipCursor
notifications. This improves cursor clipping performance a lot as it
avoids re-creating a window every time.
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3072
Reverting things a bit to how it was before the move to win32u, and avoid modifying the Win32 clipping rect when handling host-specific events like keyboard grabs. This temporarily releases the winex11 cursor grabs, while keeping the Win32 state unchanged and unnotified, and restores the state later when either keyboard is ungrabbed or the virtual desktop window is focused again.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=55046
--
https://gitlab.winehq.org/wine/wine/-/merge_requests/3071