mirror of
https://github.com/reactos/reactos.git
synced 2025-08-03 16:36:07 +00:00
[UCRT] Fix non-standard literal suffixes
This commit is contained in:
parent
ffd69754f9
commit
4de4349109
7 changed files with 18 additions and 18 deletions
|
@ -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 <>
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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:
|
||||
|
|
|
@ -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;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue