mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-01-19 08:52:34 +01:00
Added GCC-4.1 compatibility
--HG-- extra : convert_revision : svn%3Ac2935e3e-5518-0410-8daf-afa5dab7d4e3/trunk%40248
This commit is contained in:
parent
d3863150a1
commit
f8d0fc08b2
@ -338,7 +338,7 @@ CPluginManager::CPlugin *CPluginManager::_Load(const char *file, PluginId source
|
||||
snprintf(error, maxlen, "%s", dlerror());
|
||||
pl->m_Status = Pl_Error;
|
||||
} else {
|
||||
CreateInterfaceFn pfn = reinterpret_cast<CreateInterfaceFn>(dlsym(pl->m_Lib, PL_EXPOSURE_C));
|
||||
CreateInterfaceFn pfn = (CreateInterfaceFn)(dlsym(pl->m_Lib, PL_EXPOSURE_C));
|
||||
if (!pfn)
|
||||
{
|
||||
if (error)
|
||||
|
@ -204,7 +204,7 @@ void *CSmmAPI::MetaFactory(const char *iface, int *_ret, PluginId *id)
|
||||
#define ENGINEW32_OFFS 38
|
||||
#define IA32_CALL 0xE8
|
||||
|
||||
bool vcmp(void *_addr1, void *_addr2, size_t len)
|
||||
bool vcmp(const void *_addr1, const void *_addr2, size_t len)
|
||||
{
|
||||
unsigned char *addr1 = (unsigned char *)_addr1;
|
||||
unsigned char *addr2 = (unsigned char *)_addr2;
|
||||
|
@ -25,7 +25,7 @@ namespace SourceMM
|
||||
class CSmmAPI : public ISmmAPI
|
||||
{
|
||||
public:
|
||||
CSmmAPI::CSmmAPI();
|
||||
CSmmAPI();
|
||||
public:
|
||||
void LogMsg(ISmmPlugin *pl, const char *msg, ...);
|
||||
public:
|
||||
|
@ -1,9 +1,9 @@
|
||||
#(C)2004-2005 SourceMM Development Team
|
||||
# Makefile written by David "BAILOPAN" Anderson
|
||||
|
||||
HL2SDK = ../../hl2sdk
|
||||
HL2SDK = ../hl2sdk
|
||||
SMM_ROOT = ..
|
||||
SRCDS = ~/srcds_l
|
||||
SRCDS = ~/srcds
|
||||
|
||||
### EDIT BELOW FOR OTHER PROJECTS ###
|
||||
|
||||
|
@ -686,21 +686,21 @@ bool LevelInit_handler(char const *pMapName, char const *pMapEntities, char cons
|
||||
RETURN_META_VALUE(MRES_IGNORED, false);
|
||||
}
|
||||
|
||||
#if defined __GNUC__ && (__GNUC__ == 3)
|
||||
void * ::operator new(size_t size) {
|
||||
#if defined __GNUC__ && (__GNUC__ == 3 || __GNUC__ == 4)
|
||||
void * operator new(size_t size) {
|
||||
return(calloc(1, size));
|
||||
}
|
||||
|
||||
void * ::operator new[](size_t size) {
|
||||
void * operator new[](size_t size) {
|
||||
return(calloc(1, size));
|
||||
}
|
||||
|
||||
void ::operator delete(void * ptr) {
|
||||
void operator delete(void * ptr) {
|
||||
if(ptr)
|
||||
free(ptr);
|
||||
}
|
||||
|
||||
void ::operator delete[](void * ptr) {
|
||||
void operator delete[](void * ptr) {
|
||||
if(ptr)
|
||||
free(ptr);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user