Commit Graph

4588 Commits

Author SHA1 Message Date
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
Piotr Caban b4ec402859 ntdll: Work around futimens weak linking problem in set_file_times.
Newer XCode versions are weak linking to futimens function. Because of
that Wine will crash trying to execute the function on Mac OS <= 10.12.

Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 21:49:53 +01:00
Alexandre Julliard b0199ea2fe ntdll: Load the main binary directly in ntdll when possible.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 19:24:19 +01:00
Alexandre Julliard 608d086f1b ntdll: Move some initializations out of thread_init().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 17:05:56 +01:00
Alexandre Julliard b7db0b52ce ntdll: Initialize earlier things that need the executable name.
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 16:54:31 +01:00
Zebediah Figura 3ede217e5c ntdll: Fix a typo.
Signed-off-by: Zebediah Figura <z.figura12@gmail.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 14:10:14 +01:00
Alexandre Julliard 051a8ddd04 ntdll: Support running .exe.so binaries in RtlCreateUserProcess().
Signed-off-by: Alexandre Julliard <julliard@winehq.org>
2019-11-07 12:34:28 +01:00