Commit graph

3173 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
381e224f6b
[SDK] Fix the automatic definition of __ROS_LONG64__ (#7576)
It is not wishable anymore to automatically define __ROS_LONG64__
whenever __WINESRC__ is defined. Indeed, Wine now has started to
introduce the possibility to "Enable compilation with long types".

Thus, for these modules we import from them, we want to be able to
define __WINESRC__ without __ROS_LONG64__ automatically defined.

Addendum to commits 89c3520c86 (r73383) and 75eeb2a7e4 (r38872).
2025-01-16 18:13:19 +01:00
Timo Kreuzer
7bb12665d6 [UCRT] Add CMake files 2025-01-16 14:18:53 +02:00
Timo Kreuzer
ef440b9aef [UCRT] Add a hack for a clang bug
See CORE-19902
2025-01-16 14:18:53 +02:00
Timo Kreuzer
42e9c80279 [UCRT] Fix definition of offsetof for clang-cl 2025-01-16 14:18:53 +02:00
Timo Kreuzer
2eb3149565 [UCRT] Make includes unix compatible 2025-01-16 14:18:53 +02:00
Timo Kreuzer
90dad446b7 [UCRT] Fix GCC build of __crt_char_traits
This is a workaround for GCC. It will disable debugging for tdupenv_s_crt.
How it works on MSVC? Magic.
2025-01-16 14:18:53 +02:00
Timo Kreuzer
693f9f51a0 [UCRT] Hack some template code, so that retarded compilers can handle it 2025-01-16 14:18:53 +02:00
Timo Kreuzer
f9dc185ede [UCRT] Use a C cast instead of const_cast for GCC
This is because GCC will generate errors for both const_cast and static_cast depending on the template parameter:
- With const_cast: error: invalid 'const_cast' from type 'std::nullptr_t' to type 'const wchar_t**'
- With static_cast: error: invalid 'static_cast' from type 'wchar_t** const' to type 'const wchar_t**'
2025-01-16 14:18:53 +02:00
Timo Kreuzer
47e3f49e52 [UCRT] No __declspec(spectre(nomitigation)) for GCC/Clang 2025-01-16 14:18:53 +02:00
Timo Kreuzer
97e20ef342 [UCRT] Fix GCC/Clang build of SSE2/AVX code
On GCC the code using extended ISA cannot be inlined and must either be marked with a function attribute or compiled with the proper target options ('-mavx2' on the command line or '#pragma GCC target("avx2")' inside the code)
2025-01-16 14:18:53 +02:00
Timo Kreuzer
51e6ce3aa7 [UCRT] Add GCC compatible __FUNCTIONW__ 2025-01-16 14:18:53 +02:00
Timo Kreuzer
589bbcaa08 [UCRT] Include intrin.h for __debugbreak() 2025-01-16 14:18:53 +02:00
Timo Kreuzer
e98e9000c7 [UCRT] Make SEH blocks ReactOS PSEH compatible 2025-01-16 14:18:53 +02:00
Timo Kreuzer
7bb9f6bf28 [UCRT] Fix GCC/Clang build of enum_system_locales_ex_nolock
Add static function for Clang.
Add missing __stdcall in a lambda for GCC.
MSVC does this automagically. See https://devblogs.microsoft.com/oldnewthing/20150220-00/?p=44623.
2025-01-16 14:18:53 +02:00
Timo Kreuzer
2cc6699f0d [UCRT] Silence warning about returning noreturn function 2025-01-16 14:18:53 +02:00
Timo Kreuzer
a21a206c89 [UCRT] Add workaround for va_arg warning about type promotion 2025-01-16 14:18:53 +02:00
Timo Kreuzer
faedd8ff75 [UCRT] Use GCC inline assembler
Clang requires the asm to be split, otherwise it complains that it doesn't have enough registers.
2025-01-16 14:18:53 +02:00
Timo Kreuzer
0cdde63c57 [UCRT] Add casts to make GCC happy 2025-01-16 14:18:53 +02:00
Timo Kreuzer
dbd58d7666 [UCRT] Fix GCC/Clang compilation of template specializations 2025-01-16 14:18:53 +02:00
Timo Kreuzer
c15b618a17 [UCRT] Add using declatarions for template base-classes (GCC compatibility) 2025-01-16 14:18:53 +02:00
Timo Kreuzer
5ba105e9b5 [UCRT] Add some missing typename for GCC compatibility 2025-01-16 14:18:53 +02:00
Timo Kreuzer
90fb8391fc [UCRT] Fix shadowing template parameters 2025-01-16 14:18:53 +02:00
Timo Kreuzer
482f318a23 [UCRT] Fix template specialization 2025-01-16 14:18:53 +02:00
Timo Kreuzer
7a764cf610 [UCRT] Fix invalid storage type specification 2025-01-16 14:18:53 +02:00
Timo Kreuzer
4de4349109 [UCRT] Fix non-standard literal suffixes 2025-01-16 14:18:53 +02:00
Timo Kreuzer
ffd69754f9 [UCRT] Fix non-standard extern "C" usage 2025-01-16 14:18:53 +02:00
Timo Kreuzer
9ed5151de9 [UCRT] Fix benign typo ('\0' instead of nullptr) 2025-01-16 14:18:53 +02:00
Timo Kreuzer
f8e7a249ba [UCRT] Fix a signed/unsigned comparison 2025-01-16 14:18:53 +02:00
Timo Kreuzer
2d753d95fb [UCRT] Fix multiple missing dereferences
This is a bug in MS UCRT code. MSVC allows to check a pointer to be > 0, GCC emits a warning.
2025-01-16 14:18:53 +02:00
Timo Kreuzer
d622c4a7a0 [UCRT] Fix a typo/bug in __acrt_mbs_to_wcs_cp_array 2025-01-16 14:18:53 +02:00
Timo Kreuzer
48d8d198b2 [UCRT] Add missing line breaks at end of file 2025-01-16 14:18:53 +02:00
Timo Kreuzer
995e16d4d4 [UCRT] Add missing headers
These are minimal definitions, just enough to make things compile.
2025-01-16 14:18:53 +02:00
Timo Kreuzer
04e0dc4a7a [UCRT] Import Microsoft.Windows.SDK.CRTSource version 10.0.22621.3
Imported from https://www.nuget.org/packages/Microsoft.Windows.SDK.CRTSource/10.0.22621.3
License: MIT
2025-01-16 14:18:53 +02:00
Timo Kreuzer
f1b60c66f0 [PSEH] Fix SEH compatibility macros for dummy PSEH
This is used with Clang, which does have native SEH, but it's broken and can cause the compiler to crash. Previously some code was not handling this and instead used native SEH for clang. Fix this by always using _SEH2_* macros instead of relying on __USE_PSEH2__ to be defined.
2025-01-16 14:18:53 +02:00
Timo Kreuzer
ca0fa4af1e [RTL/x64] Improve RtlWalkFrameChain to handle user mode 2025-01-16 13:40:23 +02:00
Timo Kreuzer
bba03c886c [WIDL] Reduce diff to Wine-4.0 2025-01-15 08:29:53 +02:00
Timo Kreuzer
995e4c829a [WIDL] Properly pass architecture flag instead of modifying the code
This reverts commit 73c776c744 "[WIDL] Fix non-x86 builds".
2025-01-15 08:29:53 +02:00
Timo Kreuzer
1b14ce5db3 [WIDL] Turn warnings into errors 2025-01-15 08:29:53 +02:00
Timo Kreuzer
96676ca251 [PSEH] Use native SEH on clang-cl x64 2025-01-14 13:34:24 +02:00
Timo Kreuzer
478317abcb [PSEH] Fix SEH compatibility macros for dummy PSEH
This is used with Clang, which does have native SEH, but it's broken and can cause the compiler to crash. Previously some code was not handling this and instead used native SEH for clang. Fix this by always using _SEH2_* macros instead of relying on __USE_PSEH2__ to be defined.

Try to improve things
2025-01-14 13:34:24 +02:00
Timo Kreuzer
12139bcde7 [VCRUNTIME] Fix some intrinsics with clang-cl 17
For some unknow reason some intrinsics fail to get inlined. Using extern inline results in a linker error. Change it to static inline, so that there is a static implementation in case it doesn't get inlined
2025-01-14 13:34:24 +02:00
Timo Kreuzer
78417c5532 [CRT] Fix build with clang-cl 17
#pragma function(llabs) causes an error: "error: no_builtin attribute has no effect on defaulted or deleted functions"
This is probably a bug in clang, see https://github.com/llvm/llvm-project/issues/116256
2025-01-14 13:34:24 +02:00
Timo Kreuzer
25723b4239 [VCRUNTIME] Fix a warning with GCC 13 2025-01-14 13:34:24 +02:00
Timo Kreuzer
3523e1a9f3 [ZLIB] Disable a clang warning 2025-01-14 13:34:24 +02:00
Timo Kreuzer
aa7ab16fd0 [CMAKE] Disable a number of warnings for clang
Also remove the totally useless and stupid -Werror=unknown-warning-option
2025-01-14 13:34:24 +02:00
Hermès Bélusca-Maïto
37b0646e76
[SDK:WINE] Fix get_temp_buffer() call in wine_dbgstr_wn()
Addendum to commit dbc7eeb47e (PR #4303).

The argument to get_temp_buffer() should specify the length of the
string being buffered + 1 (for the NUL-terminator).
The original code wrongly interverted this with specifying the buffer
shifted by one character.
2025-01-11 21:17:28 +01:00
George Bișoc
02032b7106
[PSDK] Fix BATTERY_UNKNOWN_TIME value constant
Windows SDKs define this constant to 0xFFFFFFFF but we define it to 0x80000000.
As a result, when our COMPBATT driver is being tested on Windows (namely XP, Vista and 7), BATTERY_UNKNOWN_TIME is not interpreted as UNKNOWN TIME but entirely something else.

CORE-18969
CORE-19452
2025-01-08 23:49:15 +01:00
Vitaly Orekhov
3ff9c476a0
[PSDK] Add structures and enumeration describing radio power state (#7596)
This piece of data is returned by WlanQueryInterface().
Used by `WlanQueryInterface` with the `wlan_intf_opcode_radio_state` opcode.

CORE-6905
2025-01-08 12:28:46 +01:00
Eric Kohl
faf6297972 [NETAPI32][WKSSVC][IDL] Implement NetrWkstaUserEnum
- TODO: Take PreferredMaximumLength and ResumeHandle into account
2025-01-05 16:38:04 +01:00
Hermès Bélusca-Maïto
ebdb7b3e4d
A problem has been detected and ReactOS has been shut down to prevent
damage to your time machine warp core.

UNEXPECTED_NEW_YEAR_TIMESLIP

If this is the first time you have seen this Stop error screen,
restart your time machine. If this screen appears again, follow
these steps:

Check to make sure you wish the ReactOS Community a
🎊 🍾 🥳 *:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:* 🎆 ⚛️ ☢️

        █ █ █▀█ █▀█ █▀█ █ █          ██████╗  ██████╗ ██████╗ ███████╗    ██╗
        █▀█ █▀█ █▀▀ █▀▀ ▀█▀          ╚════██╗██╔═████╗╚════██╗██╔════╝    ██║
        ▀ ▀ ▀ ▀ ▀   ▀    ▀            █████╔╝██║██╔██║ █████╔╝╚█████╗     ██║
  █▄ █ █▀▀ █ █ █  █ █ █▀▀ █▀█ █▀█    ██╔═══╝ ████╔╝██║██╔═══╝  ╚═══██╗    ╚═╝
  █▀██ █▀▀ █ █ █  ▀█▀ █▀▀ █▀█ ██▀    ███████╗╚██████╔╝███████╗██████╔╝    ██╗
  ▀  ▀ ▀▀▀  ▀▀▀    ▀  ▀▀▀ ▀ ▀ ▀ ▀    ╚══════╝ ╚═════╝ ╚══════╝╚═════╝     ╚═╝
🎆 ⚛️ ☢️ *:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:*~*:._.:* 🎊 🍾 🥳
Also, ensure you use the latest nightly ReactOS version and run it
attached to a debugger.

If problems continue, Keep Calm And Carry On Developing. Test your
code more thoroughly, use a sane compiler and debugger, or ask any
questions on ReactOS' official Mattermost channel.

Technical information:

*** STOP: 0x42000042 (0x67747770,0x000007E9,0x00000001,0x00000001)

***  jira.reactos.org   - Address chat.reactos.org Base at reactos.org
***  github.com/reactos - Address  git.reactos.org Base at reactos.org
2025-01-01 00:00:00 +01:00