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.
Improve consistency of code management.
JIRA issue: CORE-19278
- Move SHOpenPropSheetA from
utils.cpp into propsheet.cpp that
contains SHOpenPropSheetW.
PAGE_ROUND_DOWN macro seems to not work correctly with LONGLONG values. It creates some random freezes in the 1st-stage setup after commit 69bf140506.
It's fixed by creating PAGE_ROUND_UP_64 and PAGE_ROUND_DOWN_64 macros for 64-bit only data types.
---------
Co-authored-by: Thamatip Chitpong <thamatip.chitpong@reactos.org>
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
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
#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
- Declare CMBATT_DISCHARGE_TIME and CMBATT_CAPACITY_BOGUS constructs
- Determine if the battery was already discharging and if not, update the time when it's being discharged
- Fix the condition where it checks if the battery has been discharging for quite some time
- Default the time to BATTERY_UNKNOWN_TIME if querying the estimated battery time request fails or if the battery has just started discharging not over 15 seconds
CORE-18969
CORE-19452
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.