diff --git a/Contrib/System/Source/System.c b/Contrib/System/Source/System.c index f4644967..e983c379 100644 --- a/Contrib/System/Source/System.c +++ b/Contrib/System/Source/System.c @@ -5,7 +5,9 @@ #include "Plugin.h" #include "Buffers.h" #include "System.h" +#ifndef __GNUC__ #include +#endif /* __GNUC__ */ #include // Parse Section Type @@ -39,6 +41,15 @@ HINSTANCE g_hInstance; char retexpr[4]; HANDLE retaddr; +#ifndef __GNUC__ + +/* +FIXME: +GCC cannot compile the inline assembly used by System::Call and +System::Get, so those functions and their supporting functions +are disabled when using GCC. +*/ + char *GetResultStr(SystemProc *proc) { char *buf = AllocString(); @@ -250,6 +261,8 @@ PLUGINFUNCTION(Call) GlobalFree((HANDLE) proc); // No, free it } PLUGINFUNCTIONEND +#endif /* __GNUC__ */ + PLUGINFUNCTIONSHORT(Int64Op) { __int64 i1, i2 = 0, i3, i4; @@ -307,6 +320,8 @@ __int64 GetIntFromString(char **p) return myatoi(buffer); } +#ifndef __GNUC__ + SystemProc *PrepareProc(BOOL NeedForCall) { int SectionType = PST_PROC, // First section is always proc spec @@ -1370,6 +1385,8 @@ void CallStruct(SystemProc *proc) proc->Params[0].Value = (int) proc->Proc; } +#endif /* __GNUC__ */ + BOOL WINAPI _DllMainCRTStartup(HANDLE hInst, ULONG ul_reason_for_call, LPVOID lpReserved) { g_hInstance=hInst; diff --git a/Contrib/System/System.html b/Contrib/System/System.html index e902e043..c2a95e86 100644 --- a/Contrib/System/System.html +++ b/Contrib/System/System.html @@ -31,6 +31,8 @@

Programming knowledge is highly recommended for good understanding of the System plug-in.

+

The most useful System plug-in functions (Call, Get and Debug) are not available when compiling with GCC. To work around this, either download a MSVC-compiled version or write your own plugin that calls the functions you need.

+

Usage Examples From The Wiki