diff --git a/dlls/extdll.h b/dlls/extdll.h index a368a2ff..659f9a0a 100644 --- a/dlls/extdll.h +++ b/dlls/extdll.h @@ -49,14 +49,14 @@ typedef int BOOL; #define MAX_PATH PATH_MAX #include #include +#endif //_WIN32 #ifndef min #define min(a,b) (((a) < (b)) ? (a) : (b)) #endif #ifndef max #define max(a,b) (((a) > (b)) ? (a) : (b)) -#define _vsnprintf(a,b,c,d) vsnprintf(a,b,c,d) #endif -#endif //_WIN32 + // Misc C-runtime library headers #include "stdio.h" diff --git a/dlls/h_export.cpp b/dlls/h_export.cpp index cae7e59f..1712a70a 100644 --- a/dlls/h_export.cpp +++ b/dlls/h_export.cpp @@ -46,9 +46,14 @@ BOOL WINAPI DllMain( } return TRUE; } + +// stdcall for win32 +#define EXPORT2 WINAPI +#else +#define EXPORT2 #endif -extern "C" void DLLEXPORT GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) +extern "C" void DLLEXPORT EXPORT2 GiveFnptrsToDll( enginefuncs_t* pengfuncsFromEngine, globalvars_t *pGlobals ) { memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t)); gpGlobals = pGlobals; diff --git a/dlls/nodes.cpp b/dlls/nodes.cpp index 18c145dd..d512e54c 100644 --- a/dlls/nodes.cpp +++ b/dlls/nodes.cpp @@ -40,7 +40,7 @@ CGraph WorldGraph; LINK_ENTITY_TO_CLASS( info_node, CNodeEnt ); LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt ); -#ifdef _LINUX +#if defined _LINUX && !defined _WIN32 #include #include #define CreateDirectory(p, n) mkdir(p, 0777) diff --git a/pm_shared/pm_shared.c b/pm_shared/pm_shared.c index 292720a1..9fa5accf 100644 --- a/pm_shared/pm_shared.c +++ b/pm_shared/pm_shared.c @@ -21,7 +21,7 @@ #include "pm_shared.h" #include "pm_movevars.h" #include "pm_debug.h" -#include // NULL +//#include // NULL #include // sqrt #include // strcpy #include // atoi