Denis Malikov
405ed2b4ce
[KERNEL32_VISTA][SDK] Import Threadpool.c from wine-9.7
2025-01-26 23:30:59 -08:00
Timo Kreuzer
d92f02e2e5
[CMAKE] Build host tools as Debug by default
...
This is to fix kmtests on Test WHS. Seemingly something is broken with release builds of host tools, at least on GCC x86.
2025-01-26 23:52:45 +02:00
Timo Kreuzer
efdda7f7d9
[APISETS] Use ucrtbase as the lord intended instead of msvcrt
2025-01-26 18:08:55 +02:00
Timo Kreuzer
41ffe7f3c6
[UCRTBASE] Add ucrtbase.dll to build
2025-01-26 18:08:55 +02:00
Timo Kreuzer
9f15d9ee57
[UCRT:MATH] Implement _dtest, _fdtest
2025-01-26 18:08:55 +02:00
Timo Kreuzer
59c55e003e
[UCRT:MATH] Implement _dclass, _fdclass
2025-01-26 18:08:55 +02:00
Timo Kreuzer
0133dba0c6
[CMAKE] Disable GCC builtin math functions
2025-01-26 18:08:55 +02:00
Timo Kreuzer
efe84ec41a
[UCRT] Add "aliases" for some hacked clang builtins
2025-01-26 18:08:55 +02:00
Timo Kreuzer
d74ab36324
[UCRTSUPPORT] Add ucrtsupport library
...
This library is compiled from our old CRT sources to supplement missing UCRT code.
2025-01-26 18:08:55 +02:00
Timo Kreuzer
82ef7b5df1
[CMAKE] Do not implicitly link libgcc/stdc++compat to msvcrt
...
This allows ucrtbase and modules linked to it to be linked to those helper libraries.
2025-01-26 18:08:55 +02:00
Timo Kreuzer
b09b5584e0
[UCRT:MATH] Implement math error support functions
2025-01-26 18:08:55 +02:00
Timo Kreuzer
8aab548ecd
[UCRT:VCRUNTIME] Implement __isa_available_init()
2025-01-26 18:08:55 +02:00
Timo Kreuzer
9c887efa0e
[UCRT:VCRUNTIME] Add initializer sections
...
Use #pragma section only for MSVC (and Clang-cl), because Clang doesn't like allocating non-const variables in a read-only section, while GCC doesn't understand these pragmas and ignores them.
2025-01-26 18:08:55 +02:00
Timo Kreuzer
4198ceb83a
[UCRT:VCRUNTIME] Implement vcruntime init stubs
2025-01-26 18:08:55 +02:00
Timo Kreuzer
4d80956566
[UCRT:VCRUNTIME] Implement __report_rangecheckfailure()
2025-01-26 18:08:55 +02:00
Timo Kreuzer
b0f3e623b7
[UCRT:VCRUNTIME] Implement __report_gsfailure()
2025-01-26 18:08:55 +02:00
Timo Kreuzer
5dcd1d1714
[UCRT:VCRUNTIME] Implement __security_init_cookie and __security_check_cookie
2025-01-26 18:08:55 +02:00
Timo Kreuzer
055875fbd8
[UCRT:FLOAT] Add _fltused
2025-01-26 18:08:55 +02:00
Timo Kreuzer
4462342076
[UCRT:STARTUP] Implement __scrt_uninitialize_crt stub
2025-01-26 18:08:55 +02:00
Timo Kreuzer
d21fd37650
[UCRT:LOCALE] Implement __acrt_WideCharToMultiByte
2025-01-26 18:08:55 +02:00
Timo Kreuzer
bd3c7654ec
[UCRT:LOCALE] Implement __acrt_MultiByteToWideChar
2025-01-26 18:08:55 +02:00
Timo Kreuzer
4ea1841f31
[UCRT:LOCALE] Implement __acrt_GetStringTypeW
2025-01-26 18:08:55 +02:00
Katayama Hirofumi MZ
a58bf95914
[SHELL32][SHELL32_APITEST][SDK] SHIsBadInterfacePtr ( #7664 )
...
Implementing missing features...
JIRA issue: CORE-19278
- Move function definition from
stubs.cpp to utils.cpp.
- Implement SHIsBadInterfacePtr
function in utils.cpp.
- Add prototype to <undocshell.h>.
2025-01-26 19:24:24 +09:00
Timo Kreuzer
bab23a250b
[ASM] Use macros instead of defines
...
Defines can cause problems, like previously with the end define, which caused a jump to label ".end" to be interpreted as a jump to ".", which is the current address, resulting in an infinite loop.
Remove obsolete CODESEG
2025-01-23 23:43:31 +02:00
Timo Kreuzer
f07ea94798
[UCRT] Fix build of memcpy_s.cpp
...
extern inline creates a global symbol on MSVC, but not on GCC. Use extern instead.
2025-01-22 18:56:08 +02:00
Timo Kreuzer
fea0f9243d
[UCRT] Remove __inline from conversion functions
...
Otherwise no actual symbols will be created.
2025-01-22 18:56:08 +02:00
Timo Kreuzer
13356a9001
[VCRUNTIME] Fix _rotl64/_rotr64 inline asm
...
%k is only valid for 32 bit operands.
2025-01-22 18:56:08 +02:00
Timo Kreuzer
9db517f324
[UCRT] Fix definition of _alloca for GCC/Clang
2025-01-22 18:56:08 +02:00
Timo Kreuzer
61175644d0
[UCRT] Add architecturally optimized code to build
2025-01-22 18:56:08 +02:00
Timo Kreuzer
a015b91e6b
[VCRUNTIME] Fix emmintrin.h for GCC
2025-01-22 18:56:08 +02:00
Timo Kreuzer
94eb475177
[UCRT][ASM] Make asm code GCC compatible
2025-01-22 18:56:08 +02:00
Timo Kreuzer
4fec953e6e
[UCRT][ASM] Rename all .asm files to .s
2025-01-22 18:56:08 +02:00
Timo Kreuzer
901cd2704c
[ASM] macamd64.inc: Fix up entry point macros a bit
...
This is the minimal version to be compatible with GAS. Code segment and NoPad could probably be added later, but they are not strictly required.
2025-01-22 18:56:08 +02:00
Timo Kreuzer
72aed01dbd
[ASM] Fix up some x86 assembly code
2025-01-22 18:56:08 +02:00
Timo Kreuzer
e2ffc35894
[UCRT] Fix/improve __crt_state_management
2025-01-22 18:56:08 +02:00
Timo Kreuzer
c2b1271dbe
[UCRT] Improve __crt_seh_guarded_call
...
This is a workaround for an MSVC compiler bug, which would result in degraded performance. See https://developercommunity.visualstudio.com/t/_local_unwind-generated-when-returning-f/10673261 ?
2025-01-22 18:56:08 +02:00
Timo Kreuzer
a58b713a5e
[UCRT] Properly implement __crt_fast_encode/decode_pointer
2025-01-22 18:56:08 +02:00
Timo Kreuzer
c1145f0c89
[UCRT] Properly implement parameter checking macros
...
Partly copied from corecrt_internal_strtox.h, partly imported from dotnet runtime (https://github.com/dotnet/runtime/blob/release/8.0/src/coreclr/pal/src/safecrt/internal.h )
2025-01-22 18:56:08 +02:00
Katayama Hirofumi MZ
bb7cf5a5b7
[FREETYPE][FTFD][NTGDI] Split FT_Bitmap_Convert hack ( #7628 )
...
Our FT_Bitmap_Convert function had a hack to make the
bitmap image compatible to ReactOS. I think the hack on
FT_Bitmap_Convert should be separated from our font
engine.
JIRA issue: CORE-16047
- Add FT_Bitmap_Convert_ReactOS_Hack function, that is
based on FT_Bitmap_Convert, and split the hack of
FT_Bitmap_Convert.
- Use FT_Bitmap_Convert_ReactOS_Hack in
IntGetBitmapGlyphWithCache function instead of
FT_Bitmap_Convert.
- Modify ftfd.spec to add
FT_Bitmap_Convert_ReactOS_Hack.
2025-01-22 10:57:40 +09:00
Whindmar Saksit
357505e752
[PSDK] Avoid CO_E_NOTINITIALIZED macro redefinition warning ( #7649 )
...
Addendum to commit 0e88f0485c
2025-01-21 19:15:09 +01:00
Katayama Hirofumi MZ
2186ce3d58
[SHELL32][SDK] Follow-up of #7622 ; LPWSTR to PWSTR etc.
...
And LPCWSTR to PCWSTR. CORE-19278
2025-01-20 10:12:35 +09:00
Katayama Hirofumi MZ
84607161b4
[SHELL32][SHELL32_APITEST][SDK] Implement SHGetUnreadMailCountW ( #7622 )
...
Implementing missing features...
JIRA issue: CORE-19278
- Modify shell32.spec.
- Move function definition from stubs.cpp into utils.cpp.
- Add SHELL_ReadSingleUnreadMailCount helper function.
- Add prototype to <shellapi.h>.
2025-01-20 09:51:27 +09:00
Katayama Hirofumi MZ
157e18b215
[SHELL32][SHELL32_APITEST][SDK] Implement StrRStrA/W ( #7621 )
...
Implementing missing features...
JIRA issue: CORE-19278
- Move function definitions from stubs.cpp to utils.cpp.
- Add prototypes to <undocshell.h>.
2025-01-20 08:50:26 +09:00
Katayama Hirofumi MZ
aa52c3f5eb
[SHELL32][SHELL32_APITEST][SDK] Implement SHEnumerateUnreadMailAccountsW ( #7619 )
...
Implementing missing features...
JIRA issue: CORE-19278
- Move function definition from stubs.cpp into utils.cpp.
- Add prototype to <shellapi.h>.
2025-01-20 08:32:07 +09:00
Katayama Hirofumi MZ
2da2fba042
[SHELL32][SHELL32_APITEST][SDK] Implement SHSetUnreadMailCountW ( #7620 )
...
Implementing missing features...
JIRA issue: CORE-19278
- Move function definition from
stubs.cpp into utils.cpp.
- Add prototype to <shellapi.h>.
2025-01-19 21:26:19 +09:00
Timo Kreuzer
dc25409cbf
[SPEC2DEF] Implement support for debug-only exports
2025-01-19 09:02:58 +02:00
Timo Kreuzer
a6a07059c1
[CRT] crtdbg.h: Add missing inttrin.h include for __debugbreak()
2025-01-19 09:02:58 +02:00
Timo Kreuzer
8a63d7e898
[CMAKE] Build host-tools as release by default
...
This setting can be overwritten by defining the CMake variable HOST_BUILD_TYPE.
The target build type is passed to the host build as TARGET_BUILD_TYPE CMake variable.
This improves time to build cab+iso:
MSVC x86: 37s -> 28s
GCC x86: 32s -> 16s
2025-01-19 09:02:58 +02:00
Timo Kreuzer
7a15da2a8c
[CMAKE] Fix definition of NDEBUG on MSVC release builds
...
Prevents redefinition warnings.
2025-01-19 09:02:58 +02:00
Timo Kreuzer
fe7a58d92e
[RTL] Update CountOfOwnedCriticalSections in the TEB
...
Useful for debugging.
Motivation: With SMP on x64 I found a number of instances where critical sections would be left abandoned, causing lockups. From what I can tell it was exceptions inside rpcrt4, which leave the process in a blocked state. Might or might not be related to x64 / SMP.
For real value, you still need to put checks at certain places manually, but this is not super straight forward, because there can be false positives, e.g. when a process is terminated due to an exception, where the abandoned lock is acceptable, and we have this during testing. It's difficult to 100% distinguish this from silent and very bad lock leaks.
Problematic code:
__try
{
SomeFunction(); // throws an exception with a CS held, e.g. heap code
}
__except(1)
{
DPRINT1("Oops. let's just pretend it's all ok!\n");
}
2025-01-18 21:15:17 +02:00