https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4de4349109055cc4ddd127...
commit 4de4349109055cc4ddd127c04065fbd61b737ec7 Author: Timo Kreuzer timo.kreuzer@reactos.org AuthorDate: Sun Oct 13 10:13:44 2024 +0200 Commit: Timo Kreuzer timo.kreuzer@reactos.org CommitDate: Thu Jan 16 14:18:53 2025 +0200
[UCRT] Fix non-standard literal suffixes --- sdk/lib/ucrt/filesystem/findfile.cpp | 2 +- sdk/lib/ucrt/filesystem/stat.cpp | 2 +- sdk/lib/ucrt/inc/corecrt_internal_fltintrn.h | 8 ++++---- sdk/lib/ucrt/inc/corecrt_internal_strtox.h | 8 ++++---- sdk/lib/ucrt/inc/corecrt_internal_time.h | 2 +- sdk/lib/ucrt/lowio/eof.cpp | 8 ++++---- sdk/lib/ucrt/time/ftime.cpp | 6 +++--- 7 files changed, 18 insertions(+), 18 deletions(-)
diff --git a/sdk/lib/ucrt/filesystem/findfile.cpp b/sdk/lib/ucrt/filesystem/findfile.cpp index 24b68e57b51..d2160a7af8d 100644 --- a/sdk/lib/ucrt/filesystem/findfile.cpp +++ b/sdk/lib/ucrt/filesystem/findfile.cpp @@ -66,7 +66,7 @@ static Integer convert_file_size_to_integer(DWORD const high, DWORD const low) t template <> static __int64 convert_file_size_to_integer(DWORD const high, DWORD const low) throw() { - return static_cast<__int64>(high) * 0x100000000i64 + static_cast<__int64>(low); + return static_cast<__int64>(high) * 0x100000000ll + static_cast<__int64>(low); }
template <> diff --git a/sdk/lib/ucrt/filesystem/stat.cpp b/sdk/lib/ucrt/filesystem/stat.cpp index 593438ffe07..7cf9894215c 100644 --- a/sdk/lib/ucrt/filesystem/stat.cpp +++ b/sdk/lib/ucrt/filesystem/stat.cpp @@ -83,7 +83,7 @@ static bool __cdecl compute_size(BY_HANDLE_FILE_INFORMATION const& file_info, __ _VALIDATE_RETURN_NOEXC(file_info.nFileSizeHigh <= LONG_MAX, EOVERFLOW, false);
size = static_cast<__int64>( - static_cast<unsigned __int64>(file_info.nFileSizeHigh) * 0x100000000i64 + + static_cast<unsigned __int64>(file_info.nFileSizeHigh) * 0x100000000ll + static_cast<unsigned __int64>(file_info.nFileSizeLow)); return true; } diff --git a/sdk/lib/ucrt/inc/corecrt_internal_fltintrn.h b/sdk/lib/ucrt/inc/corecrt_internal_fltintrn.h index 929e7a5539b..b8ad72aa48b 100644 --- a/sdk/lib/ucrt/inc/corecrt_internal_fltintrn.h +++ b/sdk/lib/ucrt/inc/corecrt_internal_fltintrn.h @@ -71,11 +71,11 @@ struct __acrt_floating_type_traits<double>
enum : uint64_t { - exponent_mask = (1ui64 << (exponent_bits )) - 1, - normal_mantissa_mask = (1ui64 << (mantissa_bits )) - 1, - denormal_mantissa_mask = (1ui64 << (mantissa_bits - 1)) - 1, + exponent_mask = (1ull << (exponent_bits )) - 1, + normal_mantissa_mask = (1ull << (mantissa_bits )) - 1, + denormal_mantissa_mask = (1ull << (mantissa_bits - 1)) - 1,
- special_nan_mantissa_mask = (1ui64 << (mantissa_bits - 2)) + special_nan_mantissa_mask = (1ull << (mantissa_bits - 2)) };
struct components_type diff --git a/sdk/lib/ucrt/inc/corecrt_internal_strtox.h b/sdk/lib/ucrt/inc/corecrt_internal_strtox.h index 64c9654d1af..68293919858 100644 --- a/sdk/lib/ucrt/inc/corecrt_internal_strtox.h +++ b/sdk/lib/ucrt/inc/corecrt_internal_strtox.h @@ -687,9 +687,9 @@ __forceinline uint64_t __cdecl right_shift_with_rounding( return 0; }
- uint64_t const extra_bits_mask = (1ui64 << (shift - 1)) - 1; - uint64_t const round_bit_mask = (1ui64 << (shift - 1)); - uint64_t const lsb_bit_mask = 1ui64 << shift; + uint64_t const extra_bits_mask = (1ull << (shift - 1)) - 1; + uint64_t const round_bit_mask = (1ull << (shift - 1)); + uint64_t const lsb_bit_mask = 1ull << shift;
bool const lsb_bit = (value & lsb_bit_mask) != 0; bool const round_bit = (value & round_bit_mask) != 0; @@ -1140,7 +1140,7 @@ inline SLD_STATUS __cdecl convert_decimal_string_to_floating_type_common( if (fractional_mantissa_bits > required_fractional_bits_of_precision) { uint32_t const shift = fractional_mantissa_bits - required_fractional_bits_of_precision; - has_zero_tail = has_zero_tail && (fractional_mantissa & ((1ui64 << shift) - 1)) == 0; + has_zero_tail = has_zero_tail && (fractional_mantissa & ((1ull << shift) - 1)) == 0; fractional_mantissa >>= shift; }
diff --git a/sdk/lib/ucrt/inc/corecrt_internal_time.h b/sdk/lib/ucrt/inc/corecrt_internal_time.h index c5ae01fceef..703e2d01a4f 100644 --- a/sdk/lib/ucrt/inc/corecrt_internal_time.h +++ b/sdk/lib/ucrt/inc/corecrt_internal_time.h @@ -25,7 +25,7 @@ // //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+ // Number of 100 nanosecond units from 1/1/1601 to 1/1/1970 -#define _EPOCH_BIAS 116444736000000000i64 +#define _EPOCH_BIAS 116444736000000000ll
#define _DAY_SEC (24 * 60 * 60) // Seconds in a day #define _YEAR_SEC (365 * _DAY_SEC) // Seconds in a year diff --git a/sdk/lib/ucrt/lowio/eof.cpp b/sdk/lib/ucrt/lowio/eof.cpp index bbebc3bc1ea..a339caf0432 100644 --- a/sdk/lib/ucrt/lowio/eof.cpp +++ b/sdk/lib/ucrt/lowio/eof.cpp @@ -29,13 +29,13 @@ extern "C" int __cdecl _eof(int const fh) return -1; }
- __int64 const here = _lseeki64_nolock(fh, 0i64, SEEK_CUR); - if (here == -1i64) + __int64 const here = _lseeki64_nolock(fh, 0ll, SEEK_CUR); + if (here == -1ll) return -1;
- __int64 const end = _lseeki64_nolock(fh, 0i64, SEEK_END); - if (end == -1i64) + __int64 const end = _lseeki64_nolock(fh, 0ll, SEEK_END); + if (end == -1ll) return -1;
// Now we can test if we're at the end: diff --git a/sdk/lib/ucrt/time/ftime.cpp b/sdk/lib/ucrt/time/ftime.cpp index c65aca5601e..2e6f98a23d8 100644 --- a/sdk/lib/ucrt/time/ftime.cpp +++ b/sdk/lib/ucrt/time/ftime.cpp @@ -48,7 +48,7 @@ static errno_t __cdecl common_ftime_s(TimeBType* const tp) throw()
// Obtain the current Daylight Savings Time status. Note that the status is // cached and only updated once per minute, if necessary. - TimeType const current_minutes_value = static_cast<TimeType>(system_time._scalar / 600000000i64); + TimeType const current_minutes_value = static_cast<TimeType>(system_time._scalar / 600000000ll); if (static_cast<__time64_t>(current_minutes_value) != elapsed_minutes_cache) { TIME_ZONE_INFORMATION tz_info; @@ -78,8 +78,8 @@ static errno_t __cdecl common_ftime_s(TimeBType* const tp) throw() }
tp->dstflag = static_cast<short>(dstflag_cache); - tp->millitm = static_cast<unsigned short>((system_time._scalar / 10000i64) % 1000i64); - tp->time = static_cast<TimeType>((system_time._scalar - _EPOCH_BIAS) / 10000000i64); + tp->millitm = static_cast<unsigned short>((system_time._scalar / 10000ll) % 1000ll); + tp->time = static_cast<TimeType>((system_time._scalar - _EPOCH_BIAS) / 10000000ll);
return 0; }