Commit Graph

266 Commits

Author SHA1 Message Date
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 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 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
Alexandre Julliard d10410eac2 ntdll: Add fallback implementations for the Unix library functions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-12-02 20:20:39 +01:00
Jinoh Kang a4ffa1e7e2 ntdll: Implement NtCompareObjects.
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-29 23:25:46 +01:00
Zebediah Figura 7e926a9aa9 ntdll: Allow loading system DLLs from a path specified at configure time.
Many distributions provide MinGW-compiled system DLLs which are currently
bundled with Wine. Unfortunately, while MinGW pkg-config can be used to detect
the linking path, there is no standardized runtime path, and many distributions
in fact use different paths.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-24 15:30:09 +01:00
Alexandre Julliard 62d335053f makefiles: Don't append .fake extension to fake dlls.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-20 13:07:47 +01:00
Zebediah Figura f3e9498740 ntdll: Reimplement SRW locks on top of Win32 futexes.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-18 11:09:25 +01:00
Zebediah Figura 87164ee333 ntdll: Get rid of the direct futex path for condition variables.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-18 11:09:16 +01:00
Zebediah Figura c577ce2671 ntdll: Reimplement the critical section fast path on top of Win32 futexes.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-18 11:09:07 +01:00
Zebediah Figura 6bdb914a25 ntdll: Reimplement Win32 futexes on top of thread-ID alerts.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-18 11:08:49 +01:00
Zebediah Figura 0e931fa5fd ntdll: Implement NtAlertThreadByThreadId and NtWaitForAlertByThreadId.
These will be used to implement RtlWaitOnAddress() and other in-process
synchronization primitives, as they are on Windows.

These patches went through quite a few revisions in order to ensure that they
had sufficient performance and correctness compared to the current
implementation. I am particularly grateful to Etienne Juvigny and Dmitry
Skvortsov for performing extensive testing.

Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-17 16:36:01 +01:00
Alexandre Julliard 8dc6987ba5 ntdll: Create a remote thread in DbgUiIssueRemoteBreakin().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-11-09 22:02:54 +01:00
Alexandre Julliard 1b9ada6cab ntdll: Remove math functions from the unixlib interface.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-26 10:39:34 +02:00
Damjan Jovanovic 70f486c28f ntdll: Use sysctl instead of /proc/curproc/file on FreeBSD.
Signed-off-by: Damjan Jovanovic <damjan.jov@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-25 18:50:59 +02:00
Alexandre Julliard 832724282b ntdll: Avoid including wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-20 16:16:07 +02:00
Alexandre Julliard edba76c826 include: Don't define math functions or constants in wine/port.h.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-10-11 11:25:35 +02:00
Alexandre Julliard c1b3d6eb10 ntdll: Add a __wine_unix_spawnvp syscall.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-27 17:40:14 +02:00
Gerald Pfeifer cac8c971a7 ntdll: Fix init_builtin_dll for FreeBSD again.
Commit e9cfc97d46

    Revert "ntdll: Add a Wine-specific class in NtQueryVirtualMemory
    to retrieve the init functions of a module."

    This reverts commits e5339ecbc6 and
    18408b18f3.

broke the build on FreeBSD.

Adjust the return value for FreeBSD as well.

Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-23 10:26:29 +02:00
Alexandre Julliard 1649785bec Revert "ntdll: Stub power request APIs."
This reverts commit ca2b701249.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51741
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-10 23:21:21 +02:00
Alexandre Julliard e9cfc97d46 Revert "ntdll: Add a Wine-specific class in NtQueryVirtualMemory to retrieve the init functions of a module."
This reverts commits e5339ecbc6 and
18408b18f3.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51596
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-09-10 20:22:11 +02:00
Alexandre Julliard ea6308e364 ntdll: Declare the syscall functions array explicitly.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Alexandre Julliard 7ae1c396ac ntdll: Store the syscall argument table on the PE side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Alexandre Julliard d017c704f0 ntdll: Add a helper function to set a syscall table.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-30 22:49:58 +02:00
Alexandre Julliard 847db3c1d3 ntdll: Store the syscall table in the syscall frame on all platforms.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-26 10:47:38 +02:00
Alexandre Julliard 88c5184b4d ntdll: Consistently fixup the machine type for IL-only binaries.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51668
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-24 17:40:40 +02:00
Gerald Pfeifer 6468e445bd ntdll: Always return a value in get_builtin_init_funcs.
This only showed up in the #ifdef __FreeBSD__ case, so did not appear
on other platforms during testing.

