Make GCC happy and make sure Call.sx is not preprocessed by MS toolchain

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6507 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
anders_k 2014-06-28 19:54:51 +00:00
parent 45e4a6251b
commit 4da72aaf77
3 changed files with 12 additions and 5 deletions

View file

@ -43,6 +43,8 @@ if env['TARGET_ARCH'] != 'amd64' or msvc: # BUGBUG: Call-amd64.S is missing GAS
# "D4027 : source file 'file.sx' ignored"
# ...and then it returns 0!
# This only happens if TryCompile .S fails (ML/ML64 not in %PATH%?)
#
# BUGBUG: GCC < 4.3 does not understand .sx, only .S
conf = env.Configure()
if conf.TryCompile('END', '.S'):
files += ['Source/'+filename+'.S']

View file

@ -1 +1,4 @@
#ifdef _MSC_VER
#error "MSVC is supposed to use the plain .S file!"
#endif
#include "Call.S"

View file

@ -31,7 +31,7 @@
#define PCD_DONE 3 // Just Continue
const int PARAMSIZEBYTYPE_PTR = (4==sizeof(void*)) ? 1 : 2;
static const int ParamSizeByType[8] = {
const int ParamSizeByType[8] = {
0, // PAT_VOID (Size will be equal to 1) //BUGBUG64?
1, // PAT_INT
2, // PAT_LONG
@ -1002,10 +1002,12 @@ void ParamsIn(SystemProc *proc)
par->Value = (INT_PTR) CreateCallback((SystemProc*) StrToIntPtr(realbuf));
break;
case PAT_REGMEM:
(LPTSTR)place = system_getuservariableptr(par->Input - 1);
par->Value = (INT_PTR) place;
par->Value += sizeof(void*) > 4 ? sizeof(_T("-9223372036854775807")) : sizeof(_T("-2147483647"));
IntPtrToStr(par->Value, (LPTSTR)place);
{
LPTSTR straddr = system_getuservariableptr(par->Input - 1);
par->Value = (INT_PTR) straddr;
par->Value += sizeof(void*) > 4 ? sizeof(_T("-9223372036854775807")) : sizeof(_T("-2147483647"));
IntPtrToStr(par->Value, straddr);
}
break;
}
GlobalFree(realbuf);