Permalink
Browse files

Fix more issues compiling on GCC 5+.

  • Loading branch information...
psychonic committed Nov 9, 2016
1 parent 4684671 commit 760126ea8c33be78dcb00c2695875d90e904508c
Showing with 3 additions and 21 deletions.
  1. +0 −6 core/ISmmAPI.h
  2. +1 −5 core/ISmmPlugin.h
  3. +1 −1 core/metamod_oslink.cpp
  4. +1 −5 core/metamod_oslink.h
  5. +0 −4 loader/loader.cpp
View
@@ -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 */
View
@@ -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
View
@@ -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);
}
View
@@ -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
View
@@ -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 *

0 comments on commit 760126e

Please sign in to comment.