applied patch #1711089 - disable System::Call and System::Get when building with GCC

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@5149 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
pabs3 2007-05-14 23:50:45 +00:00
parent 012eededc2
commit 55d89deb99
4 changed files with 22 additions and 1 deletions

View file

@ -5,7 +5,9 @@
#include "Plugin.h"
#include "Buffers.h"
#include "System.h"
#ifndef __GNUC__
#include <crtdbg.h>
#endif /* __GNUC__ */
#include <objbase.h>
// 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;