Jacek Caban
1a05b7da63
ntdll: Support device paths in LdrGetDllPath.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48698
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-25 15:26:33 +01:00
Zebediah Figura
340757c62a
ntdll: Report Unix mount points as Win32 mount points in NtQueryInformationFile().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 12:14:05 +01:00
Zebediah Figura
6b498d98a8
ntdll: Consider mount points to be reparse points in get_file_info().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 12:13:48 +01:00
Zebediah Figura
a20d8bda37
server: Store the real Unix path.
...
So that we can query the Unix symlink target from a file handle.
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 12:13:44 +01:00
Zebediah Figura
cd2e053237
ntdll: Fix the overflow check in read_changes_apc().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-23 11:37:20 +01:00
Gabriel Ivăncescu
e95d0813fd
ntdll: Store the default process activation context into the PEB.
...
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:25:55 +01:00
Gabriel Ivăncescu
caff74f369
include/winnt: Add more ACTCTX_COMPATIBILITY_ELEMENT_TYPE definitions and fix typo.
...
Signed-off-by: Gabriel Ivăncescu <gabrielopcode@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-19 13:18:02 +01:00
Serge Gautherie
71d8103190
ntdll/tests: Remove now useless forced 0x500 API versions.
...
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-18 16:40:21 +01:00
Alexandre Julliard
b408b07eae
ntdll: Support the sortkey file in NtGetNlsSectionPtr().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 15:18:57 +01:00
Francois Gouget
a909baeb4e
tests: Report all errors when failing to wait for a child process.
...
Report the line number where the test failed to wait for the child so
one can identify which child process did not behave as expected.
Also wait_child_process() is meant for the general case so report
all non-crash error cases as test failures so they are accounted for.
Omit the "winetest_" prefix to match the other Wine test functions and
so the underlying winetest_wait_child_process() function can be wrapped
with the usual line-capturing macros.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48651
Signed-off-by: Francois Gouget <fgouget@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-17 10:51:44 +01:00
Serge Gautherie
aa384d3642
tools: Remove 0x0501 API versions forced by winapi_test.
...
Signed-off-by: Serge Gautherie <winehq-git_serge_180711@gautherie.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-13 20:10:44 +01:00
Alexandre Julliard
33937344a0
ntdll: Fix heap validation when large heap blocks are present.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Zebediah Figura
6971fd2d61
server: Allow renaming a file to the same name.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Zebediah Figura
ee136f9832
ntdll: Check for an existing file on the server side.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Zebediah Figura
5b75d94304
ntdll/tests: Add tests for linking a file to the same name.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-12 21:18:18 +01:00
Paul Gofman
c6b501acdc
ntdll: Add semi-stub for RtlGetNativeSystemInformation().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=40334
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 22:58:16 +01:00
Alexandre Julliard
982f99d3d9
ntdll: Reimplement remaining string functions to avoid depending on wine/unicode.h.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 09:34:53 +01:00
Alexandre Julliard
295660b985
ntdll: Reimplement wcstol/wcstoul using the msvcrt code.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 09:34:53 +01:00
Alexandre Julliard
650c8e1434
ntdll: Don't handle the full Unicode character range in isw* functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 09:29:56 +01:00
Alexandre Julliard
1986328543
ntdll: Don't handle the full Unicode character range in wcsicmp/wcsnicmp.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 09:29:56 +01:00
Alexandre Julliard
5a4cc97a3b
ntdll: Don't handle the full Unicode character range in wcslwr/wcsupr.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 09:29:56 +01:00
Alexandre Julliard
0d6802dcc5
ntdll: Use the NLS case mapping table for towlower/towupper.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 09:29:56 +01:00
Alexandre Julliard
a1659db87f
ntdll/tests: Remove some workarounds for older Windows versions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-11 09:29:56 +01:00
Paul Gofman
3f0cbf4691
ntdll: Zero init reg_tzi in find_reg_tz_info().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48694
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-10 20:11:04 +01:00
Zebediah Figura
42b7bf0692
ntdll/tests: Test renaming a file to the same name.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 12:10:52 +01:00
Zebediah Figura
b2b4d1b0ec
include: Use public field names for FILE_RENAME_INFORMATION.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 12:10:52 +01:00
Jacek Caban
2d764e90dd
ntdll: Use module path as assembly path for manifests embedded in resources.
...
Fixes Office 2016 installer, which removes its .exe directory from load
path, but expects to be able to load files listed in manifest.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-09 12:10:52 +01:00
Zebediah Figura
4e044ff0d9
ntdll/tests: Add more tests for DOS to NT path conversion.
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:52:28 +01:00
Zebediah Figura
ef7283a02d
ntdll/tests: Use wide character string literals in test_RtlDosPathNameToNtPathName_U().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:52:26 +01:00
Zebediah Figura
ddbea051c9
ntdll/tests: Separate invalid name tests for RtlDosPathNameToNtPathName_U().
...
Signed-off-by: Zebediah Figura <zfigura@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-05 19:52:24 +01:00
Alexandre Julliard
ab9fe967f1
ntdll: Reimplement IdnToUnicode() using the normalization table and the ntdll helpers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:24 +01:00
Alexandre Julliard
01237d0896
ntdll: Reimplement IdnToAscii() using the normalization table and the ntdll helpers.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:24 +01:00
Alexandre Julliard
cd13557f48
ntdll: Reimplement IdnToNameprepUnicode() using the NLS normalization table.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:24 +01:00
Alexandre Julliard
35c223850e
ntdll: Delay NFC table loading on macOS.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48689
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-03-03 13:20:24 +01:00
Alexandre Julliard
4aebd6a95f
ntdll: Allow final null in RtlNormalizeString() even if 0 is an invalid character.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-28 16:39:01 +01:00
Alex Henrie
9c11de6b79
ntdll/tests: Add more tests for RtlIpv6StringToAddress.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-24 19:20:55 +01:00
Brendan Shanks
360b7ec299
ntdll: Add system family and SKU to generated SMBIOS tables.
...
Signed-off-by: Brendan Shanks <bshanks@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 13:48:44 +01:00
Alexandre Julliard
e7eaa1a857
unicode: Remove no longer used normalization tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 13:48:44 +01:00
Alexandre Julliard
3e6b15c7b5
ntdll: Implement RtlIsNormalizedString().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 13:48:44 +01:00
Alexandre Julliard
64dc42e34f
ntdll: Use external NLS files for Unicode normalization.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-21 13:48:44 +01:00
Alexandre Julliard
c388ad357a
wine.inf: Add registry keys for normalization forms.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-18 11:23:40 +01:00
Paul Gofman
fc8e9bac5f
ntdll: Report rdtsc processor feature if supported.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48386
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 20:26:56 +01:00
Paul Gofman
9689d07740
ntdll: Fill NumberOfPhysicalPages field in user shared data area.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48387
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 20:26:45 +01:00
Alexandre Julliard
2b9d720ea0
unicode: Take into account explicit composition exclusions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:04:59 +01:00
Alexandre Julliard
30f298f5db
unicode: Remove non-starter and compatibility compositions from the table.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:04:59 +01:00
Alexandre Julliard
fdc89e02e6
ntdll: Add support for Hangul Unicode normalization.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:04:59 +01:00
Alexandre Julliard
64e6d72284
unicode: Add support for high Unicode planes in composition tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:04:59 +01:00
Alexandre Julliard
c658731975
unicode: Add support for high Unicode planes in decomposition tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 15:04:59 +01:00
Alexandre Julliard
148f564d10
unicode: Add support for high Unicode planes to the combining class table.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 13:49:05 +01:00
Alexandre Julliard
0f2e88b0b2
unicode: Copy the composition table to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 10:30:06 +01:00
Alexandre Julliard
4dab9bc04b
unicode: Move the compatibility decomposition table to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-17 10:29:47 +01:00
Nikolay Sivov
dec6abf754
ntdll: Add missing spec file entry for TpStartAsyncIoOperation().
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-16 20:54:03 +01:00
Rémi Bernon
7332de64a5
server: Validate status in continue_debug_event.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-13 21:42:44 +01:00
Alex Henrie
cdda133210
ntdll/tests: Add more tests for RtlIpv6StringToAddress.
...
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-13 16:44:24 +01:00
Alexandre Julliard
9f9984966a
ntdll: Add more error mappings.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-13 16:44:23 +01:00
Alexandre Julliard
f7ec4d076d
ntdll: Add script to generate the error mapping list.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-13 16:44:23 +01:00
Nikolay Sivov
480d8b8253
kernel32: Add StartThreadpoolIo() stub.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 16:54:03 +01:00
Nikolay Sivov
b2f5b03429
ntdll: Add threadpool stack information exports.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 16:54:03 +01:00
Rémi Bernon
03d1a9c68e
ntdll/tests: Fix some format-overflow warnings.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 16:54:03 +01:00
Alexandre Julliard
f55637dc1b
ntdll: Don't allow unsupported codepages as Unix codepage.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-12 16:54:03 +01:00
Alexandre Julliard
9b01eda7c8
ntdll: Use external codepage tables for the Unix codepage too.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 09:15:19 +01:00
Alexandre Julliard
fb316c3377
unicode: Generate nls files for the codepage tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 09:06:45 +01:00
Alexandre Julliard
42a30a693a
makefiles: Move l_intl.nls to a new nls directory.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-11 09:05:33 +01:00
Alexandre Julliard
44ce5d9283
unicode: Support fetching a zip containining the data files.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-09 09:48:42 +01:00
Andrew Wesie
64d70b103d
ntdll: Add NtQueryVirtualMemory(MemoryWorkingSetExInformation).
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45667
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-07 13:25:37 +01:00
Dmitry Timoshkov
bbd73667d7
ntdll: Split logic for MemoryBasicInformation into a separate function.
...
Signed-off-by: Andrew Wesie <awesie@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-07 13:14:07 +01:00
Kevin Puetz
b6e91fa44b
ntdll: Allow NULL lpAssemblyDirectoryName in find_actctx_dll.
...
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:32:00 +01:00
Rémi Bernon
544fd9504a
ntdll: Process system APCs while the signals are blocked.
...
This makes sure that system APC, such as APC_BREAK_PROCESS do not get
interrupted in the middle of their execution, and that the APC
completion notification is always correctly sent back to the caller.
Otherwise DbgBreakProcess sometimes did not return until
WaitForDebugEvent/ContinueDebugEvent are called, because of a race
condition between the APC servicing thread, and the newly created
exception thread.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:26 +01:00
Rémi Bernon
2dc99bfb30
ntdll: Handle system APCs in a separate inner loop.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:24 +01:00
Rémi Bernon
3ffa355d2b
ntdll: Use the status to tell user APC from system APC.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:21 +01:00
Rémi Bernon
6cb2336217
ntdll: Reorder code to make the select logic clearer.
...
The wait_select_reply call may return STATUS_USER_APC/STATUS_KERNEL_APC,
depending on which APC is about to be returned but the apc call will
always be APC_NONE right after the wait. It needs an additional select
request to actually return the call.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:18 +01:00
Rémi Bernon
676ad9b0af
server: Use STATUS_KERNEL_APC to indicate system APCs.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-05 21:28:15 +01:00
Alexandre Julliard
6346809302
unicode: Move the combining class table to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:26 +01:00
Alexandre Julliard
cd8eaef47e
unicode: Avoid copying the decomposition data when not necessary.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-04 21:30:26 +01:00
Alexandre Julliard
a7cc191aa8
ntdll: Fix estimated buffer sizes in RtlNormalizeString().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 20:48:03 +01:00
Alexandre Julliard
dcd195e0f1
ntdll: Add parameter checking in RtlNormalizeString().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 19:20:39 +01:00
Alexandre Julliard
cc300a20b3
libport: Move Unicode normalization implementation to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-02-03 19:20:39 +01:00
Zebediah Figura
b41ab972ec
ntdll: Support the %I format modifier.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:20:42 +01:00
Zebediah Figura
9c3dcdfb6c
ntdll/tests: Add more tests for printf format specifiers.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-31 10:20:39 +01:00
Rémi Bernon
d03420da12
ntdll: Don't change RtlWaitOnAddress size after user invoke_apc.
...
This makes the next iteration to immediately return STATUS_SUCCESS
because of compare_addr returning FALSE with size == 0.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:42:16 +01:00
Alexandre Julliard
c599ec1494
libwine: Make some loader functions obsolete.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:14:54 +01:00
Alexandre Julliard
39138478fd
libwine: Make some functions obsolete.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-29 20:14:54 +01:00
Alexandre Julliard
4b5c67ee0b
unicode: Remove case mappings that don't round-trip.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-23 21:11:29 +01:00
Zhiyi Zhang
e41547c548
ntdll: Fix some Rtl* functions having wrong calling convention.
...
Signed-off-by: Zhiyi Zhang <zzhang@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-16 12:21:11 +01:00
Alex Henrie
42525d8516
ntdll/tests: Fix expected RtlIpv6StringToAddress terminator output.
...
The "broken" function was applied to the wrong condition in the "ok"
statement (RtlIpv6StringToAddress is supposed to set the terminator to
the first character after the address, not the second-to-last character
of the address). However, since this test is already being skipped on XP
and Vista and we really don't need a test for how exactly XP and Vista
are broken, we can just delete it.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-05 17:34:52 +01:00
Zebediah Figura
230a09b707
ntdll: Fix a typo in get_current_directory().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48415
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-05 17:34:17 +01:00
Alexandre Julliard
d96331d830
ntdll: Make loop counter signed.
...
Spotted by Gianfranco Costamagna.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48398
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-04 11:22:08 +01:00
Zebediah Figura
7662fe0b47
ntdll/tests: Fix some exception test failures.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-02 19:16:02 +01:00
Zebediah Figura
d409ef0188
ntdll: Avoid debug traces in _vsnprintf().
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2020-01-02 17:39:28 +01:00
Zebediah Figura
3b09a6b1bc
ntdll/tests: Fix some test failures with Windows 10.
...
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-30 21:11:45 +01:00
Alexandre Julliard
aeab1b2a6b
ntdll: Fix memory leak in RtlNormalizeString().
...
Spotted by Piotr Caban.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-30 21:11:38 +01:00
Alexandre Julliard
ddb6f150e1
ntdll: Fix memory corruption in RtlNormalizeString().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 17:58:34 +01:00
Rémi Bernon
5eca6ffa8b
ntdll: Start find_free_area from address_space_start instead of 0.
...
The search was initiated with base == 0, which returns NULL immediately
if MEM_TOP_DOWN is not used. Use address_space_start instead.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47974
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:11:19 +01:00
Rémi Bernon
1a44ef3237
ntdll: Replace incorrect find_free_reserved_area function call.
...
This introduces map_free_area function which tries mapping the expected
free areas until it finds one that succeeds. It now also works for
memory regions outside of the reserved region, but could probably be
improved.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:11:16 +01:00
Rémi Bernon
cec83fede4
ntdll: Split view search initialization to find_view_inside_range function.
...
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:11:08 +01:00
Rémi Bernon
d840d7852b
ntdll: Rename find_free_area to find_reserved_free_area.
...
We used this function to find free areas outside of the reserved range,
and it's obviously incorrect as there can be some system or external
memory mapping we don't know about.
Signed-off-by: Rémi Bernon <rbernon@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-27 11:03:19 +01:00
Zebediah Figura
347b3b42fe
ntdll/tests: Remove a no longer reliable test.
...
On Windows 10 version 1607, a process called "Memory Compression" violates this
invariant.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-26 22:08:32 +01:00
Dmitry Timoshkov
b95d2f553c
ntdll: Use default casemap and codepage file names if the value in registry is empty.
...
This helps to keep compatibility with old prefixes being reused for wine-5.0.
Old prefixes in their registry have
[System\\CurrentControlSet\\Control\\Nls\\Codepage]
"37"=""
[System\\CurrentControlSet\\Control\\Nls\\Language]
"0409"=""
and this leads to LCMapString(LCMAP_LOWERCASE/LCMAP_UPPERCASE) return garbage.
This is a regression caused by 94a3add0ea
.
Signed-off-by: Dmitry Timoshkov <dmitry@baikal.ru>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-24 20:21:11 +01:00
Erich E. Hoover
94675cd8e3
ntdll: Drop support for floating point numbers in sscanf.
...
Takes care of one more use of "long double".
Signed-off-by: Erich E. Hoover <erich.e.hoover@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-23 10:51:08 +01:00
Alexandre Julliard
238c6be5b8
ntdll: Silence the timezone fixme when the registry is empty.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48300
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 19:39:14 +01:00
Alexandre Julliard
f391ae901e
ntdll: Fix loading the main binary as PE file with an explicit dll override.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-17 16:55:15 +01:00
Alexandre Julliard
8b0a7b2503
ntdll: Fix RtlQueryUnbiasedInterruptTime() prototype.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48239
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 18:44:57 +01:00
Zebediah Figura
18c3c2c78b
ntdll: Return -1 from Unix code page conversion functions if an error was encountered.
...
If 0 is returned, the caller has no way of determining this. This fixes a
test failure in kernel32:change introduced by f46fa9c92
.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-16 11:57:27 +01:00
Paul Gofman
74a74556dd
server: Support creating processes with specified parent.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=47817
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-13 13:13:36 +01:00
Francois Gouget
101be282a6
ntdll: Fix the spelling of some comments.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-12 23:17:05 +01:00
Alexandre Julliard
6731f33d40
ntdll: Add status code for ELOOP error.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-11 21:51:28 +01:00
Alexandre Julliard
30e5f1215e
kernel32: Remove __wine_kernel_init().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-10 18:24:32 +01:00
Nikolay Sivov
a5bc81ebe5
ntdll/tests: Enable some more string API tests.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-09 23:47:45 +01:00
Alexandre Julliard
5de7b6a159
ntdll: Fix contents of the glyph table in generated codepage data.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 22:30:23 +01:00
Alexandre Julliard
117dbfa2cf
ntdll: Fix DBCS mappings in RtlCustomCPToUnicodeN().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-06 19:50:06 +01:00
Paul Gofman
923e62eb55
ntdll: Add DECLSPEC_HOTPATCH to NtProtectVirtualMemory().
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48077
Signed-off-by: Paul Gofman <gofmanp@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:57:13 +01:00
Alexandre Julliard
331947c993
kernel32: Move some initialization code to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Alexandre Julliard
d33504b9bb
kernel32: Use the Rtl UTF8 conversion functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Alexandre Julliard
f46fa9c92d
ntdll: Use the Rtl UTF8 conversion functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Alexandre Julliard
27f0426b6f
ntdll: Implement RtlUTF8ToUnicodeN.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Alexandre Julliard
0b39344ef0
ntdll: Reimplement RtlUnicodeToUTF8N.
...
This avoids relying on wine_utf8_wcstombs().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-04 16:03:48 +01:00
Nikolay Sivov
b0951ba860
ntdll: Add support for querying thread suspend count.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 21:27:14 +01:00
Nikolay Sivov
7082ebc608
ntdll: Use better type for thread description info structure.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 21:27:14 +01:00
Alexandre Julliard
bba33e5391
ntdll: Get rid of __wine_init_codepages().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Alexandre Julliard
3ebe447507
ntdll: Reimplement Unicode case mapping functions using the Win32-format tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Alexandre Julliard
dd572e9a2d
ntdll: Reimplement Unicode to multibyte conversion functions using the Win32-format tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Alexandre Julliard
e13c4d859e
ntdll: Reimplement multibyte to Unicode conversion functions using the Win32-format tables.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Alexandre Julliard
b7fcb956ef
ntdll: Avoid memory allocations in RtlUpcaseUnicodeString functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Alexandre Julliard
0e97fe86fd
ntdll: Implement custom codepage conversion functions.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-03 09:30:43 +01:00
Anastasios Simeonidis
0b6c3a4460
ntdll/tests: Add relationship tests for NtQuerySystemInformationEx.
...
Signed-off-by: Anastasios Simeonidis <symeonidis@csd.auth.gr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 22:02:56 +01:00
Anastasios Simeonidis
440a06f7f5
ntdll: Implement relationship filtering for create_logical_proc_info on linux.
...
Also calculate all_cpus_mask on first pass.
Signed-off-by: Anastasios Simeonidis <symeonidis@csd.auth.gr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 22:02:56 +01:00
Anastasios Simeonidis
9885b0acbb
ntdll: Move relationship filtering to create_logical_proc_info.
...
Signed-off-by: Anastasios Simeonidis <symeonidis@csd.auth.gr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-12-02 22:02:56 +01:00
Alexandre Julliard
dd73223289
ntdll: Remove trailing \n in fatal_perror() calls.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-29 17:50:48 +01:00
Chip Davis
289d456dd6
ntdll: Fix tick count calculation on Mac.
...
Inspired by a patch by Andrew Eikum.
macOS's mach_absolute_time() stops counting when the computer goes to
sleep/suspend/hibernate/etc. However, Windows's GetTickCount() does not
stop counting. mach_continuous_time() matches Windows's behavior.
BSD's CLOCK_MONOTONIC already counts asleep time.
Unfortunately, there is no clock source on Linux which does exactly what
we want. CLOCK_MONOTONIC_RAW is unaffected by NTP adjustment, but like
mach_absolute_time() doesn't keep ticking when the computer is asleep.
CLOCK_BOOTTIME does keep ticking, but it is affected by NTP adjustments.
CLOCK_MONOTONIC has both problems. What's needed is a
CLOCK_BOOTTIME_RAW, which would not be slewed by adjtimex(2) and would
count time spent asleep.
To avoid issues with skew and performance, this patch falls back to
mach_absolute_time() on macOS if mach_continuous_time() is unavailable.
Note that mach_continuous_time() was introduced in macOS 10.12, meaning
that if the minimum version required is less than that, it will be
linked weakly. Therefore we must check that it is nonnull before
attempting to call it.
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Huw Davies <huw@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-28 20:45:46 +01:00
Alexandre Julliard
f206081241
ntdll: Keep a valid DOS name if the initial current directory is a Unix dir.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48114
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-28 20:45:46 +01:00
Alexandre Julliard
1902ab4d85
ntdll: Don't fail to load data file when the registry key is missing.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48188
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-28 10:06:25 +01:00
Gijs Vermeulen
9bd292127e
ntdll: Fix implicit declaration of mach_port_deallocate.
...
Signed-off-by: Gijs Vermeulen <gijsvrm@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-27 22:05:09 +01:00
Chip Davis
0d1029e829
ntdll: Fix macOS build.
...
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 22:49:03 +01:00
Alexandre Julliard
ea20035272
ntdll: Generate a Windows format codepage table using the libwine data.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 20:43:52 +01:00
Alexandre Julliard
c0ff49061f
ntdll Implement RtlInitNlsTables() and RtlResetRtlTranslations().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 20:43:52 +01:00
Alexandre Julliard
9ae5717ba6
ntdll: Implement RtlInitCodePageTable().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 20:43:52 +01:00
Alexandre Julliard
f5c4a89cf2
ntdll: Implement NtGetNlsSectionPtr().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 18:03:16 +01:00
Nikolay Sivov
b934f6626e
ntdll: Implement thread description as information class.
...
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-26 16:32:32 +01:00
Chip Davis
eea87600d2
ntdll: Implement SystemBatteryState for Mac OS.
...
Signed-off-by: Chip Davis <cdavis@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-25 20:47:43 +01:00
Francois Gouget
ca577af1bc
ntdll: S/4Gb/4GB/ in a comment since it refers to bytes.
...
Signed-off-by: Francois Gouget <fgouget@free.fr>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 19:01:10 +01:00
Alexandre Julliard
c77cb5a5f7
ntdll: Handle version parsing in Unicode.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 19:01:10 +01:00
Alexandre Julliard
fd588a22b7
kernel32: Move string normalization functions to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-21 10:43:46 +01:00
Alexandre Julliard
f1bfd2c0b1
ntdll: Initialize the system and user locales directly in ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 16:25:16 +01:00
Alexandre Julliard
599deed91c
ntdll: Fix counting of environment strings.
...
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=48141
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-20 16:25:16 +01:00
Alexandre Julliard
7ac7a902c8
ntdll: Implement RtlLocaleNameToLcid().
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 23:15:04 +01:00
Alexandre Julliard
4538a137e0
ntdll: Move locale functions to a new locale.c file.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-19 23:15:04 +01:00
Alexandre Julliard
dad14ab833
ntdll: Support SystemPerformanceInformation on non-Linux platforms.
...
Based on the GlobalMemoryStatusEx implementation.
2019-11-19 23:15:04 +01:00
Alexandre Julliard
eee3a4e84a
kernel32: Move support for starting Unix processes to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Alexandre Julliard
1deefb84ee
kernel32: Use RtlCreateUserProcess() to start new processes.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-12 22:05:58 +01:00
Alexandre Julliard
83e520f556
kernel32: Move exec process functionality to ntdll.
...
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-11 22:58:00 +01:00