- fix Linux builds following reset of master branch. (#44)

* - fix Linux builds following reset of master branch.

* - fix Linux Clang CI failure.

* - change '#ifdef __linux__' to '#ifndef _WIN32' as requested/required.

* - initialise batchrun in proper spot.
This commit is contained in:
Mitchell Richters 2020-05-05 17:45:21 +10:00 committed by GitHub
parent 9acdd508b8
commit 68a0ead5f0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
10 changed files with 14 additions and 7 deletions

View file

@ -11,7 +11,6 @@
#include "printf.h" #include "printf.h"
#include "c_dispatch.h" #include "c_dispatch.h"
const char *OSD_StripColors(char *outBuf, const char *inBuf);
#define OSDCMD_OK CCMD_OK #define OSDCMD_OK CCMD_OK

View file

@ -486,7 +486,7 @@ void FUnsafeConsoleCommand::Run(FCommandLine &args, int key)
{ {
if (UnsafeExecutionContext) if (UnsafeExecutionContext)
{ {
Printf(TEXTCOLOR_RED "Cannot execute unsafe command " TEXTCOLOR_GOLD "%s\n", m_Name); Printf(TEXTCOLOR_RED "Cannot execute unsafe command " TEXTCOLOR_GOLD "%s\n", m_Name.GetChars());
return; return;
} }

View file

@ -39,6 +39,11 @@
#include "files.h" #include "files.h"
#include "md5.h" #include "md5.h"
#ifndef _WIN32
#include <pwd.h>
#include <unistd.h>
#endif
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <time.h> #include <time.h>

View file

@ -87,7 +87,7 @@ FString G_SetupFilenameBasedMusic(const char* fn, const char* defmusic)
test.Format("%s.%s", name.GetChars(), ext); test.Format("%s.%s", name.GetChars(), ext);
if (FileExists(test)) return test; if (FileExists(test)) return test;
#ifdef __unix__ #ifdef __unix__
test.Format("%s.%s", name.GetChars(), FString(ext.GetChars()).MakeLower().GetChars()); test.Format("%s.%s", name.GetChars(), FString(ext).MakeLower().GetChars());
if (FileExists(test)) return test; if (FileExists(test)) return test;
#endif #endif
} }

View file

@ -81,6 +81,7 @@ inline int I_GetNumaNodeCount() { return 1; }
inline int I_GetNumaNodeThreadCount(int numaNode) { return std::max<int>(std::thread::hardware_concurrency(), 1); } inline int I_GetNumaNodeThreadCount(int numaNode) { return std::max<int>(std::thread::hardware_concurrency(), 1); }
inline void I_SetThreadNumaNode(std::thread &thread, int numaNode) { } inline void I_SetThreadNumaNode(std::thread &thread, int numaNode) { }
void I_PutInClipboard(const char* str);
FString I_GetFromClipboard (bool use_primary_selection); FString I_GetFromClipboard (bool use_primary_selection);
#endif #endif

View file

@ -41,7 +41,7 @@
#include "v_text.h" #include "v_text.h"
#include "m_argv.h" #include "m_argv.h"
#include "c_console.h" #include "c_console.h"
#include "core/utility/printf.h" #include "printf.h"
IVideo *Video; IVideo *Video;

View file

@ -40,7 +40,7 @@
#include "c_dispatch.h" #include "c_dispatch.h"
#include "dikeys.h" #include "dikeys.h"
#include "utf8.h" #include "utf8.h"
#include "core/console/keydef.h" #include "keydef.h"
#include "menu/menu.h" #include "menu/menu.h"
static void I_CheckNativeMouse (); static void I_CheckNativeMouse ();
@ -261,7 +261,7 @@ void MessagePump (const SDL_Event &sev)
switch (sev.type) switch (sev.type)
{ {
case SDL_QUIT: case SDL_QUIT:
throw ExitEvent(0); throw CExitEvent(0);
case SDL_WINDOWEVENT: case SDL_WINDOWEVENT:
extern void ProcessSDLWindowEvent(const SDL_WindowEvent &); extern void ProcessSDLWindowEvent(const SDL_WindowEvent &);

View file

@ -33,6 +33,7 @@
#include <SDL.h> #include <SDL.h>
#include "basics.h" #include "basics.h"
#include "cmdlib.h"
#include "templates.h" #include "templates.h"
#include "m_joy.h" #include "m_joy.h"
#include "keydef.h" #include "keydef.h"

View file

@ -51,6 +51,7 @@
// MACROS ------------------------------------------------------------------ // MACROS ------------------------------------------------------------------
// TYPES ------------------------------------------------------------------- // TYPES -------------------------------------------------------------------
bool batchrun;
// EXTERNAL FUNCTION PROTOTYPES -------------------------------------------- // EXTERNAL FUNCTION PROTOTYPES --------------------------------------------

View file

@ -326,5 +326,5 @@ bool FTTYStartupScreen::NetLoop(bool (*timer_callback)(void *), void *userdata)
void ST_Endoom() void ST_Endoom()
{ {
throw ExitEvent(0); throw CExitEvent(0);
} }