Commit graph

2526 commits

Author SHA1 Message Date
Dmitry Borisov 557306f5c0
[DDK:NDIS] Fix definition of broadcast address macro (#5155)
ff:ff:ff:ff:ff:ff is the broadcast MAC address.

CORE-8724
2023-03-18 16:57:52 +01:00
Hermès Bélusca-Maïto f6c8155239
[SDK] driverspecs.h: Add missing dummy _IRQL_limited_to_() definition (when _PREFAST_ is not defined).
Addendum to commit 8a688204.
2023-03-18 03:42:26 +01:00
Hermès Bélusca-Maïto e241c87eea
[SDK] sdkddkver.h: Add NTDDI_* defines for newest Windows 10 and 11 versions.
And add version descriptions, especially for Windows 10 as it becomes messy.

Information from:
- https://learn.microsoft.com/en-us/windows-hardware/drivers/ddi/wdm/nf-wdm-rtlisntddiversionavailable
- Shared/sdk/extdef.h from https://github.com/Mattiwatti/WinObjEx64
- Descriptions from https://github.com/MiroKaku/Veil
- Cross-checked with headers from https://github.com/microsoft/wil
2023-03-14 00:14:12 +01:00
Hermès Bélusca-Maïto a8b09eddc4
[NTOS:KD] Add some annotations. 2023-03-09 18:32:36 +01:00
Mark Jansen 5bc045c041
[SDK:SCRNSAVE] Implement mouse move threshold.
This makes it easier to start the screensavers by double-clicking.
2023-03-08 20:19:19 +01:00
Katayama Hirofumi MZ fdedc549d0 [MSVCRT] Follow-up of Follow-up of #5032 (f172503)
Fix for system/_wsystem.
Use _set_errno(ENOMEM) for malloc failure.
Rename status variable as exit_code.
2023-03-05 23:28:00 +09:00
Katayama Hirofumi MZ 5a7dbd6064 [MSVCRT] Follow-up of #5032 (f172503)
Use _cwait() instead of WaitForSingleObject and GetExitCodeProcess.
Use malloc/free instead of LocalAlloc/LocalFree.
2023-03-05 23:20:12 +09:00
Katayama Hirofumi MZ f172503d57
[MSVCRT][CRT_APITEST] Implement _wsystem (#5032)
Implement _wsystem(), by referring system().
Improve system().
Use WaitForSingleObject in system() and _wsystem().
Check existence of COMSPEC.
Thanks ChatGPT.
2023-03-05 21:01:14 +09:00
Joachim Henze 0fb580a855
[SDK] Improve gen_baseaddress.py and its output files (#4964)
* [SDK:TOOLS] Improve gen_baseaddress.py

Adds some kbd layout modules into the excludes-section:
that we do lack for todays master: e.g._ kbdeo, kbdsf, kbdrost

and also some that we lacked in the past
(for improving backwards compatibility of the script to older rls-branches):
kbdgm, kbdes, kbdgrist, kbdja, kbdko, kbdsk, kbdsk1

* [SDK:CMAKE] Highlight in the output files where the script does misbehave
2023-03-04 11:45:06 +01:00
Mark Jansen 647f74d4ab
[ATL] Remove some code that doesn't exist in the native ATL 2023-02-20 19:32:59 +01:00
Katayama Hirofumi MZ 38c0da9978
[CRT] printf/wprintf: Support %zu (#5056)
"%zu" is a printf format specifier for type size_t. Some apps assume the implementation of this specifier. CORE-17787
2023-02-14 20:54:53 +09:00
Joachim Henze 09dde2cff9
[REACTOS] "http://www.reactos" -> "https://reactos" (#5043)
To harmonize, to save some bytes, and last but not least for security reasons.
This can be understood as an addendum to (#2619).
2023-02-06 17:01:52 +03:00
Timo Kreuzer 9d19f8bf65 [WINESYNC] msvcrt: Use memmove to copy memory in memcpy_s.
Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 055ca5e4d9770d4f14e3c157f1288fa6308b86dd by Jacek Caban <jacek@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 6b8a981010 [WINESYNC] msvcrt: Use memmove to copy memory in wmemcpy_s.
Fixes memory corruption in Outlook 2016.

Signed-off-by: Jacek Caban <jacek@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id be56a83fd00cdaf9583a973b1e041f47c5277768 by Jacek Caban <jacek@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer c50fb470b4 [WINESYNC] msvcrt: Add DECLSPEC_HOTPATCH to functions patched by libtcmalloc.
Wine-Bug: https://bugs.winehq.org/show_bug.cgi?id=45199
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id b917cc66f4f7b786e7f19f63ab0c0819a5455222 by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 3ff17d5d71 [WINESYNC] msvcrt: Don't include MSVC 8.0+ heap functions in SOs for older DLLs.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 42ab0af66b74f7572db2f6d0256f49fae7527221 by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 8fdc1b0d38 [WINESYNC] msvcrt: Add helper for exception throwing.
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 90307e067f985f5963b62829993b320537578333 by Piotr Caban <piotr@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 6360937cd4 [WINESYNC] ucrtbase: Implement _realloc_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 8a69c5d81f8deb472df18a8e16e57efef2eb9a9a by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer aa77776eb0 [WINESYNC] ucrtbase: Implement _free_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id e4b8bc0edc640b36f2a2a26c53e18edea04fa74c by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 7757ebfbad [WINESYNC] ucrtbase: Implement _malloc_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 5325b8c95112be75f4fa0e2e2e45bcc88434fb5d by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 0dfd5665c0 [WINESYNC] ucrtbase: Implement _calloc_base.
Signed-off-by: Alex Henrie <alexhenrie24@gmail.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id fdc57d497bb305e90680c3b450fa172042fd79cd by Alex Henrie <alexhenrie24@gmail.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 1d6ec8555d [WINESYNC] msvcrt: Handle overflow in calloc().
Signed-off-by: Nikolay Sivov <nsivov@codeweavers.com>
Signed-off-by: Piotr Caban <piotr@codeweavers.com>
Signed-off-by: Alexandre Julliard <julliard@winehq.org>

wine commit id 50dd4b892825c75db35cd1f378291b51fa782f3e by Nikolay Sivov <nsivov@codeweavers.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 977e236102 [WINESYNC] msvcrt: memmove_s shouldn't zero its output buffer on error.
wine commit id 49560458426cf25b6a36bbf9bad35aa75c9f7aa7 by Dan Kegel <dank@kegel.com>
2023-02-02 14:58:08 +01:00
Timo Kreuzer 8fa0886fb9 [CRT] Reduce diff to wine by adjusting white space 2023-02-02 14:58:08 +01:00
Gabriel Grondin 144e984b40 [ZLIB] Update to v1.2.13. CORE-18752 2023-02-02 02:18:39 +03:00
Victor Perevertkin 1734f29721 [IP][LWIP][TCPIP] Move ip and lwip libraries to drivers/network/tcpip
These libraries are used only inside tcpip.sys driver so move them close
to it.
2023-02-01 02:31:14 +03:00
Victor Perevertkin 886670e914
[DRIVERS] Remove unused __NTDRIVER__ and KERNEL definitions 2023-01-31 20:18:18 +03:00
Timo Kreuzer f34e425e1a [WINESYNC] msvcrt: Don't fail when _aligned_offset_malloc is used with size=0.
wine commit id 7771552f247660acc472b4862f32c4f8426be180 by Piotr Caban <piotr@codeweavers.com>
2023-01-24 18:53:13 +01:00
Timo Kreuzer 739c9a1e77 [WINESYNC] msvcrt: Fixed strncpy_s behavior when count equals 0.
wine commit id bdf9a9f9bd56354f70a7431a9682183b84353211 by Piotr Caban <piotr@codeweavers.com>
2023-01-24 18:53:13 +01:00
Timo Kreuzer c36ea58f32 [CRT] Add a number of functions from wine
This adds _aligned_msize, _recalloc, wmemmove_s, memcpy_s, wmemcpy_s
2023-01-24 18:53:13 +01:00
Timo Kreuzer d0a52a6d71 [CRT] Reduce diff
- use msvcrt_set_errno
- MSVCRT_CHECK_PMT already sets the error.
- NULL check is already in HeapFree
2023-01-24 18:53:13 +01:00
Timo Kreuzer c47506a5f4 [CRT] Use the original wine heap functions 2023-01-24 18:53:13 +01:00
Timo Kreuzer cf40758d76 [CRT] reduce diff to wine of heap code
No functional changes intended.
2023-01-24 18:53:13 +01:00
Timo Kreuzer 73ef1c3c8b [CRT] Get back MSVCRT prefix in wine heap code 2023-01-24 18:53:13 +01:00
Ratin Gao 21a168e574
[ATL] CImage::Load(): Return E_FAIL without ATLASSERT on failure (#4993)
Application won't be interrupted by ATLASSERT when image load failure happens,
just like it was done in MS ATL.

CORE-18589
2023-01-22 20:38:16 +03:00
Hermès Bélusca-Maïto 1b25fe161c
[KERNEL32][NTOS:PS][RTL] Cleanup some DbgPrompt() calls. 2023-01-06 14:44:49 +01:00
Hermès Bélusca-Maïto 2714e3ee48
[LIBWINE] Fix GCC build warning. (#4938)
In file included from ../sdk/lib/3rdparty/libwine/debug_ros.c:9:
../sdk/lib/3rdparty/libwine/debug.c: In function 'get_temp_buffer':
../sdk/lib/3rdparty/libwine/debug.c:343:33: warning: passing argument 1 of '_InterlockedExchangeAdd' from incompatible pointer type [-Wincompatible-pointer-types]
     idx = interlocked_xchg_add( &pos, 1 ) % (sizeof(list)/sizeof(list[0]));
                                 ^~~~
In file included from ../sdk/include/crt/mingw32/intrin.h:98,
                 from ../sdk/include/crt/intrin.h:1017,
                 from sdk/include/psdk/winnt.h:48,
                 from ../sdk/include/psdk/windef.h:202,
                 from ../sdk/include/reactos/wine/debug.h:26,
                 from ../sdk/lib/3rdparty/libwine/debug.c:32,
                 from ../sdk/lib/3rdparty/libwine/debug_ros.c:9:
../sdk/include/crt/mingw32/intrin_x86.h:215:70: note: expected 'volatile long int *' but argument is of type 'int *'
 __INTRIN_INLINE long __cdecl _InterlockedExchangeAdd(volatile long * Addend, long Value)
                                                      ~~~~~~~~~~~~~~~~^~~~~~
2023-01-06 13:17:21 +01:00
Timo Kreuzer 902cdbc63a [ATL] Remove an assert that doesn't exist in the native ATL
This fixes an ATL assert in shell32_winetest:assoc and shell32_winetest:shfldr_special
2023-01-04 10:32:28 +01:00
Timo Kreuzer 2154e259e7 [PSDK] Fix definition of DRVCALLBACK for 64 bit 2023-01-04 10:32:28 +01:00
Hermès Bélusca-Maïto 95e5f07084
🎊 🍾 🥳 Happy New Year 2023 to the ReactOS Community! 🎆 ⚛️ ☢️
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:
 __,  ,__)            __,  ,__)       __, ,__)        ░▄████▄░▄███▄░▄████▄░▄█▀▀█▄░
(--|__| _ ,_ ,_      (--|\ | _       (--\ | _  _ ,_   ░▀▀░▄██░██░██░▀▀░▄██░░░░▄█▀░
  _|  |(_||_)|_)(_|    _| \|(/_(_|_)     \|(/_(_||    ░░▄██▀░░██░██░░▄██▀░░▄░▀▀█▄░
 (        |  |  ,_|   (                (__|           ░██████░▀███▀░██████░▀█▄▄█▀░
.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:
2023-01-01 00:00:00 +03:00
George Bișoc bfe06cbfca
[SDK][CMLIB] Properly check for failure if hive free list creation fails
HvpCreateHiveFreeCellList returns a NTSTATUS code yet the way the code path checks
checks for failure is just wrong. This was spotted whilst working on #4571 PR.
2022-12-30 19:58:37 +01:00
Timo Kreuzer 3b437b8a1c [NDK] Fix definition of RTL_DEBUG_INFORMATION
Fixes ntdll_aiptest RtlDebugInformation on x64
2022-12-30 11:19:26 +01:00
Timo Kreuzer 918c98a239 [NDK] Fix definition of LDR_ENUM_RESOURCE_INFO
This fixes ntdll_apitest LdrEnumResources on x64 Windows
2022-12-30 11:19:26 +01:00
Mark Jansen a09d5bae0f
[LOG2LINES] Compile the tool for MSVC builds 2022-12-29 16:51:40 +01:00
George Bișoc 578f2fc512
[NTOS:CM] Don't lazy flush the registry during unlocking operation
Whenever ReactOS finishes its operations onto the registry and unlocks it, a lazy flush is invoked to do an eventual flushing of the registry to the backing storage of the system. Except that... lazy flushing never comes into place.

This is because whenever CmpLazyFlush is called that sets up a timer which needs to expire in order to trigger the lazy flusher engine worker. However, registry locking/unlocking is a frequent occurrence, mainly when on desktop. Therefore as a matter of fact, CmpLazyFlush keeps removing and inserting the timer and the lazy flusher will never kick in that way.

Ironically the lazy flusher actually does the flushing when on USETUP installation phase because during text-mode setup installation in ReactOS the frequency of registry operations is actually less so the timer has the opportunity to expire and fire up the flusher.

In addition to that, we must queue a lazy flush when marking cells as dirty because such dirty data has to be flushed down to the media storage of the system. Of course, the real place where lazy flushing operation is done should be in a subset helper like HvMarkDirty that marks parts of a hive as dirty but since we do not have that, we'll be lazy flushing the registry during cells dirty marking instead for now.

CORE-18303
2022-12-23 19:45:13 +01:00
Timo Kreuzer dacbc603b6 [CRT] Add simplistic fallback implementation of sincos to make GCC 11 happy 2022-12-01 15:21:59 +02:00
Timo Kreuzer 28c41b7d22 [CRT] Replace amd64 math functions/stubs with libm 2022-12-01 15:21:59 +02:00
Timo Kreuzer 1ad4106b84 [CRT] Add basic version of handle_error 2022-12-01 15:21:59 +02:00
Timo Kreuzer 3d497ca883 [CRT] Improve _matherr handling 2022-12-01 15:21:59 +02:00
Timo Kreuzer 4d50f81419 [CRT] Implement _set_statfp 2022-12-01 15:21:59 +02:00