From 5278274acf4b6f503b339589b449099ae256c135 Mon Sep 17 00:00:00 2001 From: "alexey.lysiuk" Date: Fri, 1 Feb 2019 10:37:05 +0200 Subject: [PATCH] - fixed compilation errors with POSIX targets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit src/posix/cocoa/i_video.mm:559:2: error: use of undeclared identifier 'atterm' src/posix/sdl/hardware.cpp:85:28: error: ‘atterm’ was not declared in this scope src/posix/sdl/i_input.cpp:261:10: error: ‘gamestate’ was not declared in this scope src/posix/sdl/i_input.cpp:261:23: error: ‘GS_LEVEL’ was not declared in this scope src/posix/sdl/i_input.cpp:263:48: error: ‘GS_INTERMISSION’ was not declared in this scope src/posix/sdl/i_input.cpp:263:80: error: ‘GS_FINALE’ was not declared in this scope src/posix/sdl/i_system.cpp:115:25: error: ‘atterm’ was not declared in this scope src/posix/sdl/i_system.cpp:372:30: error: invalid use of incomplete type ‘const struct dirent’ src/posix/sdl/i_system.cpp:375:42: error: ‘findstate_t’ has not been declared src/posix/sdl/i_system.cpp:391:12: error: request for member ‘current’ in ‘* fileinfo’, which is of non-class type ‘int’ src/posix/sdl/i_system.cpp:392:12: error: request for member ‘count’ in ‘* fileinfo’, which is of non-class type ‘int’ src/posix/sdl/i_system.cpp:392:56: error: request for member ‘namelist’ in ‘* fileinfo’, which is of non-class type ‘int’ src/posix/sdl/i_system.cpp:393:22: error: ‘alphasort’ was not declared in this scope src/posix/sdl/i_system.cpp:393:31: error: ‘scandir’ was not declared in this scope src/posix/sdl/i_system.cpp:394:16: error: request for member ‘count’ in ‘* fileinfo’, which is of non-class type ‘int’ src/posix/sdl/i_system.cpp:401:31: error: ‘findstate_t’ has not been declared src/posix/sdl/i_system.cpp:403:2: error: ‘findstate_t’ was not declared in this scope src/posix/sdl/i_system.cpp:403:15: error: ‘state’ was not declared in this scope src/posix/sdl/i_system.cpp:403:37: error: expected primary-expression before ‘)’ token src/posix/sdl/i_system.cpp:404:33: error: request for member ‘count’ in ‘* fileinfo’, which is of non-class type ‘int’ src/posix/sdl/i_system.cpp:406:39: error: request for member ‘count’ in ‘* fileinfo’, which is of non-class type ‘int’ src/posix/sdl/i_system.cpp:413:2: error: ‘findstate_t’ was not declared in this scope src/posix/sdl/i_system.cpp:413:15: error: ‘state’ was not declared in this scope src/posix/sdl/i_system.cpp:413:37: error: expected primary-expression before ‘)’ token src/posix/sdl/i_system.cpp:425:16: error: ‘findstate_t’ was not declared in this scope src/posix/sdl/i_system.cpp:425:29: error: expected primary-expression before ‘const’ src/posix/sdl/i_system.cpp:426:1: error: expected ‘,’ or ‘;’ before ‘{’ token src/posix/sdl/i_main.cpp:160:6: error: ‘gamestate’ was not declared in this scope src/posix/sdl/i_main.cpp:160:19: error: ‘GS_LEVEL’ was not declared in this scope src/posix/sdl/i_main.cpp:160:44: error: ‘GS_TITLELEVEL’ was not declared in this scope src/posix/sdl/i_main.cpp:217:18: error: ‘atterm’ was not declared in this scope src/posix/sdl/i_main.cpp:242:11: error: ‘I_Quit’ was not declared in this scope src/gameconfigfile.cpp:126:27: error: ‘SHARE_DIR’ was not declared in this scope src/scripting/decorate/thingdef_parse.cpp:929:2: error: use of undeclared identifier 'strlwr'; did you mean 'strlen'? src/scripting/decorate/thingdef_parse.cpp:937:3: error: use of undeclared identifier 'strlwr'; did you mean 'strlen'? src/scripting/decorate/thingdef_states.cpp:564:2: error: use of undeclared identifier 'strlwr'; did you mean 'strlen'? src/scripting/vm/jit_runtime.cpp:957:2: error: ‘unique_ptr’ is not a member of ‘std’ src/scripting/vm/jit_runtime.cpp:957:38: error: expected primary-expression before ‘>’ token src/scripting/vm/jit_runtime.cpp:957:40: error: ‘nativeSymbols’ was not declared in this scope src/utility/cmdlib.cpp:962:2: error: ‘DIR’ was not declared in this scope src/utility/cmdlib.cpp:962:7: error: ‘directory’ was not declared in this scope src/utility/cmdlib.cpp:962:34: error: ‘opendir’ was not declared in this scope src/utility/cmdlib.cpp:967:33: error: ‘readdir’ was not declared in this scope src/utility/cmdlib.cpp:969:10: error: invalid use of incomplete type ‘struct ScanDirectory(TArray&, const char*)::dirent’ src/utility/cmdlib.cpp:973:34: error: invalid use of incomplete type ‘struct ScanDirectory(TArray&, const char*)::dirent’ src/utility/cmdlib.cpp:985:20: error: ‘closedir’ was not declared in this scope --- src/gameconfigfile.cpp | 3 +++ src/posix/cocoa/i_video.mm | 1 + src/posix/sdl/hardware.cpp | 1 + src/posix/sdl/i_input.cpp | 1 + src/posix/sdl/i_main.cpp | 2 ++ src/posix/sdl/i_system.cpp | 2 ++ src/scripting/decorate/thingdef_parse.cpp | 3 +++ src/scripting/decorate/thingdef_states.cpp | 3 +++ src/scripting/vm/jit_runtime.cpp | 1 + src/utility/cmdlib.cpp | 1 + 10 files changed, 18 insertions(+) diff --git a/src/gameconfigfile.cpp b/src/gameconfigfile.cpp index 3bd34fd15..ee52313ce 100644 --- a/src/gameconfigfile.cpp +++ b/src/gameconfigfile.cpp @@ -47,6 +47,9 @@ #include "doomstat.h" #include "gi.h" #include "d_main.h" +#if !defined _MSC_VER && !defined __APPLE__ +#include "i_system.h" // for SHARE_DIR +#endif // !_MSC_VER && !__APPLE__ EXTERN_CVAR (Bool, con_centernotify) EXTERN_CVAR (Int, msg0color) diff --git a/src/posix/cocoa/i_video.mm b/src/posix/cocoa/i_video.mm index 7b20907f2..0c1abb883 100644 --- a/src/posix/cocoa/i_video.mm +++ b/src/posix/cocoa/i_video.mm @@ -39,6 +39,7 @@ #include "c_dispatch.h" #include "doomstat.h" #include "hardware.h" +#include "i_system.h" #include "m_argv.h" #include "m_png.h" #include "r_renderer.h" diff --git a/src/posix/sdl/hardware.cpp b/src/posix/sdl/hardware.cpp index a26536538..61d36abf0 100644 --- a/src/posix/sdl/hardware.cpp +++ b/src/posix/sdl/hardware.cpp @@ -35,6 +35,7 @@ #include #include +#include "i_system.h" #include "hardware.h" #include "c_dispatch.h" #include "v_text.h" diff --git a/src/posix/sdl/i_input.cpp b/src/posix/sdl/i_input.cpp index cc40b4fde..70a636dc6 100644 --- a/src/posix/sdl/i_input.cpp +++ b/src/posix/sdl/i_input.cpp @@ -44,6 +44,7 @@ #include "c_dispatch.h" #include "dikeys.h" #include "events.h" +#include "g_game.h" static void I_CheckGUICapture (); static void I_CheckNativeMouse (); diff --git a/src/posix/sdl/i_main.cpp b/src/posix/sdl/i_main.cpp index 05b0e6425..4ea48c401 100644 --- a/src/posix/sdl/i_main.cpp +++ b/src/posix/sdl/i_main.cpp @@ -54,6 +54,8 @@ #include "doomstat.h" #include "vm.h" #include "doomerrors.h" +#include "i_system.h" +#include "g_game.h" // MACROS ------------------------------------------------------------------ diff --git a/src/posix/sdl/i_system.cpp b/src/posix/sdl/i_system.cpp index 8b73d2f14..9303fc6eb 100644 --- a/src/posix/sdl/i_system.cpp +++ b/src/posix/sdl/i_system.cpp @@ -19,7 +19,9 @@ //----------------------------------------------------------------------------- // +#include "i_system.h" +#include #include #include #include diff --git a/src/scripting/decorate/thingdef_parse.cpp b/src/scripting/decorate/thingdef_parse.cpp index 68ab70cac..6bc8074f3 100644 --- a/src/scripting/decorate/thingdef_parse.cpp +++ b/src/scripting/decorate/thingdef_parse.cpp @@ -48,6 +48,9 @@ #include "v_text.h" #include "m_argv.h" #include "v_video.h" +#ifndef _MSC_VER +#include "i_system.h" // for strlwr() +#endif // !_MSC_VER void ParseOldDecoration(FScanner &sc, EDefinitionType def, PNamespace *ns); EXTERN_CVAR(Bool, strictdecorate); diff --git a/src/scripting/decorate/thingdef_states.cpp b/src/scripting/decorate/thingdef_states.cpp index d03069775..cede46bdd 100644 --- a/src/scripting/decorate/thingdef_states.cpp +++ b/src/scripting/decorate/thingdef_states.cpp @@ -44,6 +44,9 @@ #include "p_local.h" #include "thingdef.h" #include "backend/codegen.h" +#ifndef _MSC_VER +#include "i_system.h" // for strlwr() +#endif // !_MSC_VER //========================================================================== //*** diff --git a/src/scripting/vm/jit_runtime.cpp b/src/scripting/vm/jit_runtime.cpp index 5ef0760d6..f72402404 100644 --- a/src/scripting/vm/jit_runtime.cpp +++ b/src/scripting/vm/jit_runtime.cpp @@ -9,6 +9,7 @@ #include #include #include +#include #endif struct JitFuncInfo diff --git a/src/utility/cmdlib.cpp b/src/utility/cmdlib.cpp index 7a7436c19..2ed0eefe9 100644 --- a/src/utility/cmdlib.cpp +++ b/src/utility/cmdlib.cpp @@ -26,6 +26,7 @@ #include #include #else +#include #include #include #include