File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -59,10 +59,6 @@ if(TARGET_OS STREQUAL "windows")
5959 add_compile_definitions (${target} PRIVATE _WIN32_WINNT=0x0600 ) # Minimum OS version (old macro, both must be defined)
6060 add_compile_definitions (${target} PRIVATE UNICODE ) # Windows headers
6161 add_compile_definitions (${target} PRIVATE _UNICODE ) # C-runtime
62-
63- # twbl specific hack for #ifdef WIN32 checks
64- # to avoid detect.h on windows systems that dont define WIN32 like mingw
65- add_compile_definitions (${target} PRIVATE WIN32 )
6662endif ()
6763
6864set (LINK_FLAGS_PLATFORM "" )
Original file line number Diff line number Diff line change 11// TODO: windows https://github.com/dlfcn-win32/dlfcn-win32
2- #ifdef WIN32
2+
3+ #include < twbl/teeworlds/base/detect.h>
4+
5+ #ifdef CONF_FAMILY_WINDOWS
36
47int main () { return 0 ; }
58
Original file line number Diff line number Diff line change 11#include < cstdio>
22#include < cstdlib>
33
4- #ifdef WIN32
4+ #include < twbl/teeworlds/base/detect.h>
5+
6+ #ifdef CONF_FAMILY_WINDOWS
57// TODO: windows api
68#else
79#include < dlfcn.h>
@@ -59,7 +61,7 @@ void *CHotreloader::LoadTick(FTwbl_BotTick *ppfnBotTick)
5961
6062 UnloadTick ();
6163
62- #ifdef WIN32
64+ #ifdef CONF_FAMILY_WINDOWS
6365 return nullptr ;
6466#else
6567 char aTickfunc[512 ];
@@ -106,7 +108,7 @@ void *CHotreloader::LoadTick(FTwbl_BotTick *ppfnBotTick)
106108
107109int CHotreloader::CloseHandle (void *pHandle)
108110{
109- #ifdef WIN32
111+ #ifdef CONF_FAMILY_WINDOWS
110112 return 0 ;
111113#else
112114 return dlclose (pHandle);
You can’t perform that action at this time.
0 commit comments