Browse Source

Merge branch 'master' into gravgun

hlzbot-dirty
mittorn 9 years ago
parent
commit
b02e02d6ff
  1. 4
      dlls/extdll.h
  2. 6
      dlls/h_export.cpp
  3. 2
      dlls/nodes.cpp
  4. 2
      pm_shared/pm_shared.c

4
dlls/extdll.h

@ -59,14 +59,14 @@ typedef int BOOL;
#define MAX_PATH PATH_MAX #define MAX_PATH PATH_MAX
#include <limits.h> #include <limits.h>
#include <stdarg.h> #include <stdarg.h>
#endif //_WIN32
#ifndef min #ifndef min
#define min(a,b) (((a) < (b)) ? (a) : (b)) #define min(a,b) (((a) < (b)) ? (a) : (b))
#endif #endif
#ifndef max #ifndef max
#define max(a,b) (((a) > (b)) ? (a) : (b)) #define max(a,b) (((a) > (b)) ? (a) : (b))
#define _vsnprintf(a,b,c,d) vsnprintf(a,b,c,d)
#endif #endif
#endif //_WIN32
// Misc C-runtime library headers // Misc C-runtime library headers
#include "stdio.h" #include "stdio.h"

6
dlls/h_export.cpp

@ -47,9 +47,13 @@ BOOL WINAPI DllMain(
return TRUE; return TRUE;
} }
// stdcall for win32
#define EXPORT2 WINAPI
#else
#define EXPORT2
#endif #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)); memcpy(&g_engfuncs, pengfuncsFromEngine, sizeof(enginefuncs_t));
gpGlobals = pGlobals; gpGlobals = pGlobals;

2
dlls/nodes.cpp

@ -40,7 +40,7 @@ CGraph WorldGraph;
LINK_ENTITY_TO_CLASS( info_node, CNodeEnt ); LINK_ENTITY_TO_CLASS( info_node, CNodeEnt );
LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt ); LINK_ENTITY_TO_CLASS( info_node_air, CNodeEnt );
#ifdef _LINUX #if defined _LINUX && !defined _WIN32
#include <unistd.h> #include <unistd.h>
#include <sys/stat.h> #include <sys/stat.h>
#define CreateDirectory(p, n) mkdir(p, 0777) #define CreateDirectory(p, n) mkdir(p, 0777)

2
pm_shared/pm_shared.c

@ -21,7 +21,7 @@
#include "pm_shared.h" #include "pm_shared.h"
#include "pm_movevars.h" #include "pm_movevars.h"
#include "pm_debug.h" #include "pm_debug.h"
#include <stdio.h> // NULL //#include <stdio.h> // NULL
#include <math.h> // sqrt #include <math.h> // sqrt
#include <string.h> // strcpy #include <string.h> // strcpy
#ifdef stricmp #ifdef stricmp

Loading…
Cancel
Save