From 78eb171a41337251b146c4118aab72741d83df40 Mon Sep 17 00:00:00 2001 From: Anonymous Maarten Date: Sat, 29 Aug 2026 17:29:18 +0200 Subject: [PATCH] Provide dummy Except implemention on non-Windows platforms --- Code/Commando/init.cpp | 4 ++++ Code/wwdebug/wwdebug.cpp | 4 ++++ Code/wwlib/Except.h | 6 ++++++ 3 files changed, 14 insertions(+) diff --git a/Code/Commando/init.cpp b/Code/Commando/init.cpp index 8c26d98b6..9ddc0f421 100644 --- a/Code/Commando/init.cpp +++ b/Code/Commando/init.cpp @@ -282,7 +282,11 @@ void Commando_Assert_Handler(const char * message) // If the exception handler is try to quit the game then don't show an assert. // if (Is_Trying_To_Exit()) { +#ifdef _WIN32 ExitProcess(0); +#else + _exit(0); +#endif } // diff --git a/Code/wwdebug/wwdebug.cpp b/Code/wwdebug/wwdebug.cpp index d0d789f8b..c710f2adc 100644 --- a/Code/wwdebug/wwdebug.cpp +++ b/Code/wwdebug/wwdebug.cpp @@ -308,7 +308,11 @@ void WWDebug_Assert_Fail(const char * expr,const char * file, int line) // If the exception handler is try to quit the game then don't show an assert. */ if (Is_Trying_To_Exit()) { +#ifdef _WIN32 ExitProcess(0); +#else + _exit(0); +#endif } char assertbuf[4096]; diff --git a/Code/wwlib/Except.h b/Code/wwlib/Except.h index 3aaa2d5b8..135a70b64 100644 --- a/Code/wwlib/Except.h +++ b/Code/wwlib/Except.h @@ -82,6 +82,12 @@ typedef struct tThreadInfoType { } ThreadInfoType; +#else + +#define Is_Trying_To_Exit() false +#define Register_Thread_ID(ID, NAME) +#define Unregister_Thread_ID(ID, NAME) +#define Set_Exit_On_Exception(V) #endif //_MSC_VER