https://git.reactos.org/?p=reactos.git;a=commitdiff;h=5ba105e9b59c49b8675f4…
commit 5ba105e9b59c49b8675f4b949bf643b207a9f803
Author: Timo Kreuzer <timo.kreuzer(a)reactos.org>
AuthorDate: Sun Oct 13 19:31:21 2024 +0200
Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org>
CommitDate: Thu Jan 16 14:18:53 2025 +0200
[UCRT] Add some missing typename for GCC compatibility
---
sdk/lib/ucrt/inc/corecrt_internal_strtox.h | 2 +-
sdk/lib/ucrt/internal/win_policies.cpp | 8 ++++----
sdk/lib/ucrt/string/strnlen.cpp | 4 ++--
3 files changed, 7 insertions(+), 7 deletions(-)
diff --git a/sdk/lib/ucrt/inc/corecrt_internal_strtox.h
b/sdk/lib/ucrt/inc/corecrt_internal_strtox.h
index 68293919858..102724dda7d 100644
--- a/sdk/lib/ucrt/inc/corecrt_internal_strtox.h
+++ b/sdk/lib/ucrt/inc/corecrt_internal_strtox.h
@@ -1329,7 +1329,7 @@ floating_point_parse_result __cdecl
parse_floating_point_possible_nan(
StoredState stored_state
) throw()
{
- using char_type = CharacterSource::char_type;
+ using char_type = typename CharacterSource::char_type;
auto restore_state = [&]()
{
diff --git a/sdk/lib/ucrt/internal/win_policies.cpp
b/sdk/lib/ucrt/internal/win_policies.cpp
index 55efd95f05c..be0a78accab 100644
--- a/sdk/lib/ucrt/internal/win_policies.cpp
+++ b/sdk/lib/ucrt/internal/win_policies.cpp
@@ -11,7 +11,7 @@
template<typename TPolicy>
static typename TPolicy::policy_type __cdecl get_win_policy(typename
TPolicy::appmodel_policy_type defaultValue)
{
- TPolicy::appmodel_policy_type appmodelPolicy = defaultValue;
+ typename TPolicy::appmodel_policy_type appmodelPolicy = defaultValue;
// Secure processes cannot load the appmodel DLL, so only attempt loading
// policy information if this is not a secure process.
@@ -29,10 +29,10 @@ static typename TPolicy::policy_type __cdecl
get_cached_win_policy(typename TPol
static long state_cache = 0;
if (long const cached_state = __crt_interlocked_read(&state_cache))
{
- return static_cast<TPolicy::policy_type>(cached_state);
+ return static_cast<typename TPolicy::policy_type>(cached_state);
}
- TPolicy::appmodel_policy_type appmodelPolicy = defaultValue;
+ typename TPolicy::appmodel_policy_type appmodelPolicy = defaultValue;
// Secure processes cannot load the appmodel DLL, so only attempt loading
// policy information if this is not a secure process.
@@ -41,7 +41,7 @@ static typename TPolicy::policy_type __cdecl
get_cached_win_policy(typename TPol
TPolicy::appmodel_get_policy(&appmodelPolicy);
}
- TPolicy::policy_type const policyValue =
TPolicy::appmodel_policy_to_policy_type(appmodelPolicy);
+ typename TPolicy::policy_type const policyValue =
TPolicy::appmodel_policy_to_policy_type(appmodelPolicy);
long const cached_state = _InterlockedExchange(&state_cache,
static_cast<long>(policyValue));
if (cached_state)
diff --git a/sdk/lib/ucrt/string/strnlen.cpp b/sdk/lib/ucrt/string/strnlen.cpp
index 5465e0ff863..6cee4e85e0f 100644
--- a/sdk/lib/ucrt/string/strnlen.cpp
+++ b/sdk/lib/ucrt/string/strnlen.cpp
@@ -138,7 +138,7 @@ static __forceinline size_t __cdecl common_strnlen_c(
// [2] Aligned Vector Loop (Middle)
__crt_simd_cleanup_guard<Isa> const simd_cleanup;
- traits::pack_type const zero = traits::get_zero_pack();
+ typename traits::pack_type const zero = traits::get_zero_pack();
size_t const middle_and_suffix_count = maximum_count - prefix_count;
size_t const suffix_count = middle_and_suffix_count %
traits::pack_size;
@@ -147,7 +147,7 @@ static __forceinline size_t __cdecl common_strnlen_c(
Element const* const middle_last = it + middle_count;
while (!last_reached<Mode>(it, middle_last))
{
- auto const element_it = reinterpret_cast<traits::pack_type
const*>(it);
+ auto const element_it = reinterpret_cast<typename traits::pack_type
const*>(it);
bool const element_has_terminator =
traits::compute_byte_mask(traits::compare_equals(*element_it, zero)) != 0;
if (element_has_terminator)