Alexandre Julliard
3e73437ae8
ntdll: Preserve the startup Unix directory unless it's on a removable device.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52256
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-27 18:51:16 +01:00
Paul Gofman
aee405e2cb
ntdll: Always try searching apiset DLLs in the default directories.
...
This is a temporary workaround until we have a correct apisets
implementation.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-23 10:55:30 +01:00
Andrey Gusev
93b7c335d6
ntdll: Fix a variable name in TRACE() message.
...
Signed-off-by: Andrey Gusev <andrey.goosev@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-21 16:52:22 +01:00
Paul Gofman
6b78bcff92
ntdll: Restore FP status words from MSVCRT_JUMP_BUFFER on x64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-21 16:52:07 +01:00
Paul Gofman
652dc00578
ntdll: Don't set socket IO status after queuing async.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-17 19:33:14 +01:00
Jacek Caban
d0413d833f
ntdll: Don't use inline assembly in do_cpuid.
...
Avoids problems on old GCC.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51862
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-17 17:17:54 +01:00
Eric Pouech
594036d620
ntdll: Use proper names for magic constants.
...
Signed-off-by: Eric Pouech <eric.pouech@gmail.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-17 17:17:49 +01:00
Alexandre Julliard
b75caec103
ntdll/tests: Mark a failing test as todo.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-16 16:17:21 +01:00
Alexandre Julliard
311c0e91c0
ntdll/tests: Fix some wow64 test failures on Windows.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-15 17:01:53 +01:00
Alexandre Julliard
1887df5cd8
ntdll/tests: Fix some directory test failures on Windows.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-15 16:19:08 +01:00
Alexandre Julliard
c372d155ec
ntdll/tests: Fix some exception test failures on Windows.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-15 15:57:01 +01:00
Alexandre Julliard
8125687441
ntdll: Fix the RtlCreateTimer() argument order.
...
Found by Dávid Török.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-14 21:48:44 +01:00
Paul Gofman
e36c6f04ce
ntdll: Add stub for NtSetDebugFilterState().
...
Eternal Return benefited from this function present as .spec file
stub which was removed by 52202224d9
.
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-14 14:18:53 +01:00
Jinoh Kang
4ef4864672
ntdll/tests: Fix access denied error in unprivileged mode.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52161
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-13 11:28:57 +01:00
Alexandre Julliard
40d706caba
ntdll/tests: Mark a failing test as todo.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51380
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-12 15:41:02 +01:00
Francois Gouget
1558b21a9d
ntdll/tests: Fix the spelling of a comment.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:18 +01:00
Zebediah Figura
4b00dd097d
server: Handle the entire IOCTL_AFD_POLL ioctl on the server side.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Zebediah Figura
7747bf9551
ntdll: Make the afd_transmit_params structure WoW64-compatible.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Zebediah Figura
b3fd1ca20e
ntdll: Handle WoW64 translation in IOCTL_AFD_WINE_SENDMSG.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Zebediah Figura
6697759b99
ntdll: Make the afd_recvmsg_params structure WoW64-compatible.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Zebediah Figura
737f6952da
ntdll: Handle WoW64 control message translation.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Zebediah Figura
a0b57b9baa
ntdll: Handle WoW64 translation in IOCTL_AFD_RECV.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Zebediah Figura
e3e860e536
ntdll: Handle WoW64 WSABUF pointers in sock_recv().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Zebediah Figura
7bea24f6e1
ntdll: Factor out in_wow64_call().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Zebediah Figura
6fe23ed8c3
ntdll: Do not fill the IOSB in NtDeviceIoControlFile() if the NT status denotes error.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Jinoh Kang
e60fdbf124
ntdll: Properly test for LLVM libunwind error codes.
...
Commit f37b953e07
(ntdll: Support both HP-UX-like libunwind and LLVM
libunwind error codes., 2021-12-10) made an unsuccessful attempt to fix
UNW_ENOINFO detection on LLVM libunwind. It turns out that UNW_ENOINFO
is actually negative in LLVM, so there's no need to flip the sign.
Fix this by flipping the return value sign only when UNW_ENOINFO < 0
(LLVM libunwind), and then comparing it against the negated error code.
Overall, all flavours of libunwind return a negative value on error.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-10 22:00:17 +01:00
Jinoh Kang
f37b953e07
ntdll: Support both HP-UX-like libunwind and LLVM libunwind error codes.
...
HP-UX libunwind uses the sign of error code to indicate whether the
operation was successful; however, LLVM always returns positive error
codes.
Normalise the sign of the error code so that it handles all flavours of
libunwind.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Alexandre Julliard
411592bf45
configure: Assume that sys/wait.h is available on Unix.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Alexandre Julliard
e5d69d9ee6
configure: Assume that sys/ioctl.h is available on Unix.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Alexandre Julliard
b3ca48f39c
configure: Assume that sys/time.h is available on Unix.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Alexandre Julliard
a7ac3de3b3
configure: Assume that sys/socket.h is available on Unix.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Alexandre Julliard
e3001b6a7c
configure: Assume that sys/mman.h is available on Unix.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Alexandre Julliard
13ec7952e0
configure: Assume that unistd.h is available on Unix.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:51 +01:00
Alexandre Julliard
7d5af65591
configure: Assume that termios.h is available on Unix.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 18:43:50 +01:00
Alexandre Julliard
4f58d8144c
ntdll: Remove __wine_init_unix_lib() and the old Unix library interface.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 17:14:59 +01:00
Jinoh Kang
1886b3d322
ntdll: Fix valid frame address range in ARM/ARM64.
...
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 17:14:59 +01:00
Jinoh Kang
3e2f443003
server: Fix querying debug port with restricted DACL.
...
Today, Wine uses NtQueryInformationProcess/ProcessDebugPort to detect
whether the current process is being debugged. If it is, the process
issues a breakpoint to yield control to the debugger.
Some debuggers (e.g. latest CDB) appear to create debug handles with
restricted DACL, which causes querying debug port to fail with
STATUS_ACCESS_DENIED. This results in the debuggee erroneously
skipping the initial breakpoint.
Fix this by not requiring DEBUG_ALL_ACCESS when opening the debug port
object. Instead, use MAXIMUM_ALLOWED for the access mask.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52184
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 17:14:59 +01:00
Jinoh Kang
ee4d38c3b1
ntdll/tests: Add tests for DebugPort* info query with security checks.
...
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 17:14:59 +01:00
Jacek Caban
1facdbbdcb
ntdll: Temporarily allow KeUserModeCallback calls from client stack.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-09 10:47:41 +01:00
Paul Gofman
d2e35b04fb
ntdll: Remove a special case for entry point not in executable section in map_image_into_view().
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 22:14:44 +01:00
Alexandre Julliard
0b3d65f822
ntdll: Don't restore the %fs register for exceptions happening inside system calls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 15:02:58 +01:00
Alexandre Julliard
cdafebed15
include: Document remaining fields in the SYSTEM_PROCESS_INFORMATION structure.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-08 13:19:48 +01:00
Damjan Jovanovic
36af18a4f1
ntdll: Implement fill_battery_state() on FreeBSD.
...
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 21:54:57 +01:00
Alexandre Julliard
456e76185d
ntdll: Don't return a default Unix handle for modules that don't have a Unix library.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-07 16:19:48 +01:00
Bernhard Übelacker
c488f29122
server: Return ReadDataAvailable value for FilePipeLocalInformation.
...
Makes Cygwin mintty.exe or script.exe show output, if the
stack issues got worked around.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47808
Signed-off-by: Bernhard Übelacker <bernhardu@mailbox.org>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-06 22:55:07 +01:00
Jactry Zeng
03649e5fb4
ntdll: Fix compilation for ARM64 Apple platform.
...
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Jactry Zeng <jzeng@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-06 16:36:51 +01:00
Paul Gofman
c338a6ff99
ntdll: Support THREAD_CREATE_FLAGS_HIDE_FROM_DEBUGGER thread creation flag.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-06 12:20:34 +01:00
Paul Gofman
3f20261eaf
ntdll: Set rcx on exit from syscall dispatcher on x64.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-03 19:31:55 +01:00
Brendan Shanks
e7afddd2c1
ntdll: Rename THREAD_DESCRIPTION_INFORMATION to THREAD_NAME_INFORMATION.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:40 +01:00
Brendan Shanks
65dd060a67
ntdll: Rename ThreadDescription to ThreadNameInformation.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:40 +01:00