ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
January 2025
----- 2025 -----
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
23 participants
278 discussions
Start a n
N
ew thread
[reactos] 18/33: [UCRT] Use GCC inline assembler
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=faedd8ff756f41cc2bf7e…
commit faedd8ff756f41cc2bf7edbee1be17d1532dcce9 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Oct 13 10:56:28 2024 +0300 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Jan 16 14:18:53 2025 +0200 [UCRT] Use GCC inline assembler Clang requires the asm to be split, otherwise it complains that it doesn't have enough registers. --- sdk/include/ucrt/fenv.h | 4 +++ sdk/lib/ucrt/inc/corecrt_internal_big_integer.h | 18 ++++++++++++- sdk/lib/ucrt/misc/invalid_parameter.cpp | 34 ++++++++++++++++++++++++- 3 files changed, 54 insertions(+), 2 deletions(-) diff --git a/sdk/include/ucrt/fenv.h b/sdk/include/ucrt/fenv.h index d5ac594ebd9..6384e4697b5 100644 --- a/sdk/include/ucrt/fenv.h +++ b/sdk/include/ucrt/fenv.h @@ -130,7 +130,11 @@ _ACRTIMP int __cdecl fesetround(_In_ int _Round); // next floating point instruction. If we're using /arch:IA32, // force the exception to be raised immediately: #if defined _M_IX86 && _M_IX86_FP == 0 && !defined _M_HYBRID_X86_ARM64 + #ifdef _MSC_VER __asm fwait; + #else + __asm__ __volatile__("fwait"); + #endif #endif } } diff --git a/sdk/lib/ucrt/inc/corecrt_internal_big_integer.h b/sdk/lib/ucrt/inc/corecrt_internal_big_integer.h index 817eae6ea11..e97db5cfbbd 100644 --- a/sdk/lib/ucrt/inc/corecrt_internal_big_integer.h +++ b/sdk/lib/ucrt/inc/corecrt_internal_big_integer.h @@ -686,6 +686,7 @@ __forceinline uint32_t __cdecl count_sequential_high_zeroes(uint32_t const u) th uint32_t const multiplier ) throw() { + #ifdef _MSC_VER __asm { mov eax, dword ptr [multiplicand + 4] @@ -698,6 +699,21 @@ __forceinline uint32_t __cdecl count_sequential_high_zeroes(uint32_t const u) th add edx, ecx } + #else // ^^^ _MSC_VER ^^^ // vvv !_MSC_VER vvv // + uint64_t retval; + __asm__( + "mull %[multiplier]\n" + "movl %%eax, %%ecx\n" + "movl %[multiplicand_lo], %%eax\n" + "mull %[multiplier]\n" + "addl %%ecx, %%edx\n" + : "=A" (retval) + : [multiplicand_hi] "a" ((uint32_t)((multiplicand >> 32) & 0xFFFFFFFF)), + [multiplicand_lo] "rm" ((uint32_t)((multiplicand >> 0) & 0xFFFFFFFF)), + [multiplier] "rm" (multiplier) + : "ecx" ); + return retval; + #endif // !_MSC_VER } #else __forceinline uint64_t __cdecl multiply_64_32( @@ -869,7 +885,7 @@ inline uint64_t __cdecl divide( } // Multiply and subtract. Note that uu_quo may be one too large. If - // we have a borrow at the end, we'll add the denominator back on and + // we have a borrow at the end, we'll add the denominator back on and // decrement uu_quo. if (uu_quo > 0) { diff --git a/sdk/lib/ucrt/misc/invalid_parameter.cpp b/sdk/lib/ucrt/misc/invalid_parameter.cpp index accd35f348a..7865ca156db 100644 --- a/sdk/lib/ucrt/misc/invalid_parameter.cpp +++ b/sdk/lib/ucrt/misc/invalid_parameter.cpp @@ -166,7 +166,38 @@ extern "C" __declspec(noreturn) void __cdecl _invalid_parameter_noinfo_noreturn( EXCEPTION_POINTERS ExceptionPointers = {&ExceptionRecord, &ContextRecord}; #ifdef _M_IX86 - + #if defined(__GNUC__) || defined(__clang__) + __asm__ __volatile__( + "movl %%eax, %[CxEax]\n\t" + "movl %%ecx, %[CxEcx]\n\t" + "movl %%edx, %[CxEdx]\n\t" + "movl %%ebx, %[CxEbx]\n\t" + "movl %%esi, %[CxEsi]\n\t" + "movl %%edi, %[CxEdi]\n\t" + : [CxEax] "=m" (ContextRecord.Eax), + [CxEcx] "=m" (ContextRecord.Ecx), + [CxEdx] "=m" (ContextRecord.Edx), + [CxEbx] "=m" (ContextRecord.Ebx), + [CxEsi] "=m" (ContextRecord.Esi), + [CxEdi] "=m" (ContextRecord.Edi)); + __asm__ __volatile__( + "movw %%ss, %[CxSegSs]\n\t" + "movw %%cs, %[CxSegCs]\n\t" + "movw %%ds, %[CxSegDs]\n\t" + "movw %%es, %[CxSegEs]\n\t" + "movw %%fs, %[CxSegFs]\n\t" + "movw %%gs, %[CxSegGs]\n\t" + : [CxSegSs] "=m" (ContextRecord.SegSs), + [CxSegCs] "=m" (ContextRecord.SegCs), + [CxSegDs] "=m" (ContextRecord.SegDs), + [CxSegEs] "=m" (ContextRecord.SegEs), + [CxSegFs] "=m" (ContextRecord.SegFs), + [CxSegGs] "=m" (ContextRecord.SegGs)); + __asm__ __volatile__( + "pushfl\n\t" + "popl %[CxEFlags]\n\t" + : [CxEFlags] "=m" (ContextRecord.EFlags)); + #else // ^^^ __GNUC__ ^^^ // vvv !__GNUC__ vvv // __asm { mov dword ptr [ContextRecord.Eax ], eax @@ -184,6 +215,7 @@ extern "C" __declspec(noreturn) void __cdecl _invalid_parameter_noinfo_noreturn( pushfd pop [ContextRecord.EFlags] } + #endif // !__GNUC__ ContextRecord.ContextFlags = CONTEXT_CONTROL;
2 weeks, 6 days
1
0
0
0
[reactos] 17/33: [UCRT] Add casts to make GCC happy
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=0cdde63c57f00dc3abfd5…
commit 0cdde63c57f00dc3abfd5663fc3d5ac52c07dcbf Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Oct 13 19:22:21 2024 +0300 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Jan 16 14:18:53 2025 +0200 [UCRT] Add casts to make GCC happy --- sdk/lib/ucrt/startup/thread.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/sdk/lib/ucrt/startup/thread.cpp b/sdk/lib/ucrt/startup/thread.cpp index 8af08c2c9c0..00ce20d8b21 100644 --- a/sdk/lib/ucrt/startup/thread.cpp +++ b/sdk/lib/ucrt/startup/thread.cpp @@ -126,7 +126,7 @@ static __acrt_thread_parameter* __cdecl create_thread_parameter( return nullptr; } - parameter.get()->_procedure = procedure; + parameter.get()->_procedure = reinterpret_cast<void*>(procedure); parameter.get()->_context = context; // Attempt to bump the reference count of the module in which the user's @@ -149,7 +149,7 @@ extern "C" uintptr_t __cdecl _beginthread( { _VALIDATE_RETURN(procedure != nullptr, EINVAL, reinterpret_cast<uintptr_t>(INVALID_HANDLE_VALUE)); - unique_thread_parameter parameter(create_thread_parameter(procedure, context)); + unique_thread_parameter parameter(create_thread_parameter(reinterpret_cast<void*>(procedure), context)); if (!parameter) { return reinterpret_cast<uintptr_t>(INVALID_HANDLE_VALUE); @@ -199,7 +199,7 @@ extern "C" uintptr_t __cdecl _beginthreadex( { _VALIDATE_RETURN(procedure != nullptr, EINVAL, 0); - unique_thread_parameter parameter(create_thread_parameter(procedure, context)); + unique_thread_parameter parameter(create_thread_parameter((void*)procedure, context)); if (!parameter) { return 0;
2 weeks, 6 days
1
0
0
0
[reactos] 16/33: [UCRT] Fix GCC/Clang compilation of template specializations
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=dbd58d766623596e466f6…
commit dbd58d766623596e466f67bf6c29088c157c5c05 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Oct 13 21:54:37 2024 +0300 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Jan 16 14:18:53 2025 +0200 [UCRT] Fix GCC/Clang compilation of template specializations --- sdk/lib/ucrt/inc/corecrt_internal_traits.h | 35 ++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) diff --git a/sdk/lib/ucrt/inc/corecrt_internal_traits.h b/sdk/lib/ucrt/inc/corecrt_internal_traits.h index bb4c36cd793..d84107e72d7 100644 --- a/sdk/lib/ucrt/inc/corecrt_internal_traits.h +++ b/sdk/lib/ucrt/inc/corecrt_internal_traits.h @@ -17,6 +17,41 @@ #pragma pack(push, _CRT_PACKING) +#if defined(__GNUC__) || defined(__clang__) +// We have to declare them here, because GCC expects them to be declared, +// when the template specializations below are instanciated! +#include <corecrt_io.h> +extern "C" { +errno_t __cdecl _access_s(char const* const path, int const access_mode); +errno_t __cdecl _waccess_s(wchar_t const* const path, int const access_mode); +__time32_t __cdecl __loctotime32_t(int, int, int, int, int, int, int); +__time64_t __cdecl __loctotime64_t(int, int, int, int, int, int, int); +_Check_return_opt_ long __cdecl _lseek_nolock(_In_ int _FileHandle, _In_ long _Offset, _In_ int _Origin); +_Check_return_opt_ __int64 __cdecl _lseeki64_nolock(_In_ int _FileHandle, _In_ __int64 _Offset, _In_ int _Origin); +_ACRTIMP __time32_t __cdecl _time32(_Out_opt_ __time32_t* _Time); +_ACRTIMP __time64_t __cdecl _time64(_Out_opt_ __time64_t* _Time); +_Success_(return == 0) +errno_t __cdecl _sopen_nolock( + _Out_ int* _UnlockFlag, + _Out_ int* _FileHandle, + _In_z_ char const* _FileName, + _In_ int _OpenFlag, + _In_ int _ShareFlag, + _In_ int _PermissionFlag, + _In_ int _SecureFlag + ); +_Success_(return == 0) +errno_t __cdecl _wsopen_nolock( + _Out_ int* _UnlockFlag, + _Out_ int* _FileHandle, + _In_z_ wchar_t const* _FileName, + _In_ int _OpenFlag, + _In_ int _ShareFlag, + _In_ int _PermissionFlag, + _In_ int _SecureFlag + ); +} // extern "C" +#endif // __GNUC__ //-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
2 weeks, 6 days
1
0
0
0
[reactos] 15/33: [UCRT] Add using declatarions for template base-classes (GCC compatibility)
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=c15b618a17c73384d897f…
commit c15b618a17c73384d897f4d466b2c6a4d3d19256 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Mon Oct 14 00:30:51 2024 +0300 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Jan 16 14:18:53 2025 +0200 [UCRT] Add using declatarions for template base-classes (GCC compatibility) --- sdk/lib/ucrt/inc/corecrt_internal_simd.h | 1 + sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h | 70 ++++++++++++++++++++++++ 2 files changed, 71 insertions(+) diff --git a/sdk/lib/ucrt/inc/corecrt_internal_simd.h b/sdk/lib/ucrt/inc/corecrt_internal_simd.h index 6759c756900..5770418e034 100644 --- a/sdk/lib/ucrt/inc/corecrt_internal_simd.h +++ b/sdk/lib/ucrt/inc/corecrt_internal_simd.h @@ -42,6 +42,7 @@ : __crt_simd_pack_traits<Isa> { using element_type = Element; + using __crt_simd_pack_traits<Isa>::pack_size; enum : size_t { diff --git a/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h b/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h index e3ebfe4fd6f..cde4af0e080 100644 --- a/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h +++ b/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h @@ -111,6 +111,10 @@ template <typename Character> class console_output_adapter : public output_adapter_common<Character, console_output_adapter<Character>> { +#ifndef _MSC_VER // For retarded compilers! + using oac_base = output_adapter_common<Character, console_output_adapter<Character>>; + using oac_base::write_string_impl; +#endif public: typedef __acrt_stdio_char_traits<Character> char_traits; @@ -141,6 +145,10 @@ template <typename Character> class stream_output_adapter : public output_adapter_common<Character, stream_output_adapter<Character>> { +#ifndef _MSC_VER // For retarded compilers! + using oac_base = output_adapter_common<Character, stream_output_adapter<Character>>; + using oac_base::write_string_impl; +#endif public: typedef __acrt_stdio_char_traits<Character> char_traits; @@ -969,6 +977,11 @@ class output_adapter_data : protected common_data<Character> { protected: +#ifndef _MSC_VER // For retarded compilers! + using common_data<Character>::_options; + using common_data<Character>::_format_it; + using common_data<Character>::_valist_it; +#endif output_adapter_data( OutputAdapter const& output_adapter, uint64_t const options, @@ -1003,6 +1016,12 @@ class standard_base : protected output_adapter_data<Character, OutputAdapter> { protected: +#ifndef _MSC_VER // For retarded compilers! + using common_data_base = typename output_adapter_data<Character, OutputAdapter>::template common_data<Character>; + using common_data_base::_valist_it; + using common_data_base::_field_width; + using common_data_base::_precision; +#endif template <typename... Ts> standard_base(Ts&&... arguments) throw() : output_adapter_data<Character, OutputAdapter>{arguments... }, @@ -1106,6 +1125,11 @@ class format_validation_base : protected standard_base<Character, OutputAdapter> { protected: +#ifndef _MSC_VER // For retarded compilers! + using common_data_base = typename standard_base<Character, OutputAdapter>::template output_adapter_data<Character, OutputAdapter>::template common_data<Character>; + using common_data_base::_ptd; + using common_data_base::_state; +#endif template <typename... Ts> format_validation_base(Ts&&... arguments) throw() : standard_base<Character, OutputAdapter>{arguments...} @@ -1150,6 +1174,19 @@ class positional_parameter_base : protected format_validation_base<Character, OutputAdapter> { protected: +#if defined(__GNUC__) || defined(__clang__) // For retarded compilers! + using common_data_base = typename format_validation_base<Character, OutputAdapter>::template standard_base<Character, OutputAdapter>::template output_adapter_data<Character, OutputAdapter>::template common_data<Character>; + using output_adapter_data = typename format_validation_base<Character, OutputAdapter>::template standard_base<Character, OutputAdapter>::template output_adapter_data<Character, OutputAdapter>; + using common_data_base::_format_it; + using common_data_base::_ptd; + using common_data_base::_field_width; + using common_data_base::_precision; + using common_data_base::_format_char; + using common_data_base::_valist_it; + using common_data_base::_length; + using common_data_base::_state; + using common_data_base::_options; +#endif typedef positional_parameter_base self_type; typedef format_validation_base base_type; @@ -1641,6 +1678,39 @@ class output_processor : private ProcessorBase { public: +#ifndef _MSC_VER // For retarded compilers! + using ProcessorBase::advance_to_next_pass; + using ProcessorBase::validate_and_update_state_at_beginning_of_format_character; + using ProcessorBase::validate_and_update_state_at_end_of_format_string; + using ProcessorBase::should_skip_normal_state_processing; + using ProcessorBase::update_field_width; + using ProcessorBase::should_format; + using ProcessorBase::update_precision; + using ProcessorBase::should_skip_type_state_output; + using ProcessorBase::validate_state_for_type_case_a; + using ProcessorBase::tchar_string; + using ProcessorBase::state_transition_table; + using ProcessorBase::state_count; + using oad_base = typename ProcessorBase::output_adapter_data; + using oad_base::_output_adapter; + using common_data_base = typename ProcessorBase::common_data_base; + using common_data_base::_string_length; + using common_data_base::_ptd; + using common_data_base::_format_it; + using common_data_base::_state; + using common_data_base::_format_char; + using common_data_base::_characters_written; + using common_data_base::_string_is_wide; + using common_data_base::_field_width; + using common_data_base::_suppress_output; + using common_data_base::_flags; + using common_data_base::_precision; + using common_data_base::_length; + using common_data_base::_options; + using common_data_base::_buffer; + using common_data_base::_narrow_string; + using common_data_base::_wide_string; +#endif typedef __acrt_stdio_char_traits<Character> char_traits;
2 weeks, 6 days
1
0
0
0
[reactos] 14/33: [UCRT] Add some missing typename for GCC compatibility
by Timo Kreuzer
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)
2 weeks, 6 days
1
0
0
0
[reactos] 13/33: [UCRT] Fix shadowing template parameters
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=90fb8391fc0dad974fa18…
commit 90fb8391fc0dad974fa18622c33590418f7a918c Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Oct 13 21:23:16 2024 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Jan 16 14:18:53 2025 +0200 [UCRT] Fix shadowing template parameters --- sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h b/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h index 3cb318e2b91..e3ebfe4fd6f 100644 --- a/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h +++ b/sdk/lib/ucrt/inc/corecrt_internal_stdio_output.h @@ -1580,26 +1580,26 @@ private: return true; } - template <typename Character> - static bool __cdecl is_pointer_specifier(Character const specifier) throw() + template <typename Character2> + static bool __cdecl is_pointer_specifier(Character2 const specifier) throw() { return specifier == 'p'; } - template <typename Character> - static bool __cdecl is_string_specifier(Character const specifier) throw() + template <typename Character2> + static bool __cdecl is_string_specifier(Character2 const specifier) throw() { return specifier == 's' || specifier == 'S'; } - template <typename Character> - static bool __cdecl is_character_specifier(Character const specifier) throw() + template <typename Character2> + static bool __cdecl is_character_specifier(Character2 const specifier) throw() { return specifier == 'c' || specifier == 'C'; } - template <typename Character> - static bool __cdecl is_integral_specifier(Character const specifier) throw() + template <typename Character2> + static bool __cdecl is_integral_specifier(Character2 const specifier) throw() { return specifier == 'd' || specifier == 'i' || specifier == 'o' || specifier == 'u' || specifier == 'x' || specifier == 'X'
2 weeks, 6 days
1
0
0
0
[reactos] 12/33: [UCRT] Fix template specialization
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=482f318a23ace897676a0…
commit 482f318a23ace897676a0b2f04c542fab7a3d143 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Oct 13 19:19:19 2024 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Jan 16 14:18:53 2025 +0200 [UCRT] Fix template specialization --- sdk/lib/ucrt/filesystem/findfile.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/sdk/lib/ucrt/filesystem/findfile.cpp b/sdk/lib/ucrt/filesystem/findfile.cpp index d2160a7af8d..d0ed4205137 100644 --- a/sdk/lib/ucrt/filesystem/findfile.cpp +++ b/sdk/lib/ucrt/filesystem/findfile.cpp @@ -27,13 +27,13 @@ template <typename CrtTime> static CrtTime __cdecl convert_system_time_to_time_t(SYSTEMTIME const& st) throw(); template <> -static __time32_t __cdecl convert_system_time_to_time_t(SYSTEMTIME const& st) throw() +__time32_t __cdecl convert_system_time_to_time_t(SYSTEMTIME const& st) throw() { return __loctotime32_t(st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, -1); } template <> -static __time64_t __cdecl convert_system_time_to_time_t(SYSTEMTIME const& st) throw() +__time64_t __cdecl convert_system_time_to_time_t(SYSTEMTIME const& st) throw() { return __loctotime64_t(st.wYear, st.wMonth, st.wDay, st.wHour, st.wMinute, st.wSecond, -1); } @@ -64,13 +64,13 @@ template <typename Integer> static Integer convert_file_size_to_integer(DWORD const high, DWORD const low) throw(); template <> -static __int64 convert_file_size_to_integer(DWORD const high, DWORD const low) throw() +__int64 convert_file_size_to_integer(DWORD const high, DWORD const low) throw() { return static_cast<__int64>(high) * 0x100000000ll + static_cast<__int64>(low); } template <> -static unsigned long convert_file_size_to_integer(DWORD const high, DWORD const low) throw() +unsigned long convert_file_size_to_integer(DWORD const high, DWORD const low) throw() { UNREFERENCED_PARAMETER(high); return low;
2 weeks, 6 days
1
0
0
0
[reactos] 11/33: [UCRT] Fix invalid storage type specification
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=7a764cf6100785cf32f75…
commit 7a764cf6100785cf32f75dfe1b78f9797999ceb9 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Oct 13 19:43:08 2024 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Jan 16 14:18:53 2025 +0200 [UCRT] Fix invalid storage type specification --- sdk/lib/ucrt/locale/setlocale.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/sdk/lib/ucrt/locale/setlocale.cpp b/sdk/lib/ucrt/locale/setlocale.cpp index f62aad32224..e017173208b 100644 --- a/sdk/lib/ucrt/locale/setlocale.cpp +++ b/sdk/lib/ucrt/locale/setlocale.cpp @@ -12,7 +12,7 @@ #include <locale.h> #include <stdlib.h> -extern "C" static wchar_t* __cdecl call_wsetlocale(int const category, char const* const narrow_locale) +static wchar_t* __cdecl call_wsetlocale(int const category, char const* const narrow_locale) { if (narrow_locale == nullptr) return _wsetlocale(category, nullptr);
2 weeks, 6 days
1
0
0
0
[reactos] 10/33: [UCRT] Fix non-standard literal suffixes
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=4de4349109055cc4ddd12…
commit 4de4349109055cc4ddd127c04065fbd61b737ec7 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Oct 13 10:13:44 2024 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)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; }
2 weeks, 6 days
1
0
0
0
[reactos] 09/33: [UCRT] Fix non-standard extern "C" usage
by Timo Kreuzer
https://git.reactos.org/?p=reactos.git;a=commitdiff;h=ffd69754f9d6d37fcd01f…
commit ffd69754f9d6d37fcd01fe1ec58a9e7f9365e5e6 Author: Timo Kreuzer <timo.kreuzer(a)reactos.org> AuthorDate: Sun Oct 13 10:05:04 2024 +0200 Commit: Timo Kreuzer <timo.kreuzer(a)reactos.org> CommitDate: Thu Jan 16 14:18:53 2025 +0200 [UCRT] Fix non-standard extern "C" usage --- sdk/lib/ucrt/conio/cgets.cpp | 6 +-- sdk/lib/ucrt/conio/cgetws.cpp | 4 +- sdk/lib/ucrt/conio/getch.cpp | 2 +- sdk/lib/ucrt/conio/getwch.cpp | 2 +- sdk/lib/ucrt/convert/_wctype.cpp | 62 +++++++++++++++---------------- sdk/lib/ucrt/convert/fp_flags.cpp | 2 +- sdk/lib/ucrt/heap/debug_heap.cpp | 8 ++-- sdk/lib/ucrt/heap/debug_heap_hook.cpp | 2 +- sdk/lib/ucrt/heap/heap_handle.cpp | 2 +- sdk/lib/ucrt/inc/corecrt_internal_stdio.h | 4 +- sdk/lib/ucrt/locale/ctype.cpp | 18 ++++----- sdk/lib/ucrt/locale/glstatus.cpp | 2 +- sdk/lib/ucrt/locale/localeconv.cpp | 14 +++---- sdk/lib/ucrt/locale/nlsdata.cpp | 16 ++++---- sdk/lib/ucrt/lowio/ioinit.cpp | 8 ++-- sdk/lib/ucrt/lowio/read.cpp | 4 +- sdk/lib/ucrt/lowio/umask.cpp | 2 +- sdk/lib/ucrt/misc/dbgrpt.cpp | 6 +-- sdk/lib/ucrt/misc/exception_filter.cpp | 12 +++--- sdk/lib/ucrt/startup/abort.cpp | 2 +- sdk/lib/ucrt/startup/exit.cpp | 4 +- sdk/lib/ucrt/startup/onexit.cpp | 4 +- sdk/lib/ucrt/stdio/_file.cpp | 6 +-- sdk/lib/ucrt/stdio/_sftbuf.cpp | 4 +- sdk/lib/ucrt/stdio/ncommode.cpp | 2 +- sdk/lib/ucrt/stdio/rmtmp.cpp | 6 +-- sdk/lib/ucrt/stdio/tmpfile.cpp | 2 +- 27 files changed, 104 insertions(+), 102 deletions(-) diff --git a/sdk/lib/ucrt/conio/cgets.cpp b/sdk/lib/ucrt/conio/cgets.cpp index b116cdf8ae2..fe3fffea718 100644 --- a/sdk/lib/ucrt/conio/cgets.cpp +++ b/sdk/lib/ucrt/conio/cgets.cpp @@ -11,7 +11,7 @@ -extern "C" extern intptr_t __dcrt_lowio_console_input_handle; +extern "C" { extern intptr_t __dcrt_lowio_console_input_handle; } @@ -20,8 +20,8 @@ extern "C" extern intptr_t __dcrt_lowio_console_input_handle; // character buffer and the unicode character is not converted to single byte // MBC, then _cget_s should buffer that character so that next call to // _cgetws_s can return the same character. -extern "C" extern wchar_t __console_wchar_buffer; -extern "C" extern int __console_wchar_buffer_used; +extern "C" { extern wchar_t __console_wchar_buffer; } +extern "C" { extern int __console_wchar_buffer_used; } diff --git a/sdk/lib/ucrt/conio/cgetws.cpp b/sdk/lib/ucrt/conio/cgetws.cpp index 7dc4a25afbb..0149e82b2b4 100644 --- a/sdk/lib/ucrt/conio/cgetws.cpp +++ b/sdk/lib/ucrt/conio/cgetws.cpp @@ -15,8 +15,8 @@ // character buffer and the unicode character is not converted to single byte // MBC, then _cget_s should buffer that character so that next call to // _cgetws_s can return the same character. -extern "C" wchar_t __console_wchar_buffer = 0; -extern "C" int __console_wchar_buffer_used = 0; +extern "C" { wchar_t __console_wchar_buffer = 0; } +extern "C" { int __console_wchar_buffer_used = 0; } diff --git a/sdk/lib/ucrt/conio/getch.cpp b/sdk/lib/ucrt/conio/getch.cpp index 2d1dba3720e..0a8699b8053 100644 --- a/sdk/lib/ucrt/conio/getch.cpp +++ b/sdk/lib/ucrt/conio/getch.cpp @@ -229,7 +229,7 @@ static int get_next_getch_pushback_buffer() return ret_val; } -extern "C" extern intptr_t __dcrt_lowio_console_input_handle; +extern "C" intptr_t __dcrt_lowio_console_input_handle; extern "C" CharPair const* __cdecl _getextendedkeycode(KEY_EVENT_RECORD*); extern "C" int __cdecl _kbhit_nolock(); diff --git a/sdk/lib/ucrt/conio/getwch.cpp b/sdk/lib/ucrt/conio/getwch.cpp index df8902e6c1e..cfc0a8ab7ac 100644 --- a/sdk/lib/ucrt/conio/getwch.cpp +++ b/sdk/lib/ucrt/conio/getwch.cpp @@ -27,7 +27,7 @@ namespace static wint_t wchbuf = WEOF; // The push-back buffer -extern "C" extern intptr_t __dcrt_lowio_console_input_handle; +extern "C" intptr_t __dcrt_lowio_console_input_handle; extern "C" CharPair const* __cdecl _getextendedkeycode(KEY_EVENT_RECORD*); diff --git a/sdk/lib/ucrt/convert/_wctype.cpp b/sdk/lib/ucrt/convert/_wctype.cpp index f82d766357f..e1a64516a5b 100644 --- a/sdk/lib/ucrt/convert/_wctype.cpp +++ b/sdk/lib/ucrt/convert/_wctype.cpp @@ -14,158 +14,158 @@ -extern "C" extern __inline int (__cdecl _isleadbyte_l)(int const c, _locale_t const locale) +extern "C" __inline int (__cdecl _isleadbyte_l)(int const c, _locale_t const locale) { _LocaleUpdate locale_update(locale); return __acrt_locale_get_ctype_array_value(locale_update.GetLocaleT()->locinfo->_public._locale_pctype, c, _LEADBYTE); } -extern "C" extern __inline int (__cdecl isleadbyte)(int const c) +extern "C" __inline int (__cdecl isleadbyte)(int const c) { return (_isleadbyte_l)(c, nullptr); } -extern "C" extern __inline int (__cdecl _iswalpha_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswalpha_l)(wint_t const c, _locale_t) { return iswalpha(c); } -extern "C" extern __inline int (__cdecl iswalpha)(wint_t const c) +extern "C" __inline int (__cdecl iswalpha)(wint_t const c) { return iswalpha(c); } -extern "C" extern __inline int (__cdecl _iswupper_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswupper_l)(wint_t const c, _locale_t) { return iswupper(c); } -extern "C" extern __inline int (__cdecl iswupper)(wint_t const c) +extern "C" __inline int (__cdecl iswupper)(wint_t const c) { return iswupper(c); } -extern "C" extern __inline int (__cdecl _iswlower_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswlower_l)(wint_t const c, _locale_t) { return iswlower(c); } -extern "C" extern __inline int (__cdecl iswlower)(wint_t const c) +extern "C" __inline int (__cdecl iswlower)(wint_t const c) { return iswlower(c); } -extern "C" extern __inline int (__cdecl _iswdigit_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswdigit_l)(wint_t const c, _locale_t) { return iswdigit(c); } -extern "C" extern __inline int (__cdecl iswdigit)(wint_t const c) +extern "C" __inline int (__cdecl iswdigit)(wint_t const c) { return iswdigit(c); } -extern "C" extern __inline int (__cdecl _iswxdigit_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswxdigit_l)(wint_t const c, _locale_t) { return iswxdigit(c); } -extern "C" extern __inline int (__cdecl iswxdigit)(wint_t const c) +extern "C" __inline int (__cdecl iswxdigit)(wint_t const c) { return iswxdigit(c); } -extern "C" extern __inline int (__cdecl _iswspace_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswspace_l)(wint_t const c, _locale_t) { return iswspace(c); } -extern "C" extern __inline int (__cdecl iswspace)(wint_t const c) +extern "C" __inline int (__cdecl iswspace)(wint_t const c) { return iswspace(c); } -extern "C" extern __inline int (__cdecl _iswpunct_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswpunct_l)(wint_t const c, _locale_t) { return iswpunct(c); } -extern "C" extern __inline int (__cdecl iswpunct)(wint_t const c) +extern "C" __inline int (__cdecl iswpunct)(wint_t const c) { return iswpunct(c); } -extern "C" extern __inline int (__cdecl _iswblank_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswblank_l)(wint_t const c, _locale_t) { return iswblank(c); } -extern "C" extern __inline int (__cdecl iswblank)(wint_t const c) +extern "C" __inline int (__cdecl iswblank)(wint_t const c) { return iswblank(c); } -extern "C" extern __inline int (__cdecl _iswalnum_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswalnum_l)(wint_t const c, _locale_t) { return iswalnum(c); } -extern "C" extern __inline int (__cdecl iswalnum)(wint_t const c) +extern "C" __inline int (__cdecl iswalnum)(wint_t const c) { return iswalnum(c); } -extern "C" extern __inline int (__cdecl _iswprint_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswprint_l)(wint_t const c, _locale_t) { return iswprint(c); } -extern "C" extern __inline int (__cdecl iswprint)(wint_t const c) +extern "C" __inline int (__cdecl iswprint)(wint_t const c) { return iswprint(c); } -extern "C" extern __inline int (__cdecl _iswgraph_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswgraph_l)(wint_t const c, _locale_t) { return iswgraph(c); } -extern "C" extern __inline int (__cdecl iswgraph)(wint_t const c) +extern "C" __inline int (__cdecl iswgraph)(wint_t const c) { return iswgraph(c); } -extern "C" extern __inline int (__cdecl _iswcntrl_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswcntrl_l)(wint_t const c, _locale_t) { return iswcntrl(c); } -extern "C" extern __inline int (__cdecl iswcntrl)(wint_t const c) +extern "C" __inline int (__cdecl iswcntrl)(wint_t const c) { return iswcntrl(c); } -extern "C" extern __inline int (__cdecl iswascii)(wint_t const c) +extern "C" __inline int (__cdecl iswascii)(wint_t const c) { return iswascii(c); } -extern "C" extern __inline int (__cdecl _iswcsym_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswcsym_l)(wint_t const c, _locale_t) { return __iswcsym(c); } -extern "C" extern __inline int (__cdecl __iswcsym)(wint_t const c) +extern "C" __inline int (__cdecl __iswcsym)(wint_t const c) { return __iswcsym(c); } -extern "C" extern __inline int (__cdecl _iswcsymf_l)(wint_t const c, _locale_t) +extern "C" __inline int (__cdecl _iswcsymf_l)(wint_t const c, _locale_t) { return __iswcsymf(c); } -extern "C" extern __inline int (__cdecl __iswcsymf)(wint_t const c) +extern "C" __inline int (__cdecl __iswcsymf)(wint_t const c) { return __iswcsymf(c); } diff --git a/sdk/lib/ucrt/convert/fp_flags.cpp b/sdk/lib/ucrt/convert/fp_flags.cpp index 011050b2f77..d7a5f4f1b9b 100644 --- a/sdk/lib/ucrt/convert/fp_flags.cpp +++ b/sdk/lib/ucrt/convert/fp_flags.cpp @@ -6,7 +6,7 @@ // Public data used by the floating point library // -extern "C" int __fastflag{0}; +extern "C" { int __fastflag{0}; } diff --git a/sdk/lib/ucrt/heap/debug_heap.cpp b/sdk/lib/ucrt/heap/debug_heap.cpp index 9d838bc24e0..0a8841e0c5e 100644 --- a/sdk/lib/ucrt/heap/debug_heap.cpp +++ b/sdk/lib/ucrt/heap/debug_heap.cpp @@ -141,9 +141,11 @@ static long __acrt_current_request_number{1}; #undef _crtDbgFlag #undef _crtBreakAlloc -extern "C" int _crtDbgFlag{_CRTDBG_ALLOC_MEM_DF | _CRTDBG_CHECK_DEFAULT_DF}; -extern "C" long _crtBreakAlloc{-1}; -extern "C" _CRT_DUMP_CLIENT _pfnDumpClient{nullptr}; +extern "C" { + int _crtDbgFlag{_CRTDBG_ALLOC_MEM_DF | _CRTDBG_CHECK_DEFAULT_DF}; + long _crtBreakAlloc{-1}; + _CRT_DUMP_CLIENT _pfnDumpClient{nullptr}; +} extern "C" int* __p__crtDbgFlag() { diff --git a/sdk/lib/ucrt/heap/debug_heap_hook.cpp b/sdk/lib/ucrt/heap/debug_heap_hook.cpp index d20dc27225f..475bc72ada9 100644 --- a/sdk/lib/ucrt/heap/debug_heap_hook.cpp +++ b/sdk/lib/ucrt/heap/debug_heap_hook.cpp @@ -37,4 +37,4 @@ extern "C" int __cdecl _CrtDefaultAllocHook( return 1; // Allow all heap operations } -extern "C" _CRT_ALLOC_HOOK _pfnAllocHook = _CrtDefaultAllocHook; +extern "C" { _CRT_ALLOC_HOOK _pfnAllocHook = _CrtDefaultAllocHook; } diff --git a/sdk/lib/ucrt/heap/heap_handle.cpp b/sdk/lib/ucrt/heap/heap_handle.cpp index 7a7a2cf54bd..1d942d930b5 100644 --- a/sdk/lib/ucrt/heap/heap_handle.cpp +++ b/sdk/lib/ucrt/heap/heap_handle.cpp @@ -12,7 +12,7 @@ // The CRT heap handle. This global variable is modified only during CRT // startup and CRT shutdown. -extern "C" HANDLE __acrt_heap = nullptr; +extern "C" { HANDLE __acrt_heap = nullptr; } diff --git a/sdk/lib/ucrt/inc/corecrt_internal_stdio.h b/sdk/lib/ucrt/inc/corecrt_internal_stdio.h index 0a8ab478893..5a493e7acbe 100644 --- a/sdk/lib/ucrt/inc/corecrt_internal_stdio.h +++ b/sdk/lib/ucrt/inc/corecrt_internal_stdio.h @@ -307,13 +307,13 @@ auto __acrt_lock_stream_and_call(FILE* const stream, Action&& action) throw() * the number of stdio-level files which may be open simultaneously. This * is normally set to _NSTREAM_ by the stdio initialization code. */ -extern "C" extern int _nstream; +extern "C" int _nstream; /* * Pointer to the array of pointers to FILE structures that are used * to manage stdio-level files. */ -extern "C" extern __crt_stdio_stream_data** __piob; +extern "C" __crt_stdio_stream_data** __piob; // __acrt_stdio_is_initialized cannot be with the rest of // stdio initialization logic since referencing those symbols diff --git a/sdk/lib/ucrt/locale/ctype.cpp b/sdk/lib/ucrt/locale/ctype.cpp index 12d546214eb..023c711415f 100644 --- a/sdk/lib/ucrt/locale/ctype.cpp +++ b/sdk/lib/ucrt/locale/ctype.cpp @@ -35,7 +35,7 @@ extern "C" unsigned short const* __cdecl __pctype_func() // implement this lookup table for consistency with GetStringTypeW, rather than // try to implement something completely different. We expect this is sufficient, // as C character classification does not map well to Unicode. -extern "C" extern unsigned short const _wctype[] +extern "C" unsigned short const _wctype[] { 0, // -1 EOF _CONTROL , // 00 (NUL) @@ -133,7 +133,7 @@ extern "C" extern unsigned short const _wctype[] _UPPER | C1_ALPHA , // 59 Y _UPPER | C1_ALPHA , // 5A Z _PUNCT , // 5B [ - _PUNCT , // 5C \ + _PUNCT , // 5C '\' _PUNCT , // 5D ] _PUNCT , // 5E ^ _PUNCT , // 5F _ @@ -300,7 +300,7 @@ extern "C" extern unsigned short const _wctype[] _UPPER | C1_ALPHA , //100 (LATIN CAPITAL LETTER A WITH MACRON) }; -extern "C" extern unsigned short const __newctype[384] +extern "C" unsigned short const __newctype[384] { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -443,7 +443,7 @@ extern "C" extern unsigned short const __newctype[384] // and the rest are 0... }; -extern "C" extern unsigned char const __newclmap[384] +extern "C" unsigned char const __newclmap[384] { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, @@ -545,7 +545,7 @@ extern "C" extern unsigned char const __newclmap[384] 0x79, // 59 Y 0x7A, // 5A Z 0x5B, // 5B [ - 0x5C, // 5C \ + 0x5C, // 5C '\' 0x5D, // 5D ] 0x5E, // 5E ^ 0x5F, // 5F _ @@ -591,7 +591,7 @@ extern "C" extern unsigned char const __newclmap[384] 0xf0, 0xf1, 0xf2, 0xf3, 0xf4, 0xf5, 0xf6, 0xf7, 0xf8, 0xf9, 0xfa, 0xfb, 0xfc, 0xfd, 0xfe, 0xff }; -extern "C" extern unsigned char const __newcumap[384] +extern "C" unsigned char const __newcumap[384] { 0x80, 0x81, 0x82, 0x83, 0x84, 0x85, 0x86, 0x87, 0x88, 0x89, 0x8a, 0x8b, 0x8c, 0x8d, 0x8e, 0x8f, 0x90, 0x91, 0x92, 0x93, 0x94, 0x95, 0x96, 0x97, 0x98, 0x99, 0x9a, 0x9b, 0x9c, 0x9d, 0x9e, 0x9f, @@ -693,7 +693,7 @@ extern "C" extern unsigned char const __newcumap[384] 0x59, // 59 Y 0x5A, // 5A Z 0x5B, // 5B [ - 0x5C, // 5C \ + 0x5C, // 5C '\' 0x5D, // 5D ] 0x5E, // 5E ^ 0x5F, // 5F _ @@ -741,5 +741,5 @@ extern "C" extern unsigned char const __newcumap[384] -extern "C" unsigned short const* _pctype {__newctype + 128}; // Pointer to table for char's -extern "C" unsigned short const* _pwctype{_wctype + 1 }; // Pointer to table for wchar_t's +extern "C" { unsigned short const* _pctype {__newctype + 128}; } // Pointer to table for char's +extern "C" { unsigned short const* _pwctype{_wctype + 1 }; } // Pointer to table for wchar_t's diff --git a/sdk/lib/ucrt/locale/glstatus.cpp b/sdk/lib/ucrt/locale/glstatus.cpp index 4f24c0f2fa8..0cf74dc108c 100644 --- a/sdk/lib/ucrt/locale/glstatus.cpp +++ b/sdk/lib/ucrt/locale/glstatus.cpp @@ -10,4 +10,4 @@ #include <corecrt_internal.h> -extern "C" int __globallocalestatus = (~_GLOBAL_LOCALE_BIT); +extern "C" { int __globallocalestatus = (~_GLOBAL_LOCALE_BIT); } diff --git a/sdk/lib/ucrt/locale/localeconv.cpp b/sdk/lib/ucrt/locale/localeconv.cpp index c5a48bfb199..6aa6242f971 100644 --- a/sdk/lib/ucrt/locale/localeconv.cpp +++ b/sdk/lib/ucrt/locale/localeconv.cpp @@ -14,13 +14,13 @@ /* pointer to original static to avoid freeing */ -extern "C" char __acrt_lconv_static_decimal []{"."}; -extern "C" char __acrt_lconv_static_null []{""}; -extern "C" wchar_t __acrt_lconv_static_W_decimal[]{L"."}; -extern "C" wchar_t __acrt_lconv_static_W_null []{L""}; +extern "C" { char __acrt_lconv_static_decimal []{"."}; } +extern "C" { char __acrt_lconv_static_null []{""}; } +extern "C" { wchar_t __acrt_lconv_static_W_decimal[]{L"."}; } +extern "C" { wchar_t __acrt_lconv_static_W_null []{L""}; } /* lconv settings for "C" locale */ -extern "C" struct lconv __acrt_lconv_c +extern "C" { struct lconv __acrt_lconv_c { __acrt_lconv_static_decimal, // decimal_point __acrt_lconv_static_null, // thousands_sep @@ -48,12 +48,12 @@ extern "C" struct lconv __acrt_lconv_c __acrt_lconv_static_W_null, // _W_mon_thousands_sep __acrt_lconv_static_W_null, // _W_positive_sign __acrt_lconv_static_W_null, // _W_negative_sign -}; +}; } /* pointer to current lconv structure */ -extern "C" struct lconv* __acrt_lconv{&__acrt_lconv_c}; +extern "C" { struct lconv* __acrt_lconv{&__acrt_lconv_c}; } /*** *struct lconv *localeconv(void) - Return the numeric formatting convention diff --git a/sdk/lib/ucrt/locale/nlsdata.cpp b/sdk/lib/ucrt/locale/nlsdata.cpp index bdd4995463c..7783896cb43 100644 --- a/sdk/lib/ucrt/locale/nlsdata.cpp +++ b/sdk/lib/ucrt/locale/nlsdata.cpp @@ -10,7 +10,7 @@ -extern "C" int __mb_cur_max{1}; +extern "C" { int __mb_cur_max{1}; } @@ -25,11 +25,11 @@ extern "C" int* __cdecl __p___mb_cur_max() -extern "C" wchar_t __acrt_wide_c_locale_string[]{L"C"}; +extern "C" { wchar_t __acrt_wide_c_locale_string[]{L"C"}; } -extern "C" __crt_lc_time_data const __lc_time_c +extern "C" { __crt_lc_time_data const __lc_time_c { { "Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat" }, @@ -82,13 +82,13 @@ extern "C" __crt_lc_time_data const __lc_time_c L"dddd, MMMM dd, yyyy", L"HH:mm:ss", L"en-US" -}; +}; } // The initial locale information structure, containing the C locale data. It // is used until the first call to setlocale(). -extern "C" __crt_locale_data __acrt_initial_locale_data +extern "C" { __crt_locale_data __acrt_initial_locale_data { { __newctype + 128, // _locale_pctype @@ -124,7 +124,7 @@ extern "C" __crt_locale_data __acrt_initial_locale_data nullptr, // locale_name[LC_NUMERIC] nullptr // locale_name[LC_TIME] } -}; +}; } @@ -133,8 +133,8 @@ __crt_state_management::dual_state_global<__crt_locale_data*> __acrt_current_loc -extern "C" __crt_locale_pointers __acrt_initial_locale_pointers +extern "C" { __crt_locale_pointers __acrt_initial_locale_pointers { &__acrt_initial_locale_data, &__acrt_initial_multibyte_data -}; +}; } diff --git a/sdk/lib/ucrt/lowio/ioinit.cpp b/sdk/lib/ucrt/lowio/ioinit.cpp index 4fc83a2d929..5a3e858607c 100644 --- a/sdk/lib/ucrt/lowio/ioinit.cpp +++ b/sdk/lib/ucrt/lowio/ioinit.cpp @@ -14,7 +14,7 @@ // This is a special static lowio file object referenced only by the safe access // functionality in the internal headers. It is used in certain stdio-level // functions to more gracefully handle a FILE with -1 as its lowio file id. -extern "C" __crt_lowio_handle_data __badioinfo = +extern "C" { __crt_lowio_handle_data __badioinfo = { { }, // lock static_cast<intptr_t>(-1), // osfhnd @@ -22,7 +22,7 @@ extern "C" __crt_lowio_handle_data __badioinfo = FTEXT, // osfile __crt_lowio_text_mode::ansi, // textmode { LF, LF, LF }, // _pipe_lookahead -}; +}; } @@ -31,12 +31,12 @@ extern "C" __crt_lowio_handle_data __badioinfo = // are necessarily in use at any given time. // // This number is in the range of [IOINFO_ARRAY_ELTS, _NHANDLE_] -extern "C" int _nhandle = 0; +extern "C" { int _nhandle = 0; } // This is the global array of file object arrays: -extern "C" __crt_lowio_handle_data* __pioinfo[IOINFO_ARRAYS] = { 0 }; +extern "C" { __crt_lowio_handle_data* __pioinfo[IOINFO_ARRAYS] = { 0 }; } diff --git a/sdk/lib/ucrt/lowio/read.cpp b/sdk/lib/ucrt/lowio/read.cpp index 17580ec8af1..ee5a3cf2256 100644 --- a/sdk/lib/ucrt/lowio/read.cpp +++ b/sdk/lib/ucrt/lowio/read.cpp @@ -17,7 +17,7 @@ // 0 for everything else, including invalid patterns. // We return 0 for invalid patterns because we rely on MultiByteToWideChar to // do the validations. -extern "C" char _lookuptrailbytes[256] = +extern "C" { char _lookuptrailbytes[256] = { 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -32,7 +32,7 @@ extern "C" char _lookuptrailbytes[256] = 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0 -}; +}; } static void store_lookahead(int const fh, char const c) throw() diff --git a/sdk/lib/ucrt/lowio/umask.cpp b/sdk/lib/ucrt/lowio/umask.cpp index ffd770dc7b3..ad0de502ccc 100644 --- a/sdk/lib/ucrt/lowio/umask.cpp +++ b/sdk/lib/ucrt/lowio/umask.cpp @@ -12,7 +12,7 @@ #include <corecrt_internal_lowio.h> #include <sys\stat.h> -extern "C" int _umaskval = 0; +extern "C" { int _umaskval = 0; } /*** *errno_t _umask(mode, poldmode) - set the file mode mask diff --git a/sdk/lib/ucrt/misc/dbgrpt.cpp b/sdk/lib/ucrt/misc/dbgrpt.cpp index 76ac26fbec3..12c7e444072 100644 --- a/sdk/lib/ucrt/misc/dbgrpt.cpp +++ b/sdk/lib/ucrt/misc/dbgrpt.cpp @@ -27,9 +27,9 @@ * --------------------------------------------------------------------------*/ -extern "C" extern _CRT_REPORT_HOOK _pfnReportHook; -extern "C" extern __crt_report_hook_node<char>* _pReportHookList; -extern "C" extern __crt_report_hook_node<wchar_t>* _pReportHookListW; +extern "C" _CRT_REPORT_HOOK _pfnReportHook; +extern "C" __crt_report_hook_node<char>* _pReportHookList; +extern "C" __crt_report_hook_node<wchar_t>* _pReportHookListW; static __crt_report_hook_node<char>*& __cdecl get_report_hook_list(char) throw() { return _pReportHookList; } static __crt_report_hook_node<wchar_t>*& __cdecl get_report_hook_list(wchar_t) throw() { return _pReportHookListW; } diff --git a/sdk/lib/ucrt/misc/exception_filter.cpp b/sdk/lib/ucrt/misc/exception_filter.cpp index 87d863ed590..221e29605cb 100644 --- a/sdk/lib/ucrt/misc/exception_filter.cpp +++ b/sdk/lib/ucrt/misc/exception_filter.cpp @@ -17,7 +17,7 @@ // signal (e.g. SIGFPE) must be grouped together. If any _action field is // changed in this table, that field must be initialized with an encoded // function pointer during CRT startup. -extern "C" extern struct __crt_signal_action_t const __acrt_exception_action_table[] = +extern "C" struct __crt_signal_action_t const __acrt_exception_action_table[] = { // _exception_number _signal_number _action // -------------------------------------------------------- @@ -38,16 +38,16 @@ extern "C" extern struct __crt_signal_action_t const __acrt_exception_action_tab // WARNING!!! This constant must be the integer value for which // __acrt_exception_action_table[__acrt_signal_action_first_fpe_index] is the very FIRST entry in the table // corresponding to a floating point exception. -extern "C" extern size_t const __acrt_signal_action_first_fpe_index = 3; +extern "C" { size_t const __acrt_signal_action_first_fpe_index = 3; } // There are __acrt_signal_action_fpe_count entries in XcptActTab for floating point exceptions: -extern "C" extern size_t const __acrt_signal_action_fpe_count = 9; +extern "C" { size_t const __acrt_signal_action_fpe_count = 9; } // Size of the exception-action table in bytes -extern "C" extern size_t const __acrt_signal_action_table_size = sizeof(__acrt_exception_action_table); +extern "C" { size_t const __acrt_signal_action_table_size = sizeof(__acrt_exception_action_table); } // Number of entries in the exception-action table -extern "C" extern size_t const __acrt_signal_action_table_count = sizeof(__acrt_exception_action_table) / sizeof(__acrt_exception_action_table[0]); +extern "C" { size_t const __acrt_signal_action_table_count = sizeof(__acrt_exception_action_table) / sizeof(__acrt_exception_action_table[0]); } @@ -218,5 +218,5 @@ extern "C" int __cdecl _seh_filter_exe( // Restore the stored value of _pxcptinfoptrs: ptd->_tpxcptinfoptrs = old_pxcptinfoptrs; - return EXCEPTION_CONTINUE_EXECUTION; + return EXCEPTION_CONTINUE_EXECUTION; } diff --git a/sdk/lib/ucrt/startup/abort.cpp b/sdk/lib/ucrt/startup/abort.cpp index fb4ba55df38..781588df33a 100644 --- a/sdk/lib/ucrt/startup/abort.cpp +++ b/sdk/lib/ucrt/startup/abort.cpp @@ -18,7 +18,7 @@ #define _INIT_ABORT_BEHAVIOR _CALL_REPORTFAULT #endif -extern "C" unsigned int __abort_behavior = _INIT_ABORT_BEHAVIOR; +extern "C" { unsigned int __abort_behavior = _INIT_ABORT_BEHAVIOR; } /*** *void abort() - abort the current program by raising SIGABRT diff --git a/sdk/lib/ucrt/startup/exit.cpp b/sdk/lib/ucrt/startup/exit.cpp index 55ed89be74b..e46e0395d01 100644 --- a/sdk/lib/ucrt/startup/exit.cpp +++ b/sdk/lib/ucrt/startup/exit.cpp @@ -11,8 +11,8 @@ static long c_termination_complete = FALSE; -extern "C" extern _onexit_table_t __acrt_atexit_table; -extern "C" extern _onexit_table_t __acrt_at_quick_exit_table; +extern "C" _onexit_table_t __acrt_atexit_table; +extern "C" _onexit_table_t __acrt_at_quick_exit_table; // thread_local atexit dtor handling. The APPCRT exports a function to set the // callback function. The exe main function will call this to set the callback diff --git a/sdk/lib/ucrt/startup/onexit.cpp b/sdk/lib/ucrt/startup/onexit.cpp index d7d77a40841..1fc7e15e64f 100644 --- a/sdk/lib/ucrt/startup/onexit.cpp +++ b/sdk/lib/ucrt/startup/onexit.cpp @@ -22,8 +22,8 @@ // The global atexit and at_quick_exit registries -extern "C" _onexit_table_t __acrt_atexit_table{}; -extern "C" _onexit_table_t __acrt_at_quick_exit_table{}; +extern "C" { _onexit_table_t __acrt_atexit_table{}; } +extern "C" { _onexit_table_t __acrt_at_quick_exit_table{}; } diff --git a/sdk/lib/ucrt/stdio/_file.cpp b/sdk/lib/ucrt/stdio/_file.cpp index 153ccf57b1c..d564e6969b3 100644 --- a/sdk/lib/ucrt/stdio/_file.cpp +++ b/sdk/lib/ucrt/stdio/_file.cpp @@ -11,13 +11,13 @@ // FILE descriptors for stdin, stdout, and stderr -extern "C" __crt_stdio_stream_data _iob[_IOB_ENTRIES] = +extern "C" { __crt_stdio_stream_data _iob[_IOB_ENTRIES] = { // ptr _base, _cnt, _flag, _file, _charbuf, _bufsiz { nullptr, nullptr, 0, _IOALLOCATED | _IOREAD, 0, 0, 0}, // stdin { nullptr, nullptr, 0, _IOALLOCATED | _IOWRITE, 1, 0, 0}, // stdout { nullptr, nullptr, 0, _IOALLOCATED | _IOWRITE, 2, 0, 0}, // stderr -}; +}; } extern "C" FILE* __cdecl __acrt_iob_func(unsigned const id) { @@ -50,7 +50,7 @@ _CRT_LINKER_FORCE_INCLUDE(__acrt_stdio_terminator); // This variable is used by the statically linked CRT to ensure that if any // stdio functionality is used, the terminate_stdio() function will be // registered for call during CRT termination. - extern "C" int _cflush = 0; + extern "C" { int _cflush = 0; } #endif diff --git a/sdk/lib/ucrt/stdio/_sftbuf.cpp b/sdk/lib/ucrt/stdio/_sftbuf.cpp index dbbb61bd642..b2601a8e1f2 100644 --- a/sdk/lib/ucrt/stdio/_sftbuf.cpp +++ b/sdk/lib/ucrt/stdio/_sftbuf.cpp @@ -23,8 +23,8 @@ // Buffer pointers for stdout and stderr -extern "C" void* __acrt_stdout_buffer = nullptr; -extern "C" void* __acrt_stderr_buffer = nullptr; +extern "C" { void* __acrt_stdout_buffer = nullptr; } +extern "C" { void* __acrt_stderr_buffer = nullptr; } // The temporary buffer has the data of one stdio call. Stderr and Stdout use a // temporary buffer for the duration of stdio output calls instead of having a diff --git a/sdk/lib/ucrt/stdio/ncommode.cpp b/sdk/lib/ucrt/stdio/ncommode.cpp index ddf270008b7..9d8923d4779 100644 --- a/sdk/lib/ucrt/stdio/ncommode.cpp +++ b/sdk/lib/ucrt/stdio/ncommode.cpp @@ -10,7 +10,7 @@ // Set default file commit mode to nocommit -extern "C" int _commode = 0; +extern "C" { int _commode = 0; } diff --git a/sdk/lib/ucrt/stdio/rmtmp.cpp b/sdk/lib/ucrt/stdio/rmtmp.cpp index 0d120e21eed..8a3a2229bbd 100644 --- a/sdk/lib/ucrt/stdio/rmtmp.cpp +++ b/sdk/lib/ucrt/stdio/rmtmp.cpp @@ -17,11 +17,11 @@ _CRT_LINKER_FORCE_INCLUDE(__acrt_tmpfile_terminator); // These definitions will cause this object to be linked in whenever the // termination code requires it. #ifndef CRTDLL - extern "C" unsigned __acrt_tmpfile_used = 1; + extern "C" { unsigned __acrt_tmpfile_used = 1; } #endif -extern "C" unsigned _tempoff = 1; -extern "C" unsigned _old_pfxlen = 0; +extern "C" { unsigned _tempoff = 1; } +extern "C" { unsigned _old_pfxlen = 0; } diff --git a/sdk/lib/ucrt/stdio/tmpfile.cpp b/sdk/lib/ucrt/stdio/tmpfile.cpp index ecd8d2e471a..a58a8e48bfe 100644 --- a/sdk/lib/ucrt/stdio/tmpfile.cpp +++ b/sdk/lib/ucrt/stdio/tmpfile.cpp @@ -499,7 +499,7 @@ extern "C" errno_t __cdecl tmpfile_s(FILE** const stream) // Ensure that _rmtmp is called during static CRT termination: #ifndef CRTDLL - extern "C" extern unsigned __acrt_tmpfile_used; + extern "C" unsigned __acrt_tmpfile_used; extern "C" void __acrt_force_use_of_tmpfile() {
2 weeks, 6 days
1
0
0
0
← Newer
1
...
17
18
19
20
21
22
23
...
28
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
Results per page:
10
25
50
100
200