mirror of
https://github.com/alliedmodders/metamod-source.git
synced 2025-02-20 13:54:14 +01:00
Fix more issues compiling on GCC 5+.
This commit is contained in:
parent
46846712d4
commit
760126ea8c
@ -49,12 +49,6 @@ class ConCommandBase;
|
||||
#include <ISmmPlugin.h>
|
||||
#include <ISmmPluginExt.h>
|
||||
|
||||
#if defined __GNUC__
|
||||
#if ((__GNUC__ == 3) && (__GNUC_MINOR__ < 4)) || (__GNUC__ < 3)
|
||||
#error "You must compile with at least GCC 3.4! If you know what you are doing, you can remove this message."
|
||||
#endif //version check
|
||||
#endif //__GNUC__
|
||||
|
||||
#define MMIFACE_SOURCEHOOK "ISourceHook" /**< ISourceHook Pointer */
|
||||
#define MMIFACE_PLMANAGER "IPluginManager" /**< SourceMM Plugin Functions */
|
||||
#define MMIFACE_SH_HOOKMANAUTOGEN "IHookManagerAutoGen" /**< SourceHook::IHookManagerAutoGen Pointer */
|
||||
|
@ -484,11 +484,7 @@ using namespace SourceMM;
|
||||
#if defined __WIN32__ || defined _WIN32 || defined WIN32
|
||||
#define SMM_API extern "C" __declspec(dllexport)
|
||||
#elif defined __GNUC__
|
||||
#if (__GNUC__ == 4) && (__GNUC_MINOR__ >= 1)
|
||||
#define SMM_API extern "C" __attribute__ ((visibility("default")))
|
||||
#else
|
||||
#define SMM_API extern "C"
|
||||
#endif
|
||||
#define SMM_API extern "C" __attribute__ ((visibility("default")))
|
||||
#endif
|
||||
#endif //!defined SMM_API
|
||||
|
||||
|
@ -94,7 +94,7 @@ bool GetFileOfAddress(void *pAddr, char *buffer, size_t maxlength)
|
||||
return true;
|
||||
}
|
||||
|
||||
#if defined __GNUC__ && (__GNUC__ == 3 || __GNUC__ == 4)
|
||||
#if defined __GNUC__
|
||||
void * operator new(size_t size) {
|
||||
return malloc(size);
|
||||
}
|
||||
|
@ -90,11 +90,7 @@ bool GetFileOfAddress(void *pAddr, char *buffer, size_t maxlength);
|
||||
#if defined __WIN32__ || defined _WIN32 || defined WIN32
|
||||
#define SMM_API extern "C" __declspec(dllexport)
|
||||
#elif defined __GNUC__
|
||||
#if (__GNUC__ == 4)
|
||||
#define SMM_API extern "C" __attribute__ ((visibility("default")))
|
||||
#else
|
||||
#define SMM_API extern "C"
|
||||
#endif
|
||||
#define SMM_API extern "C" __attribute__ ((visibility("default")))
|
||||
#endif
|
||||
|
||||
#if defined __WIN32__ || defined _WIN32 || defined WIN32
|
||||
|
@ -146,11 +146,7 @@ mm_UnloadMetamodLibrary()
|
||||
#if defined _WIN32
|
||||
#define EXPORT extern "C" __declspec(dllexport)
|
||||
#elif defined __GNUC__
|
||||
#if __GNUC__ >= 4
|
||||
#define EXPORT extern "C" __attribute__ ((visibility("default")))
|
||||
#else
|
||||
#define EXPORT extern "C"
|
||||
#endif
|
||||
#endif
|
||||
|
||||
EXPORT void *
|
||||
|
Loading…
x
Reference in New Issue
Block a user