1
0
mirror of https://github.com/alliedmodders/metamod-source.git synced 2025-01-19 08:52:34 +01:00

Cleaned up files for linux

Disabled SH_CCC_Makegate call for linux builds

--HG--
extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%4035
This commit is contained in:
David Anderson 2005-04-22 14:29:25 +00:00
parent 0d9cef6d51
commit b6a543bbc1
5 changed files with 11 additions and 8 deletions

View File

@ -261,4 +261,5 @@ namespace SourceHook
}
#endif
#endif

View File

@ -68,4 +68,5 @@ namespace SourceHook
}
#endif
#endif

View File

@ -20,7 +20,7 @@
# include <windows.h>
#elif SH_SYS == SH_SYS_LINUX
# include <sys/mman.h>
# include <sys/limits.h>
# include <limits.h>
# include <unistd.h>
# ifndef PAGESIZE
# define PAGESIZE 4096
@ -459,7 +459,7 @@ namespace SourceHook
void *callgate = NULL;
#if SH_RUNTIME_CODEGEN == 1
unsigned char *cggen = new unsigned char[SH_CCC_CODESIZE];
SH_CCC_MakeGate(cc.iface, cc.ptr, cggen, orig_entry);
//SH_CCC_MakeGate(cc.iface, cc.ptr, cggen, orig_entry);
callgate = (void*)cggen;
SetMemAccess(callgate, SH_CCC_CODESIZE, SH_MEM_READ | SH_MEM_WRITE | SH_MEM_EXEC);
#else
@ -581,4 +581,4 @@ namespace SourceHook
{
return m_IfacePtr;
}
}
}

View File

@ -24,16 +24,16 @@
#define SH_GLOB_PLUGPTR g_PLID
#endif
#define SH_ASSERT(x) if (!(x)) __asm { int 3 }
// System
#define SH_SYS_WIN32 1
#define SH_SYS_LINUX 2
#ifdef _WIN32
# define SH_SYS SH_SYS_WIN32
# define SH_ASSERT(x) if (!(x)) __asm { int 3 }
#elif defined __linux__
# define SH_SYS SH_SYS_LINUX
# define SH_ASSERT(x) if (!(x)) asm("int $3");
#else
# error Unsupported system
#endif

View File

@ -165,4 +165,5 @@ namespace SourceHook
};
}
#endif
#endif