[UCRT] Fix non-standard extern "C" usage

This commit is contained in:
Timo Kreuzer 2024-10-13 10:05:04 +02:00
parent 9ed5151de9
commit ffd69754f9
27 changed files with 104 additions and 102 deletions

View file

@ -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()
{

View file

@ -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; }

View file

@ -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; }