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:
parent
0d9cef6d51
commit
b6a543bbc1
@ -261,4 +261,5 @@ namespace SourceHook
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -68,4 +68,5 @@ namespace SourceHook
|
|||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -20,7 +20,7 @@
|
|||||||
# include <windows.h>
|
# include <windows.h>
|
||||||
#elif SH_SYS == SH_SYS_LINUX
|
#elif SH_SYS == SH_SYS_LINUX
|
||||||
# include <sys/mman.h>
|
# include <sys/mman.h>
|
||||||
# include <sys/limits.h>
|
# include <limits.h>
|
||||||
# include <unistd.h>
|
# include <unistd.h>
|
||||||
# ifndef PAGESIZE
|
# ifndef PAGESIZE
|
||||||
# define PAGESIZE 4096
|
# define PAGESIZE 4096
|
||||||
@ -459,7 +459,7 @@ namespace SourceHook
|
|||||||
void *callgate = NULL;
|
void *callgate = NULL;
|
||||||
#if SH_RUNTIME_CODEGEN == 1
|
#if SH_RUNTIME_CODEGEN == 1
|
||||||
unsigned char *cggen = new unsigned char[SH_CCC_CODESIZE];
|
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;
|
callgate = (void*)cggen;
|
||||||
SetMemAccess(callgate, SH_CCC_CODESIZE, SH_MEM_READ | SH_MEM_WRITE | SH_MEM_EXEC);
|
SetMemAccess(callgate, SH_CCC_CODESIZE, SH_MEM_READ | SH_MEM_WRITE | SH_MEM_EXEC);
|
||||||
#else
|
#else
|
||||||
@ -581,4 +581,4 @@ namespace SourceHook
|
|||||||
{
|
{
|
||||||
return m_IfacePtr;
|
return m_IfacePtr;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -24,16 +24,16 @@
|
|||||||
#define SH_GLOB_PLUGPTR g_PLID
|
#define SH_GLOB_PLUGPTR g_PLID
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#define SH_ASSERT(x) if (!(x)) __asm { int 3 }
|
|
||||||
|
|
||||||
// System
|
// System
|
||||||
#define SH_SYS_WIN32 1
|
#define SH_SYS_WIN32 1
|
||||||
#define SH_SYS_LINUX 2
|
#define SH_SYS_LINUX 2
|
||||||
|
|
||||||
#ifdef _WIN32
|
#ifdef _WIN32
|
||||||
# define SH_SYS SH_SYS_WIN32
|
# define SH_SYS SH_SYS_WIN32
|
||||||
|
# define SH_ASSERT(x) if (!(x)) __asm { int 3 }
|
||||||
#elif defined __linux__
|
#elif defined __linux__
|
||||||
# define SH_SYS SH_SYS_LINUX
|
# define SH_SYS SH_SYS_LINUX
|
||||||
|
# define SH_ASSERT(x) if (!(x)) asm("int $3");
|
||||||
#else
|
#else
|
||||||
# error Unsupported system
|
# error Unsupported system
|
||||||
#endif
|
#endif
|
||||||
|
@ -165,4 +165,5 @@ namespace SourceHook
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user