[SDK][CRT][MSVCRT] Implement _CrtSetReportMode and _CrtSetReportFile (#5662)

- Implement reporting to file.
CORE-11835, CORE-15517, ROSTESTS-386
This commit is contained in:
Katayama Hirofumi MZ 2023-09-11 04:37:27 +09:00 committed by GitHub
parent 993a45024e
commit 85377ee3db
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 64 additions and 14 deletions

View file

@ -91,8 +91,6 @@ extern "C" {
#endif
// Assertion and error reporting
#ifndef _DEBUG
@ -124,6 +122,8 @@ extern "C" {
#define _RPTFW0(rptno,msg)
#define _RPTFWN(rptno,msg,...)
#define _CrtSetReportMode(t,f) ((int)0)
#define _CrtSetReportFile(t,f) ((_HFILE)0)
#else // _DEBUG
@ -161,6 +161,9 @@ extern "C" {
#define _RPTFW0(rptno,msg) _RPT_BASEW(rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, L"%s", msg)
#define _RPTFWN(rptno,msg,...) _RPT_BASEW(rptno, _CRT_WIDE(__FILE__), __LINE__, NULL, msg, __VA_ARGS__)
int __cdecl _CrtSetReportMode(int reportType, int reportMode);
_HFILE __cdecl _CrtSetReportFile(int reportType, _HFILE reportFile);
#endif
@ -230,8 +233,6 @@ extern "C" {
#define _CrtGetReportHook() ((_CRT_REPORT_HOOK)0)
#define _CrtSetReportHook2(t,f) ((int)0)
#define _CrtSetReportHookW2(t,f) ((int)0)
#define _CrtSetReportMode(t,f) ((int)0)
#define _CrtSetReportFile(t,f) ((_HFILE)0)
#define _CrtSetBreakAlloc(a) ((long)0)
#define _CrtSetAllocHook(f) ((_CRT_ALLOC_HOOK)0)