In CopyFileEx, and DeleteFile functions, by default, the file name
and path are limited to MAX_PATH characters. To extend this limit
to 32,767 wide characters, need prepend "\\\\?\\" to the path.
--
v3: kernelbase: Limit the maximum path length for DeleteFile.
kernelbase: Fix DeleteFileA doesn't support long path.
kernelbase: Limit the maximum path length for filesystem.
user32: Load the value of longPathAware from manifest.
kernel32/tests: Add tests for maximum path length limitation.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7540
This fixes a real problem and improves behavior at the same time.
- Fixes: hanging when trying to run Wine built with epoll_pwait2 headers available
but epoll_pwait2 is missing in the run-time kernel (i.e. build 5.11->run 5.10)
- Improvement: bring the improved timeout resolution to Wine builds
which didn't have epoll_pwait2 at compile time, if the run-time kernel supports it
(i.e. build 5.10->run 6.14)
This last point is especially important in my opinion, as it applies to official Proton builds.
Proton is (currently) built in Debian 11 with kernel 5.10, but SteamOS is a moving target with
a much newer kernel version being used to run these Wine builds.
These builds use the lower resolution timeouts if epoll_pwait2 is only checked for at compile-time,
when it can cheaply and easily be done at run-time instead.
Fixes: 87ca5db40e2c1b37423bdc25101a5c5e39e67e6f
An alternative to !7640 that kills two birds with one stone.
--
v5: server: Use dlsym() to check for epoll_pwait2 at run-time.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7642
Some console objects currently do several unique things:
* Delegate waits onto the queue of another object. This is not really a problem
for in-process waits, since we can just return the sync object for the
delegate. However, it's also unnecessary, adds to the complexity of the server
logic, and is one out of one places where this is done.
* Make the wait state dependent on the process. This is difficult to emulate
with ntsync and would require creating separate server objects for each
process, hacking into duplicate_handle.
* Fail a wait entirely in certain circumstances. This is pretty much impossible
to emulate with in-process waits.
Although ntsync has been in development for some time, I have regrettably failed
to notice these problems until now.
Fortunately, none of these behaviours happen on modern Windows. Although I/O on
unbound handles delegates to the console of the current process, the signaled
state does not. As the tests here show, the signaled state of a handle depends
on the active console of the process in which the handle was created. If that
console no longer exists, the signaled state is no longer updated [with one
rather inexplicable exception].
Crucially, in current Windows waits never fail, and the state of an object is
the same across all process which hold handles to it. Therefore this patch
brings our behaviour to closer match current Windows.
In theory these are fds and should use default_fd_signaled(). However, the
points at which the handles are signaled are completely different, and I/O does
not trigger console handles to become signaled when it normally would. Therefore
for the time being I've kept the code using custom signaled ops.
There is one other oddity related to consoles, which is the existence of
console_add_queue(), which seeks to lazily create an input thread when a console
is first waited on. This is one out of two places, after this patch, when the
wait process is hijacked (the other being message queues). Fortunately this is
easy to handle for in-process synchronization objects, by queueing the ioctl
from the callback used to retrieve the in-process synchronization object itself.
--
v5: server: Track unbound output signaled state based on its original console.
server: Track unbound input signaled state based on its original console.
server: Allow waiting on an orphaned screen buffer.
server: Use a list of screen buffers per console.
server: Fail to create an unbound input/output when there is no console.
kernel32/tests: Add more tests for orphaned console handles.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7608
The last of the saving patches for d3dx9. :)
--
v3: d3dx9: Add support for saving IDirect3DVolumeTexture9 textures to DDS files in D3DXSaveTextureToFileInMemory().
d3dx9: Add support for saving IDirect3DCubeTexture9 textures to DDS files in D3DXSaveTextureToFileInMemory().
d3dx9: Add support for saving IDirect3DTexture9 textures to DDS files in D3DXSaveTextureToFileInMemory().
d3dx9/tests: Add more tests for saving textures to DDS files.
https://gitlab.winehq.org/wine/wine/-/merge_requests/7636