From 07985cc5ea1bc5ab2f0a8cf5ebc81f8d6d6e7490 Mon Sep 17 00:00:00 2001 From: Daniel Gibson Date: Mon, 16 Jan 2023 03:09:34 +0100 Subject: [PATCH] Fix MinGW build, #505 , included by SDL_cpuinfo.h via SDL.h, defines strcmp. If the idlib/Str.h `#define strcmp idStr::Cmp` hack is visible when that file is parsed, there's a compiler error (because strcmp in intrin.h is replaced with idStr::Cmp then). So I reorderedd includes a bit until it compiled again.. --- neo/tools/debugger/DebuggerServer.cpp | 5 ++--- neo/tools/debugger/DebuggerServer.h | 7 +++---- neo/tools/debugger/debugger.cpp | 4 ++-- 3 files changed, 7 insertions(+), 9 deletions(-) diff --git a/neo/tools/debugger/DebuggerServer.cpp b/neo/tools/debugger/DebuggerServer.cpp index 2cfac7ad..319c7311 100644 --- a/neo/tools/debugger/DebuggerServer.cpp +++ b/neo/tools/debugger/DebuggerServer.cpp @@ -28,6 +28,8 @@ If you have questions concerning this license or the applicable additional terms =========================================================================== */ +#include "DebuggerServer.h" + #if defined( ID_ALLOW_TOOLS ) #include "tools/edit_gui_common.h" #include "DebuggerApp.h" @@ -37,9 +39,6 @@ If you have questions concerning this license or the applicable additional terms const int MAX_MSGLEN = 8600; #endif - -#include "DebuggerServer.h" - /* ================ rvDebuggerServer::rvDebuggerServer diff --git a/neo/tools/debugger/DebuggerServer.h b/neo/tools/debugger/DebuggerServer.h index efa100ad..8f741ea1 100644 --- a/neo/tools/debugger/DebuggerServer.h +++ b/neo/tools/debugger/DebuggerServer.h @@ -28,13 +28,12 @@ If you have questions concerning this license or the applicable additional terms #ifndef DEBUGGERSERVER_H_ #define DEBUGGERSERVER_H_ - +#include +#include "sys/platform.h" +#include "idlib/Str.h" #include "DebuggerMessages.h" #include "DebuggerBreakpoint.h" #include "framework/Game.h" -#include - - class function_t; typedef struct prstack_s prstack_t; diff --git a/neo/tools/debugger/debugger.cpp b/neo/tools/debugger/debugger.cpp index 6acf3888..dd6b6c3f 100644 --- a/neo/tools/debugger/debugger.cpp +++ b/neo/tools/debugger/debugger.cpp @@ -26,6 +26,8 @@ If you have questions concerning this license or the applicable additional terms =========================================================================== */ +#include "DebuggerServer.h" + #if defined( ID_ALLOW_TOOLS ) #include "tools/edit_gui_common.h" #include "../../sys/win32/rc/debugger_resource.h" @@ -34,8 +36,6 @@ If you have questions concerning this license or the applicable additional terms #include "debugger_common.h" #endif -#include "DebuggerServer.h" - #if defined( ID_ALLOW_TOOLS ) rvDebuggerApp gDebuggerApp; // this is also used in other source files static HWND gDebuggerWindow = NULL;