Commit graph

859 commits

Author SHA1 Message Date
Timo Kreuzer
c507b701ab [CRT:MATH] Import frexp from musl 2025-06-30 09:19:47 +00:00
Timo Kreuzer
b734e3ba63 [CRT:MATH] Move some math functions from ucrt to crt 2025-06-30 09:19:47 +00:00
Timo Kreuzer
a9ee20cb9a [CRT:MATH] Import nextafter, nextafterf and nexttowardf from musl
Note: On Windows, where a long double is the same as a double, nextafterl is the same as nextafter, nexttowardl is the same as nexttoward.
Also nexttoward is the same as nextafter.
2025-06-30 09:19:47 +00:00
Timo Kreuzer
5c26ccdb29 [CRT:MATH] Import scalbn/scalbnf from musl 2025-06-30 09:19:47 +00:00
Timo Kreuzer
3f71ab80ad [CRT:MATH] Implement _isnan and _isnanf 2025-06-30 09:19:47 +00:00
Timo Kreuzer
e01231bd49 [CRT:MATH] Implement _finite, _finitef 2025-06-30 09:19:47 +00:00
Timo Kreuzer
50028685dc [CRT:MATH] Implement _dsign and _dsignf 2025-06-30 09:19:47 +00:00
Timo Kreuzer
0e5d6af68e [CRT:MATH] Implement x86 sse2 math functions
These are just wrappers around the normal functions and lack any optimization.
2025-06-30 09:19:47 +00:00
Timo Kreuzer
5c6912f561 [CRT][UCRTBASE] Add round/roundf 2025-06-30 09:19:47 +00:00
Timo Kreuzer
d736b55644 [CRT:MATH] Fix a bug in _handle_error 2025-06-30 09:19:47 +00:00
Timo Kreuzer
35bc1e1d9e [CRT] Add crtmath library 2025-06-30 09:19:47 +00:00
Hermès Bélusca-Maïto
db96138813
[SDK][KERNELBASE][PATHCCH] Compile a collection of PathCch libraries (#8085)
CORE-12686

This collection of libraries consist in:

- a down-level `pathcch_static` PathCch library, to be used for programs
  that need to run on Windows 7 and below;

- Windows 8+ compatible libraries importing from either kernelbase.dll
  (`pathcch_kernelbase`), or from the corresponding APISET
  api-ms-win-core-path-l1-1-0.dll (`pathcch`, which is Win8+ PSDK
  compatible).

The down-level static library is compiled by reusing the newly-introduced
kernelbase's path.c, instead of using a specific pathcch.c.
Unrelated functions are excluded from compilation by putting them into
`#ifndef STATIC_PATHCCH ..... #endif` blocks.
2025-06-24 16:48:03 +02:00
Hermès Bélusca-Maïto
8ed6ec437b
[SDK] Move pathcch.h to the PSDK (#8085)
CORE-12686
2025-06-24 16:47:56 +02:00
Timo Kreuzer
d5286af2e1 [NTDLL_VISTA] Export RtlLcidToLocaleName and RtlLocaleNameToLcid 2025-06-19 17:36:40 +00:00
Timo Kreuzer
e431470ff9 [REACTOS] Fix build with VS 17.14.2 / CL 19.44.35207.1 2025-05-31 09:51:33 +00:00
Katayama Hirofumi MZ
e43e639c30
[CICERO] Move sdk/lib/cicero to base/ctf/cicero (#8055)
The CTF modules depend on Cicero
static library. Cicero should be a
component in CTF.
This move will improve code
readability and grep-ability.
JIRA issue: CORE-19361
JIRA issue: CORE-19363
- Move sdk/lib/cicero to base/ctf/cicero.
- Adapt CMakeLists.txt to this move.
- No code content change except
  CMakeLists.txt.
2025-05-30 22:17:09 +09:00
Hervé Poussineau
f4992a4484 [RTL] Fix prototypes of RtlCreateUserSecurityObject and RtlCreateAndSetSD 2025-05-26 21:29:30 +02:00
Hermès Bélusca-Maïto
f20efc6007
[INCLUDE][ATL] Fix WM_SETHOTKEY macro wrappers
WM_SETHOTKEY / WM_GETHOTKEY messages encode the hotkey in a different
way than with the WM_HOTKEY message.
For more details, see:
https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-gethotkey
https://learn.microsoft.com/en-us/windows/win32/inputdev/wm-sethotkey

Addendum to commit 6829350af9 (PR #7947)
2025-05-08 18:57:43 +02:00
Katayama Hirofumi MZ
2c475add8c
[IMM32][NETAPI32][SDK] Reduce Wine dependency (#7912)
Related to #7870. netapi32.dll uses NDK.
So, we have to reduce dependency on Wine.
JIRA issue: CORE-5743
- Introduce wine2ros module in
  sdk/lib/wine2ros/.
- Reduce Wine dependency.
2025-05-06 09:59:47 +09:00
Hermès Bélusca-Maïto
005f75bd61
[RTL] x64/ARM: Alias RtlpBreakWithStatusInstruction to DbgBreakPointWithStatus; x64: fix a bug.
RtlpBreakWithStatusInstruction is just a label for KD.

On machines that have register calling conventions (basically all except
x86), the `Status` parameter for `DbgBreakPointWithStatus` is stored in
the first argument register.

https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-dbgbreakpointwithstatus

On the x64 platform, `DbgBreakPointWithStatus` only uses the ECX register
and leaves EAX untouched. Verified on Windows.
2025-04-19 20:01:08 +02:00
Hermès Bélusca-Maïto
a7d86fe3a7
[NTOS][RTL] Remove unused deprecated ReactOS-only DbgBreakPointNoBugCheck()
This helper was introduced in commit b041530f2d (r8551), and its
last remaining usage removed in commit f038f4a895 (r23636).
2025-04-19 20:01:06 +02:00
Timo Kreuzer
52719b52ae [VCRUNTIME] Fix a bug in x64 __security_init_cookie 2025-04-07 13:57:17 +00:00
Oleg Dubinskiy
9aa299bea4
[MMIXER] Don't stop audio devices enumeration when one or more of them failed to initialize (#7863)
Skip unsuccessfully initialized devices and continue enumeration until all of devices are enumerated.
Patch by Johannes Anderwald with additional improvements from me.
This fixes 0 audio devices detected for HD audio controllers (e. g., Realtek), and hence allows to properly detect all available devices and play the sound with MMixer routines enabled (they are currently default).
Tested personally with Realtek HD Audio driver version R2.74 for Windows XP/Server 2003 in pair with hdaudbus.sys from Windows Vista SP2 on real hardware.
CORE-17285
2025-04-06 10:55:55 +02:00
Katayama Hirofumi MZ
1e6e5529c6
[FREETYPE][FTFD][DOC] Update FreeType to 2.10.0 from 2.9 (#7786)
Modernize font engine modules.
JIRA issue: CORE-16084
- Update FreeType to 2.10.0 from 2.9.
- Delete useless files.
- Add technical notes (TechNote.txt) on freetype.
- DbgPrint became FT_Message.
2025-04-04 20:50:25 +09:00
Mark Jansen
db9768f25d [PSDK] Add EmptyVC.idl 2025-03-26 13:58:40 +01:00
Mark Jansen
5ec739bf2e [RTL] Change comment to indicate a hack 2025-03-25 16:23:39 +01:00
Mark Jansen
08d575adf9 [RTL] Notify verifier when freeing the process page heap 2025-03-25 16:23:39 +01:00
Mark Jansen
5821136dfa [AVRF] Hook up debug functions, add noisy stub for AVrfpGetStackTraceAddress 2025-03-25 16:23:39 +01:00
Mark Jansen
a7a504a466 [SDK] Add avrf stop codes and VERIFIER_STOP macro 2025-03-25 16:23:39 +01:00
Timo Kreuzer
e01c32f3bd [RTL] Implement locale functions/tables
The locale table is currently hardcoded in rtl. On Vista+ (and Wine) this table is part of locale.nls, but we don't have that yet.
2025-03-25 09:55:17 +00:00
Timo Kreuzer
5b633d64f1 [UCRTBASE] Build without debug exports
Windows ships ucrtbase without debug exports and ucrtbased with debug exports. The wine test tests ucrtbase and loads it dynamically in some cases. Compiling it with _DEBUG requires it to be linked to ucrtbased, which causes problems, because it also dynamically loads ucrtbase, which will cause it to crash.
2025-03-24 23:02:06 +00:00
Timo Kreuzer
f81c82f5fa [VCSTARTUP] Implement atexit and _onexit
These must use a local table and cannot use the one from ucrtbase.
The table is initialized with a .CRT section initializer.
2025-03-24 23:02:06 +00:00
Timo Kreuzer
fce48c3014 [OLDNAMES] Fix up for ucrtbase
Some old names redirect to functions that are not exported by ucrtbase. Place them into a seperate asm file, so that they don't get pulled in, when any of the other ones is referenced.
2025-03-24 23:02:06 +00:00
Timo Kreuzer
5abc69f31d [PSEH] Make x64 PSEH independent of SDK headers 2025-03-24 23:02:06 +00:00
Doug Lyons
45ed1a9b6d
[UCRT] Fix MSVC compiling on VS 2017 after Timo's UCRT commits (#7718)
CORE-19996
Verified using https://godbolt.org.
2025-02-15 20:03:52 -06:00
Timo Kreuzer
166d83b206 [CRT] Fix cvt to not overflow the buffer on NAN/INF
Fixes crash in msvcrt_winetest printf
2025-02-12 16:54:45 +02:00
Timo Kreuzer
92d479a54b [VCRUNTIME] Add initialization / cleanup of wine code 2025-02-06 09:17:37 +02:00
Timo Kreuzer
32c349d30e [VCRUNTIME] Add TLS callback support 2025-02-06 09:17:37 +02:00
Timo Kreuzer
7f050e0a6d [VCRUNTIME] Improve includes in internal_shared.h 2025-02-06 09:17:37 +02:00
Timo Kreuzer
a978879ddb [VCSTARTUP] Implement (w)mainCRTStartup
__acrt_initialize is here as a stub to later support linking ucrt statically. When it is statically linked the real function should be called, but when the executable links to ucrtdll, the initialization happens when the DLL is loaded, so we call a stub here.
2025-02-06 09:17:37 +02:00
Timo Kreuzer
d243b6cdf3 [VCRUNTIME] Implement __std_terminate() 2025-02-06 09:17:37 +02:00
Timo Kreuzer
9186b861a6 [VCRUNTIME][VCSTARTUP] Add separate vcruntime and vcstartup lib
vcruntime contains the code that is linked into ucrtbase (in VS it is also provided as vcruntime140.dll)
vcstartup contains the code that is statically linked into executables that link to ucrtbase.dll. In Visual Studio this is part of msvcrt.lib (the import library for msvcrt), similar to our current msvcrtex, and it gets linked when you link to ucrtbase as well. The name is based on the folder name in the library.
Both libraries share some code, but each file is only compiled once.
2025-02-06 09:17:37 +02:00
Max Korostil
2b2bdabe72
[RTL][NTDLL_APITEST] Fix buffer overflow in RtlDosSearchPath_Ustr (#7698)
In addition:
- `IS_PATH_SEPARATOR(*--End)` -> `--End; IS_PATH_SEPARATOR(*End)` fix,
- Use SIZE_T type for `WorstCaseLength` and `NamePlusExtLength`.
2025-02-05 21:17:11 +01:00
Timo Kreuzer
aa46e0f0a7 [RTL/x64] Fix a bug in RtlpUnwindInternal
Check if the stack pointer is out of bounds, before trying to unwind a frame. This will not fix any crashes, but it prevents simple crashes from going into a recursive exception.
2025-02-04 09:00:35 +02:00
Timo Kreuzer
ae0fa8ba49 [UCRTSUPPORT] Add wine c++ exception code 2025-01-28 22:50:04 +02:00
Timo Kreuzer
e2d69ad98c [CRT] Split MSVC C++ aliases from cpp.s to cpp_alias.s 2025-01-28 22:50:04 +02:00
Katayama Hirofumi MZ
fe11f7a2e5
[REACTOS] Refresh old URLs (#7632)
URLs are getting old. We have to
update URLs for documentation
purpose.
JIRA issue: CORE-19963
- Refresh old URLs.
- Add " (DEAD_LINK)" labels
  to dead links.
- Use MS Learn links rather
  than MSDN ones.
- Some dead links revived by
  Web Archive.
- Don't change Wine Tests
  and Wine Sync.
- Don't change 3rd party libraries.
- Don't append "redirected" labels.
2025-01-28 13:36:45 +09:00
Justin Miller
0bf42067d2 [KERNEL32][ROSTESTS][SDK] Enable threadpooling
[NTDLL] Init KeyedEvents even on NT5.2 dll_export
[MEDIA] Update winesync.txt accordingly
[SDK][DLL] Initialize crtical sections at runtime
2025-01-26 23:30:59 -08:00
Denis Malikov
405ed2b4ce [KERNEL32_VISTA][SDK] Import Threadpool.c from wine-9.7 2025-01-26 23:30:59 -08:00
Timo Kreuzer
efdda7f7d9 [APISETS] Use ucrtbase as the lord intended instead of msvcrt 2025-01-26 18:08:55 +02:00