mirror of
https://github.com/FWGS/hlsdk-xash3d
synced 2024-11-22 01:47:45 +01:00
Fix win32 support
This commit is contained in:
parent
feb2aefd88
commit
fe4bedb0fb
@ -49,14 +49,14 @@ typedef int BOOL;
|
||||
#define MAX_PATH PATH_MAX
|
||||
#include <limits.h>
|
||||
#include <stdarg.h>
|
||||
#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"
|
||||
|
@ -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;
|
||||
|
@ -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 <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#define CreateDirectory(p, n) mkdir(p, 0777)
|
||||
|
@ -21,7 +21,7 @@
|
||||
#include "pm_shared.h"
|
||||
#include "pm_movevars.h"
|
||||
#include "pm_debug.h"
|
||||
#include <stdio.h> // NULL
|
||||
//#include <stdio.h> // NULL
|
||||
#include <math.h> // sqrt
|
||||
#include <string.h> // strcpy
|
||||
#include <stdlib.h> // atoi
|
||||
|
Loading…
Reference in New Issue
Block a user