From 7c7c3fb54ec941a99ff15592031b15f7df11365b Mon Sep 17 00:00:00 2001 From: Edoardo Prezioso Date: Thu, 2 Apr 2015 20:00:51 +0200 Subject: [PATCH] - Make the 'crashout' CCMD available in non-win32. --- src/c_cmds.cpp | 17 +++++++++++++++++ src/win32/i_main.cpp | 17 ----------------- 2 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/c_cmds.cpp b/src/c_cmds.cpp index 778f25be1..74968404d 100644 --- a/src/c_cmds.cpp +++ b/src/c_cmds.cpp @@ -641,6 +641,23 @@ CCMD (error_fatal) } } +//========================================================================== +// +// CCMD crashout +// +// Debugging routine for testing the crash logger. +// Useless in a win32 debug build, because that doesn't enable the crash logger. +// +//========================================================================== + +#if !defined(_WIN32) || !defined(_DEBUG) +CCMD (crashout) +{ + *(volatile int *)0 = 0; +} +#endif + + CCMD (dir) { FString dir, path; diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index f2a4fab4d..c63e7bc1c 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -1288,20 +1288,3 @@ int WINAPI WinMain (HINSTANCE hInstance, HINSTANCE nothing, LPSTR cmdline, int n MainThread = INVALID_HANDLE_VALUE; return 0; } - -//========================================================================== -// -// CCMD crashout -// -// Debugging routine for testing the crash logger. -// Useless in a debug build, because that doesn't enable the crash logger. -// -//========================================================================== - -#ifndef _DEBUG -#include "c_dispatch.h" -CCMD (crashout) -{ - *(int *)0 = 0; -} -#endif