+ Add USE_SIGACTION_SIGTRAMP

git-svn-id: trunk@21027 -
This commit is contained in:
pierre 2012-04-24 23:03:08 +00:00
parent 13e152f8a9
commit 23f21254bd

View File

@ -300,6 +300,10 @@ end;
If OldAct is non-nil the previous action is saved there.
}
{$ifdef USE_SIGACTION_SIGTRAMP}
procedure signal_trampoline; cdecl; forward;
{$endif def USE_SIGACTION_SIGTRAMP}
function Fpsigaction(sig: cint; act, oact: psigactionrec): cint; [public, alias : 'FPC_SYSC_SIGACTION'];
{
@ -310,7 +314,12 @@ function Fpsigaction(sig: cint; act, oact: psigactionrec): cint; [public, alias
}
begin
{$ifdef USE_SIGACTION_SIGTRAMP}
fpsigaction:=do_syscall(syscall_nr___sigaction_sigtramp,TSysParam(sig),TSysParam(act),TSysParam(oact),
TSysParam(@signal_trampoline),2);
{$else not USE_SIGACTION_SIGTRAMP}
fpsigaction:=do_syscall(syscall_nr_sigaction,TSysParam(sig),TSysParam(act),TSysParam(oact));
{$endif not USE_SIGACTION_SIGTRAMP}
end;
(*=================== MOVED from sysunix.inc ========================*)
@ -397,7 +406,7 @@ function Fpaccess(const pathname : pchar; amode : cint): cint; [public, alias :
begin
FpAccess:=do_syscall(syscall_nr_access,TSysParam(pathname),amode);
end;
{
(*
function Fpaccess(const pathname : pathstr; amode : cint): cint;
{
@ -417,7 +426,7 @@ begin
pathname:=pathname+#0;
Access:=do_syscall(syscall_nr_access, TSysParam(@pathname[1]),mode)=0;
end;
}
*)
Function FpDup(fildes:cint):cint; [public, alias : 'FPC_SYSC_DUP'];
@ -503,7 +512,7 @@ begin
FPsigprocmask:=do_syscall(syscall_nr_sigprocmask,tsysparam(how),TSysParam(nset),TSysParam(oset));
{$endif OS_SIGPROCMASK_RETURNS_OVAL}
end;
{$user BLA!}
{$warning user BLA!}
Function FpNanoSleep(req : ptimespec;rem : ptimespec) : cint; [public, alias : 'FPC_SYSC_NANOSLEEP'];
begin
FpNanoSleep:=Do_SysCall(syscall_nr_nanosleep,TSysParam(req),TSysParam(rem));