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:
parent
45e4a6251b
commit
4da72aaf77
3 changed files with 12 additions and 5 deletions
|
@ -43,6 +43,8 @@ if env['TARGET_ARCH'] != 'amd64' or msvc: # BUGBUG: Call-amd64.S is missing GAS
|
||||||
# "D4027 : source file 'file.sx' ignored"
|
# "D4027 : source file 'file.sx' ignored"
|
||||||
# ...and then it returns 0!
|
# ...and then it returns 0!
|
||||||
# This only happens if TryCompile .S fails (ML/ML64 not in %PATH%?)
|
# 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()
|
conf = env.Configure()
|
||||||
if conf.TryCompile('END', '.S'):
|
if conf.TryCompile('END', '.S'):
|
||||||
files += ['Source/'+filename+'.S']
|
files += ['Source/'+filename+'.S']
|
||||||
|
|
|
@ -1 +1,4 @@
|
||||||
|
#ifdef _MSC_VER
|
||||||
|
#error "MSVC is supposed to use the plain .S file!"
|
||||||
|
#endif
|
||||||
#include "Call.S"
|
#include "Call.S"
|
||||||
|
|
|
@ -31,7 +31,7 @@
|
||||||
#define PCD_DONE 3 // Just Continue
|
#define PCD_DONE 3 // Just Continue
|
||||||
|
|
||||||
const int PARAMSIZEBYTYPE_PTR = (4==sizeof(void*)) ? 1 : 2;
|
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?
|
0, // PAT_VOID (Size will be equal to 1) //BUGBUG64?
|
||||||
1, // PAT_INT
|
1, // PAT_INT
|
||||||
2, // PAT_LONG
|
2, // PAT_LONG
|
||||||
|
@ -1002,10 +1002,12 @@ void ParamsIn(SystemProc *proc)
|
||||||
par->Value = (INT_PTR) CreateCallback((SystemProc*) StrToIntPtr(realbuf));
|
par->Value = (INT_PTR) CreateCallback((SystemProc*) StrToIntPtr(realbuf));
|
||||||
break;
|
break;
|
||||||
case PAT_REGMEM:
|
case PAT_REGMEM:
|
||||||
(LPTSTR)place = system_getuservariableptr(par->Input - 1);
|
{
|
||||||
par->Value = (INT_PTR) place;
|
LPTSTR straddr = system_getuservariableptr(par->Input - 1);
|
||||||
par->Value += sizeof(void*) > 4 ? sizeof(_T("-9223372036854775807")) : sizeof(_T("-2147483647"));
|
par->Value = (INT_PTR) straddr;
|
||||||
IntPtrToStr(par->Value, (LPTSTR)place);
|
par->Value += sizeof(void*) > 4 ? sizeof(_T("-9223372036854775807")) : sizeof(_T("-2147483647"));
|
||||||
|
IntPtrToStr(par->Value, straddr);
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
GlobalFree(realbuf);
|
GlobalFree(realbuf);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue