Skip to content

Commit 6eba137

Browse files
committed
[[ VS2015 ]] Tweak use of debug CRT and Rtl functions
The latest version of the VS debug CRT includes definitions for a previously internal function _VCrtDbgReportA so the explicit extern has been removed. In reverse, the RtlCaptureStackBackTrace function is no longer defined in the environment so an explicit extern has been added.
1 parent 45a8c12 commit 6eba137

File tree

2 files changed

+3
-18
lines changed

2 files changed

+3
-18
lines changed

libcore/src/core.cpp

Lines changed: 2 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -62,18 +62,11 @@ bool MCThrow(uint32_t p_error)
6262

6363
#if defined(_WINDOWS) || defined(_WINDOWS_SERVER)
6464

65+
#include <windows.h>
6566
#include <crtdbg.h>
6667
#include <dbghelp.h>
6768

68-
extern "C"
69-
_CRTIMP int __cdecl _VCrtDbgReportA(
70-
int nRptType,
71-
const char * szFile,
72-
int nLine,
73-
const char * szModule,
74-
const char * szFormat,
75-
va_list arglist
76-
);
69+
extern "C" USHORT WINAPI RtlCaptureStackBackTrace(ULONG, ULONG, PVOID*, PULONG);
7770

7871
void __MCAssert(const char *p_file, uint32_t p_line, const char *p_message)
7972
{

libfoundation/src/foundation-debug.cpp

Lines changed: 1 addition & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -29,15 +29,7 @@ along with LiveCode. If not see <http://www.gnu.org/licenses/>. */
2929
#include <crtdbg.h>
3030
#include <dbghelp.h>
3131

32-
extern "C"
33-
_CRTIMP int __cdecl _VCrtDbgReportA(
34-
int nRptType,
35-
const char * szFile,
36-
int nLine,
37-
const char * szModule,
38-
const char * szFormat,
39-
va_list arglist
40-
);
32+
extern "C" USHORT WINAPI RtlCaptureStackBackTrace(ULONG, ULONG, PVOID*, PULONG);
4133

4234
void __MCAssert(const char *p_file, uint32_t p_line, const char *p_message)
4335
{

0 commit comments

Comments
 (0)