Commit Graph

957 Commits

Author SHA1 Message Date
Timo Kreuzer
f2c094caf3 [LIBWINE] Fix debug output synchronization
Previously the debug macros printed file/line, class and message separately, which resulted in possible intermingling with other debug messages, e.g. from rosautotest. This caused random parse errors for testman.
This is fixed by using a temp buffer for the prefix in rosfmt_default_dbg_vlog and then calling vDbgPrintExWithPrefix. Also make the __WINE_DPRINTF macro identical between GCC and MSVC.

See ROSTESTS-178
2026-05-06 08:34:12 +00:00
Timo Kreuzer
081a6366df [KSECDD][NTOS][RTL] Change license of some of my code to MIT 2026-04-23 12:39:01 +00:00
Eric Kohl
8dc9e50c09 [NETCFGX][REACTOS][UUID] Uncover one of many secrets of netcfgx.dll
The second parameter of the first function of the INetCfgComponentPrivate interface seems to be a REFIID.
Netsh calls this function with an undocumented GUID called ITcpipProperties (see https://github.com/nihilus/GUID-Finder/blob/master/GUID-Finder/Interfaces.txt).
2026-04-21 22:23:18 +02:00
Timo Kreuzer
c7a4ea9d48 [CRT] Remove _mbstrlen 2026-04-21 13:13:33 +00:00
Doug Lyons
7ee14831a1 [CHKDSK][VFATLIB] Chkdsk improve code (#8857)
CORE-20546

Avoid second "lseek" if we do not have "use_read" and do not need to do read alignment.
2026-04-14 16:02:19 -05:00
Doug Lyons
5a4823b5f7 [CHKDSK][VFATLIB] Fix assert when in read-only mode alternate method (#8842)
CORE-20539

Move an "assert" added by Pierre Schweitzer in [b0b7df](https://github.com/reactos/reactos/commit/b0bf7df).
Relocate his added "assert" inside an "if (FsCheckFlags & FSCHECK_IMMEDIATE_WRITE)".
This avoids some asserts when running in read-only mode.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2026-04-14 15:51:23 -05:00
Eric Kohl
b481fb5674 [PSDK][UUID] Add the INetCfgSysPrep, INetCfgComponentSysPrep and INetCfgComponentUpperEdge interfaces 2026-04-05 18:23:19 +02:00
Doug Lyons
2a2aaf98d4 [CHKDSK][VFATLIB] Chkdsk should not write unless using "-F" switch. (#8826)
CORE-20539

Before calling "fs_write" test if we are in a read-write mode by checking "rw".
I intend to re-evaluate this to try and reduce the difference to dosfschk in the future.

Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
2026-04-04 23:01:35 -05:00
Doug Lyons
57664f1c1e [CHKDSK][VFATLIB] Chkdsk, fix writes to wrong disk offsets (#8840)
CORE-20546

When an alignment is needed and a new read is required,
 make sure we seek back to the read position for our write.
2026-04-04 18:30:52 -05:00
Doug Lyons
22ce5b1bc8 [CHKDSK][VFATLIB] Make ReactOS chkdsk output match MS for last 3 lines (#8839)
Added line for "bytes per cluster".
Improved formatting of output to align text for last 4 lines.
2026-04-03 12:32:14 -05:00
Doug Lyons
c2f56643b6 [VFATLIB][FMIFS][CHKDSK] Chkdsk fixes and improvements (#8810)
CORE-18432

Co-authored-by: Carl J. Bialorucki <carl.bialorucki@reactos.org>
2026-03-31 13:13:31 -05:00
Justin Miller
752f99ee3d [ANSI-SYNC-HACKS][NFSD] Small library to sync ANSI code (#8800)
The point of kernel32_vista was to provide a dll that can be used for winesyncs to still have NT6 APIs.
We're now switching to an architecture where we'll have kernelbase OR a kernel32_win7 depending on NT target compile
but this means that for an ANSI exe such as this, we need an alternative solution.
Thankfully it's pretty much only for this but just in case i made it a library.
2026-03-29 02:48:46 +00:00
Mikhail Tyukin
22ca1e736a [KERNEL32_VISTA][NTDLL_VISTA] add required functions for winhttp 2026-03-28 11:35:17 -07:00
Hermès Bélusca-Maïto
2d07d8a7cd [CONUTILS] Improve library build interface; avoid using winuser.h; fix x64 build warnings
conutils\pager.c(658):
  warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
conutils\outstream.c(179),(263):
  warning C4267: '=': conversion from 'size_t' to 'DWORD', possible loss of data
conutils\outstream.c(433):
  warning C4267: '=': conversion from 'size_t' to 'INT', possible loss of data
2026-03-28 14:11:23 +01:00
Hermès Bélusca-Maïto
3ac86990e3 [SDK:DELAYIMP] Simplify code following commit 5840b212a8 (#7784)
CORE-10935

Addendum to commit 5840b212a8, as well as to
commits 91d86a9a91 (r71190) and e5904542d6 (PR #377).
2026-03-22 17:56:48 +01:00
Eric Kohl
c364fe7fb1 [SDK][UUID] Add notification object interfaces
Add INetCfgComponentNotifyBinding, INetCfgComponentNotifyGlobal and INetCfgComponentSetup.
2026-03-22 15:04:48 +01:00
Timo Kreuzer
ddf58eb2f8 [VFATLIB] Add packing to LFN_ENT structure
The structure is packed in the original dosfstools code, too.

Fixes GCC 13 warning:

C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/lfn.c: In function 'lfn_add_slot':
C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/lfn.c:208:5: warning: converting a packed 'DIR_ENT' pointer (alignment 1) to a 'LFN_ENT' pointer (alignment 2) may result in an unaligned pointer value [-Waddress-of-packed-member]
  208 |     LFN_ENT *lfn = (LFN_ENT *) de;
      |     ^~~~~~~
In file included from C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/dosfsck.h:8,
                 from C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/vfatlib.h:25,
                 from C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/lfn.c:24:
C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/fsck.fat.h:165:9: note: defined here
  165 | typedef struct {
      |         ^~~~~~
C:/ReactOS/reactos/sdk/lib/fslib/vfatlib/check/lfn.c:29:9: note: defined here
   29 | typedef struct {
      |         ^~~~~~
2026-03-18 17:29:12 +02:00
Timo Kreuzer
deb89436bc [STDC++COMPAT] Add rand_s for GCC 13 and pre-NT6 builds
GCC 13 STL requires this.
2026-03-18 17:29:12 +02:00
Ahmed Arif
ff6bd79221 [PSEH] Fix x64 ABI compliance and register clobbering in exception filters (#8700)
pseh2_64 relied on inline-asm clobbers across a C/asm funclet jump, which is not a reliable ABI boundary.
On AMD64 gcc path, this can corrupt non-volatile state during exception filtering/unwind.

This change makes the trampoline ABI-safe by explicitly preserving and restoring non-volatile registers and keeping unwind metadata/prologue consistent.

Changes:
- Save/restore rbx, rdi, rsi, r12-r15 in `__seh2_global_filter_func`.
- Adjust stack allocation/unwind annotation to match the new prologue/epilogue.
- Keep filter return in eax and jump back through `__seh2_global_filter_func_exit`.

Note: This is exception-only path: extra stack usage is acceptable for correctness.

How to test: Build and run ReactOS with gcc 13/15; you should no longer see stack exhaustion.
2026-03-17 22:42:37 +01:00
Dmitry Borisov
aabd163d73 [CPORTLIB:PC98] Refactor serial support code (#8558)
CORE-17977

- Fix a bug when subsequent port detection attempts fail because of
  broken FIFO management. If FIFO logic is enabled the hardware will
  not decode the legacy 0x30 and 0x32 I/O ports.
  Therefore care should be taken when accessing these ports.

- Fix hang on boot when a serial device was not connected to the COM1 port.
  Unlike 16550, a call to `CpDoesPortExist()` for the 8251 will succeed
  even when if the user has not plug the serial port into PC-98 machine.
  (I do not know how to put the 8251 into loopback mode.)
  Fix this by checking for CTS prior to the LSR loop.

- Fix hang on boot when the chosen baud rate becomes too large due to
  `DEFAULT_DEBUG_BAUD_RATE` being set to 115200.

- Some NP21/W workarounds were being incorrectly applied,
  fix them and consolidate them into one check.

- Reuse exsisting code from the NS16550 driver to avoid code duplication.

- Rename HW definitions for better naming.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2026-03-15 22:56:14 +01:00
Hermès Bélusca-Maïto
dabc74d468 [CPORTLIB] Split cport.c into the NS16550-specific routines and the rest
Preparing the way for a future library refactoring, along the way of the
one in Windows, which has been updated in Windows 10 and is now documented:
https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/uart/
2026-03-15 22:48:25 +01:00
Hermès Bélusca-Maïto
a204d174f0 [CPORTLIB] Prepare splitting cport.c into the NS16550-specific routines and the rest 2026-03-15 22:23:28 +01:00
Mikhail Tyukin
374207770d [FECLIENT] Import from Wine-10.0 (#8301)
* [LIBWINE] add dll_canunload library

* [FECLIENT] Import from Wine-10.0
2026-03-13 16:05:55 -07:00
Ahmed Arif
08e57f6bc2 [CRT/GCC] Fix infinite recursion in memset/memcpy/memmove at -O2 2026-03-02 20:14:06 +02:00
Mikhail Tyukin
3518663767 [COMBASE][COML2] Sync to wine-10.0
Co-Authored-By: buddyjojo <buddyjojo06@outlook.com>
2026-03-01 10:38:42 +02:00
Timo Kreuzer
1f97ad1f93 [RTL] Sync actctx.c to wine 10.0 2026-03-01 10:38:42 +02:00
Katayama Hirofumi MZ
0c4091cd04 [FREETYPE][NTGDI] Update FreeType from 2.10.0 to 2.10.4 (#8671)
Modernize modules.
JIRA issue: CORE-17390
- Update FreeType to 2.10.4.
- Delete ChangeLog.
- Delete sdk/lib/3rdparty/freetype/src/gxvalid
  (useless for us).
- Delete sdk/lib/3rdparty/freetype/src/otvalid
  (useless for us).
- Keep ReactOS hacks on FreeType.
- Adapt ntgdi/freetype.c to new FreeType.
2026-02-26 09:32:57 +09:00
Timo Kreuzer
de7e707459 [CRT] Remove obsolete CRT files 2026-02-17 17:52:19 +02:00
Timo Kreuzer
f417a522c6 [CRT][MSVCRT] Remove chkesp library
_chkesp is already part of vcruntime library.
2026-02-17 17:52:19 +02:00
Doug Lyons
a727273fbf [FREETYPE] HACK: Verify we have format 4 for tt_cmap4_char_map_binary (#8649)
[FREETYPE] HACK: Verify the cmap format 4 is used in the function
"tt_cmap4_char_map_binary" in ttcmap.c before proceeding.
Otherwise issue debug message.

CORE-12549
2026-02-04 00:39:05 -06:00
Timo Kreuzer
dcca81a716 [UCRTBASE] Switch to msvcrt_shared 2026-02-01 11:46:59 +02:00
Timo Kreuzer
4c19b94ae9 [VCRUNTIME] Implement _chkesp / _chkesp_failed 2026-02-01 11:46:59 +02:00
Timo Kreuzer
89506818c4 [VCRUNTIME] Implement purecall handler support
Implements _get_purecall_handler, _set_purecall_handler and _purecall
2026-02-01 11:46:59 +02:00
Timo Kreuzer
62cc9c498e [CMAKE] Don't re-archive import libraries
Instead create an IMPORTED library from the output of dlltool.
This prevents binutils 2.40+ nested archive crash (bug #31614):
2026-01-29 17:13:40 +02:00
Timo Kreuzer
07de64139a [GCC_SSP] Turn the GCC stack protector lib into a normal library
Stop pointless target_sources(xxx PRIVATE $<TARGET_OBJECTS:gcc_ssp_nt>). The only effect it has is to force the object file into the target, which was already done by specifying the libraries as OBJECT libraries, which is also pointless, and only leads to problems.
2026-01-29 17:13:40 +02:00
Oleg Dubinskiy
27fde6f4dd [MMIXER] Further imrovements to volume control support (follow-up of 376708b)
Add more improvements and fixes to volume control implementation.
- Don't allocate and don't use an array for storing volume level values. Also, get rid from some stuff, which is not used any more (some fields of MIXERVOLUME_DATA structure and MMixerGetVOlumeControlIndex() function).
- Use the following formulas to properly convert the volume level values from the logical units range (0 - 65535) to the hardware Decibel (DB) range (defined by audio miniport driver): <decibels> = <units> * <range_in_db> / <range_in_units> + <minimal_level> (for setting the new value) and <units> = (<decibels> - <mimimal_level> + 1) * <range_in_db> / <range_in_units> (for getting the previous value), where <decibels> is a DB hardware value, <units> is logical units value, <rang_in_db> is the hardware range (DB), <range_in_units> is range in the logical units and <minimal_level> is the most minimum volume level value defined by an audio miniport driver.
- I've created this formula myself basing on my calculations and investigations (with some help from Hermes Belusca-Maito), so it's tested and confirmed to be working for all possible values range (at least for our official Intel AC97 driver, and, as tested later, Realtek HD audio).
- Do this in both cases when setting the new and when getting the previous volume value as well.
- Fallback to default values range -96 - 0 DB in case either the volume level property is not supported by audio miniport driver, or the values range is empty (SignedMinimum is equal to SignedMaximum and both of them typically have a 0 (zero) value). Realtek HD audio codec is one of such a drivers, so this fixes the volume control on real hardware too (tested on Asus-F5R notebook with Realtek ALC660 audio controller). Moreover, the volume values set by user are even properly saved (aren't lost) after reboot (unlike with Intel AC97 in VirtualBox or SoundBlaster in VMware)! Realtek probably uses another mechanism to write/read the value(s) to/from Registry, which is handled by the miniport (codec) driver instead.
This fixes some remaining bugs when changing the volume level, so now 1) min/max position of the volume bar can be reached correctly and 2) left/right balance sliders are now behaving properly (they don't affect position of each other anymore when moving them manually).
CORE-19189, CORE-19190
2026-01-22 16:49:09 +01:00
Oleg Dubinskiy
c9911d3de9 [MMIXER] Revert "HACK: Decrease SteppingDelta for each volume value by 1"
This is actually a hack and isn't required anymore because I made a proper fix instead.
Doing -1 does not fix the problem correctly, but only makes a pseudo-effect that it's fixed by actually truncating each volume value, so then the volume sliders misbehaving does occur less (but it still does).
This reverts commit 206b52833f.
CORE-19190
2026-01-22 16:49:09 +01:00
Timo Kreuzer
8b7ade14ef [LIBXML2] Update to release 2.12.8 (from Wine-10.0) 2026-01-10 19:03:40 +02:00
Timo Kreuzer
1628f5e682 [CMAKE] Fix some dependencies on autogenerated headers 2026-01-10 01:32:06 +02:00
Timo Kreuzer
1106678cc0 [MSVCRT] Add some missing exports
- 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
2025-12-30 12:57:14 +02:00
Timo Kreuzer
b6ae4e1296 [RTL] Fix searching resource names
Resource names are sorted with '_' being higher than any alphabetic characters. This means _wcsicmp cannot be used to search, because it lowercases the characters before comparison, which would make '_' lower than lowercase alphabetic characters. Implement a custom compare function instead.

See CORE-20401, CORE-20408
2025-12-28 12:33:01 +02:00
Eric Kohl
d39657cfe0 [VFATLIB] Add GPT partition support 2025-12-24 15:04:14 +01:00
Timo Kreuzer
99aabc5981 [CRT] Fix __call_atexit
This prevents a first chance exception on process cleanup.
2025-12-12 12:21:53 +02:00
Timo Kreuzer
eba2bbd177 [CRT] Remove ftol2_sse 2025-12-12 12:21:53 +02:00
Timo Kreuzer
9c66d9eaba [MSVCRTEX] Add ftol2_asm
It already contains ftoul2_legacy_asm. Do it like this instead of having to link ftol2 lib.
2025-12-12 12:21:53 +02:00
Timo Kreuzer
f20c09fcd6 [LIBCNTPR] Implement NT versions of _strlwr, _strupr, _wcslwr, _wcsupr 2025-12-10 09:55:30 +02:00
Timo Kreuzer
abfaf2e75f [LIBCNTPR] Implement NT version of _wcsicmp / _wcsnicmp
Passes all ntdll wine tests.
2025-12-10 09:55:30 +02:00
Timo Kreuzer
7872c0d391 [LIBCNTPR] Implement NT versions of _stricmp and _strnicmp 2025-12-10 09:55:30 +02:00
Timo Kreuzer
0dea0cfa01 [LIBCNTPR] Implement NT version of _invalid_parameter 2025-12-10 09:55:30 +02:00
Timo Kreuzer
090129bb1d [LIBCNTPR] Implement NT version of iswctype
Passes all ntdll wine tests.
2025-12-10 09:55:30 +02:00