Alexandre Julliard
c45abb8a7c
ntdll: Add _i64tow_s.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-30 12:32:48 +02:00
Alexandre Julliard
703212b67e
ntdll: Add _ui64tow_s.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-30 12:32:48 +02:00
Alexandre Julliard
9dcfda0233
ntdll: Add _wcstoui64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-30 12:32:48 +02:00
Alexandre Julliard
ae1202cef0
ntdll: Add _wcstoi64.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-30 12:32:48 +02:00
Alexandre Julliard
cbf5ad74fc
ntdll: Add memcpy_s and memmove_s.
...
Implementation copied from msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Alexandre Julliard
25f4760e85
ntdll: Add strupr_s and wcsupr_s.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Alexandre Julliard
a15c55e658
ntdll: Add strlwr_s and wcslwr_s.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Alexandre Julliard
b44ebda388
ntdll: Add strtok_s and wcstok_s.
...
Implementation copied from msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Alexandre Julliard
7c70b9397f
ntdll: Add strncat_s and wcsncat_s.
...
Implementation copied from msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Alexandre Julliard
94e960c861
ntdll: Add strncpy_s and wcsncpy_s.
...
Implementation copied from msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Alexandre Julliard
83cd792e35
ntdll: Add strcat_s and wcscat_s.
...
Implementation copied from msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Alexandre Julliard
41f488a32d
ntdll: Add strcpy_s and wcscpy_s.
...
Implementation copied from msvcrt.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Alexandre Julliard
c948a6cf92
ntdll: Add a few more isw* functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Alexandre Julliard
194e09baec
makefiles: Add separate variables for Unix flags and libraries.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-29 23:23:41 +02:00
Zebediah Figura
e39880d945
ntdll/tests: Test setting the return value via alertable NtContinue().
...
This is currently broken on WoW64.
2022-06-28 18:45:36 +02:00
Zebediah Figura
1168dfc3c1
ntdll/tests: Fix test_user_apc() on Windows < 7.
2022-06-28 18:45:36 +02:00
Zebediah Figura
6775a20f4e
ntdll/tests: Fix test_user_apc() on i386.
2022-06-28 18:45:36 +02:00
Nikolay Sivov
1fb6f27144
ntdll: Implement NtRenameKey().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-28 15:54:15 +02:00
Nikolay Sivov
4bd160da5e
ntdll/tests: Add some tests for NtRenameKey().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-28 15:39:55 +02:00
Alexandre Julliard
3af0258795
ntdll: Fix returned status code for paths with a trailing slash.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-28 13:20:15 +02:00
Alexandre Julliard
fef675e764
ntdll: Fix returned status code for non-directory in path.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-28 13:20:15 +02:00
Alexandre Julliard
1a00dfe408
ntdll/tests: Add some tests for trailing slashes in paths.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-28 13:20:15 +02:00
Zebediah Figura
88b77020f2
ntdll: Add some documentation for ntdll_umbstowcs() and ntdll_wcstoumbs().
...
These functions do match e.g. mbstowcs() and MultiByteToWideChar(), but that
fact is not inherently obvious [and they don't match RtlMultiByteToUnicodeN(),
for example.]
2022-06-27 10:32:41 +02:00
Huw Davies
04d07d65e3
wow64: Report the correct size for SystemLogicalProcessorInformationEx.
...
Spotted by Brendan Shanks.
Signed-off-by: Huw Davies <huw@codeweavers.com>
2022-06-24 22:38:47 +02:00
Jinoh Kang
b8d11f76da
ntdll/tests: Add more tests for \Device\NamedPipe\ root directory.
...
Signed-off-by: Jinoh Kang <jinoh.kang.kr@gmail.com>
2022-06-21 18:40:25 +02:00
Brendan Shanks
f99cb3297f
ntdll: Add zero_bits parameter to load_builtin.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
2022-06-20 10:37:48 +02:00
Brendan Shanks
20abf39d86
ntdll: Add zero_bits parameter to find_builtin_dll.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
2022-06-20 10:37:48 +02:00
Brendan Shanks
6d22775b65
ntdll: Add zero_bits parameter to open_builtin_pe_file.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
2022-06-20 10:37:48 +02:00
Brendan Shanks
9bed3adc72
ntdll: Add zero_bits parameter to virtual_map_builtin_module.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
2022-06-20 10:37:46 +02:00
Alex Henrie
89ec37871f
ntdll: Don't hard-code the battery and AC adapter names on Linux.
...
Look through all of the devices in /sys/class/power_supply and take the
statistics from the first battery and the first AC adapter.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=52831
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
2022-06-16 11:40:05 +02:00
Tim Clem
f86a66b660
ntdll: Move SEH exception info logs back to the seh channel.
...
These were accidentally moved as part of the introduction of +unwind.
Signed-off-by: Tim Clem <tclem@codeweavers.com>
2022-06-13 22:56:21 +02:00
Rémi Bernon
4ca954ad0b
ntdll: Remove heap pointer from SUBHEAP structure.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-13 19:57:31 +02:00
Rémi Bernon
a6fcf059a7
ntdll: Use block_size and data_size in subheap structure.
...
Respectively describing allocated size vs commit size, relative to the
first subheap block, instead of size / commitSize.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-13 19:57:31 +02:00
Rémi Bernon
2ef69e4492
ntdll: Rename HEAP_GetPtr to unsafe_heap_from_handle.
...
And related heap variables to handle and heapPtr to heap.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-13 19:57:31 +02:00
Rémi Bernon
fef774f953
ntdll: Consistently name heap handles and pointers.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-13 19:57:31 +02:00
Rémi Bernon
4b05b2bcb7
ntdll: Rename HEAP to struct heap and remove typedef.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-13 19:57:31 +02:00
Daniel Lehman
dd95979b0a
ntdll/tests: Test if RtlFormatMessage modifies va_list on error.
...
Signed-off-by: Daniel Lehman <dlehman25@gmail.com>
2022-06-13 16:54:30 +02:00
Rémi Bernon
bffeff3819
ntdll: Implement RtlGetUserValueHeap.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-10 18:24:34 +02:00
Rémi Bernon
ff864e5621
ntdll: Implement RtlSetUserValueHeap.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-09 20:55:20 +02:00
Rémi Bernon
31df70a3de
ntdll: Add block padding when HEAP_ADD_USER_INFO flag is set.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
2022-06-09 20:55:20 +02:00
Alexandre Julliard
21a1c30972
ntdll: Move the user locale initialization to the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-09 13:20:13 +02:00
Alexandre Julliard
c5eb9cb25e
ntdll: Share a few more locale functions with the Unix side.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-09 13:20:13 +02:00
Paul Gofman
7c597313f8
ntdll: Cancel asyncs when thread is terminated.
...
Signed-off-by: Paul Gofman <pgofman@codeweavers.com>
2022-06-09 13:20:13 +02:00
Martin Storsjö
94dc5714ac
ntdll/tests: Test returning an exception handler on arm/arm64.
...
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-09 13:20:13 +02:00
Martin Storsjö
f1f7e096db
ntdll/tests: Fix printing of incorrect exception handler data.
...
*(DWORD *)data is the value being compared; printing the 'data'
pointer itself provides little value here.
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-09 13:20:13 +02:00
Martin Storsjö
94f7f52dac
ntdll: Take ControlPcIsUnwound into account on arm64 too.
...
This is the same modification as the previous patch, applied on arm64.
It doesn't change the outcome for any of my tests though.
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-07 15:27:21 +02:00
Martin Storsjö
d007c91d46
ntdll: Use ControlPcIsUnwound for the RtlVirtualUnwind pc parameter in virtual_unwind.
...
Don't just use ControlPcIsUnwound for picking which RUNTIME_FUNCTION
to use, but also use it for adjusting the pc value that is passed
to RtlVirtualUnwind.
This fixes one testcase (that I had missed to build and run before),
where the pc points at the start of an epilogue (which would mean
that no handler is returned from RtlVirtualUnwind). By taking
ControlPcIsUnwound and adjusting the pc pointer, the unwind handler
is returned and executed.
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-07 15:27:19 +02:00
Martin Storsjö
2d43653a2e
ntdll: Add SEH unwind info in ARM assembly functions/trampolines.
...
Clang generates SEH unwind info on ARM in both MSVC and mingw mode
since Clang 15. The unwind info gets which gets enabled automatically
by building with a new enough compiler.
For functions/trampolines that are implemented in assembly, the unwind
information needs to be provided by hand - in particular for cases
where unwinding should be diverted.
Contrary to AArch64, Clang got SEH assembler directives directly from
the start when SEH was implemented (when the __SEH__ compiler define
gets set), so there's no need for compiler version checks (like for
AArch64 in include/wine/asm.h), but the default check for __SEH__
works fine for enabling the __ARM_SEH() macro.
Use a custom unwind opcode in the private opcode space for unwinding
to a specific CONTEXT instead of up to the caller. (Contrary to
AArch64, there's no specific unwind opcode for restoring a full
CONTEXT, but the unwind opcode space does have a couple
unallocated values marked as "available", which can be used
for vendor specific needs here.)
This fixes unwinding in ARM PE builds.
Signed-off-by: Martin Storsjö <martin@martin.st>
2022-06-07 15:27:18 +02:00
Alexandre Julliard
8d0b3b0898
ntdll/tests: Add tests for high Unicode planes.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2022-06-06 20:46:24 +02:00
Nikolay Sivov
afdfb382d8
ntdll/tests: Add some tests for VM regions splitting.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
2022-06-06 12:16:33 +02:00