Signed-off-by: Gerald Pfeifer <gerald@pfeifer.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-19 11:16:08 +02:00
Alexandre Julliard b56a4b3efc ntdll: Implement KiUserCallbackDispatcher().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-17 11:55:39 +02:00
Zebediah Figura a8d2de6092 ntdll: Make wine_build a hidden symbol.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-13 11:36:36 +02:00
Alexandre Julliard d7add38218 ntdll: Make __wine_unix_call() WINAPI to follow syscall conventions.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-11 23:00:49 +02:00
Alexandre Julliard 572817948a ntdll: Add a custom type for the Unix functions table handle.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 18:07:32 +02:00
Alexandre Julliard c29f650474 ntdll: Load the Unix dll at the same time as the PE one, but don't map it yet.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 17:53:55 +02:00
Alexandre Julliard ccd9008d8d ntdll: Don't try to load .so dlls for a different machine.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-10 17:53:55 +02:00
Martin Storsjö 29922c2276 loader: Add support for ARM linux in the preloader.
Since 28fe84da45, the main exe image
must be mappable at its desired base address, which essentially
requires the preloader.

Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51539
Signed-off-by: Martin Storsjö <martin@martin.st>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-05 23:11:23 +02:00
Huw Davies 41e84b3f07 ntdll: Return STATUS_NOT_SUPPORTED if dlinfo() is not present.
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 21:48:27 +02:00
Alexandre Julliard 3dd6cafe3d ntdll: Use the 32-bit __wine_ctrl_routine() in Wow64 processes.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-04 12:48:31 +02:00
Alexandre Julliard e5339ecbc6 ntdll: Add a Wine-specific class in NtQueryVirtualMemory to retrieve the init functions of a module.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Alexandre Julliard 669d1cce03 ntdll: Add a magic parameter to NtFreeVirtualMemory() for releasing address space.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-08-03 23:41:05 +02:00
Alexandre Julliard b08b4b8213 server: Store the entry point as image-relative in pe_image_info_t.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=51539
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-30 12:14:30 +02:00
Alexandre Julliard 3a32ea8e91 ntdll: Add support for LdrSystemDllInitBlock.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 16:33:29 +02:00
Alexandre Julliard 390d71b091 ntdll: Also load the Wow64 ntdll for the main exe target machine.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 16:33:29 +02:00
Alexandre Julliard 3190a5bcdd ntdll: Make the ntdll exports and relocations processing more generic.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-07-07 16:33:29 +02:00
Alexandre Julliard b572cf3025 ntdll: Copy the implementation of __wine_dbg_output to the PE side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-16 15:37:46 +02:00
Alexandre Julliard c2d84da813 ntdll: Copy the implementation of __wine_dbg_strdup and __wine_dbg_header to the PE side.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:42:25 +02:00
Alexandre Julliard 588d91aecf ntdll: Store the current PEB in a global variable.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-15 20:42:25 +02:00
Alexandre Julliard 6b277dc89d ntdll: Always allocate extra stack space for the kernel stack.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-11 11:06:42 +02:00
Alexandre Julliard 1bd4473484 ntdll: Create a thread to run the ctrl-C routine instead of raising an exception.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-09 23:38:43 +02:00
Alexandre Julliard e5982993ae ntdll: Get rid of signal_init_syscalls().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-02 20:16:07 +02:00
Jacek Caban 1b5ea62e8e ntdll: Introduce wine_unix_call.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-06-01 18:00:32 +02:00
Jacek Caban 4e789932c6 ntdll: Make get_machine_wow64_dir static.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2021-05-26 21:29:38 +02:00