[MSVCRT] Import msvcrt from wine-10.0#8204
Merged
tkreuzer merged 33 commits intoreactos:masterfrom Dec 30, 2025
Merged
Conversation
a43c2bd to
4c73cfc
Compare
feec79a to
4856cc5
Compare
4856cc5 to
f21ee2f
Compare
989105c to
e79d0aa
Compare
bec6cf7 to
c124a02
Compare
Bypass the wine wrappers, and comment out _fpclass and ldexp in math.c, because our own functions work better.
- Add _mbcasemap, __p__mbcasemap, _fileinfo, __p__fileinfo, _get_fileinfo, _set_fileinfo, _get_winver - Add strtoll and strtoull import symbols - Add CrtDbgReport* - Enable a few stubs
Fixes crash in msvcrt_apitest:wctomb
Use our own instead
This is a bad idea and breaks tests.
This fixes a number of failures of cmd_winetest batch.
- Fix a quote character parsing bug in cmdline_to_argv- Implement ansi version of cmdline_to_argv - Use cmdline_to_argv(A) in __(w)getmainargs to reparse the command line from _(w)cmdln Fixes 30 failures in msvcrt_apitest:__getmainargs
Wine msvcrt behaves like Vista+ here. Also disable related static_crt tests, because it isn't even well defined how they should behave and what to compare it to.
This is a hack, which was used before and is still needed, because wine code uses CRT allocation functions, even when the process heap should be used.
The new implementation is closely based on UCRT code and passes all tests for Vista+.
ReactOS behaves like Vista+ now.
d6a26d0 to
b5fafaf
Compare
HBelusca
reviewed
Dec 30, 2025
|
|
||
| .code | ||
|
|
||
| PUBLIC __inp |
Contributor
There was a problem hiding this comment.
I wonder why these functions would be needed in msvcrt. It's not as if IO ports accesses were allowed to user mode win32 apps on NT systems...
11 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Purpose
Import msvcrt from wine-10.0.
This fixes (roughly) 7574 out of 25517 test failures, i.e. 29.6% of all failures.
Proposed changes
Testbot runs (Filled in by Devs)
Crashes fixed (x64)
Fixed tests
Aditional test failures
Probably random
New test failures
codepage.c:442: Test failed: GetLastError() is 0- this failure also happens, when replacing msvcrt.dll with the one from Windows 2003MultiByteToWideChar.c:280: Test failed: Line 148: Wrong last error. Expected 48815, got 0- this failure also happens, when replacing msvcrt.dll with the one from Windows 2003vartype.c:4602: Test succeeded inside todo block: string different