mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-03 02:50:42 +02:00
set errno after syscalls. this fixes tiorte test at least. this code ideally should be in assembly, but it seems the assembler reader needs some fixing first...
git-svn-id: trunk@26828 -
This commit is contained in:
parent
50c59a1cc2
commit
c6d60979d2
@ -29,6 +29,7 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
end;
|
||||
|
||||
|
||||
@ -40,6 +41,7 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
end;
|
||||
|
||||
|
||||
@ -52,6 +54,7 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1', 'd2'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
end;
|
||||
|
||||
|
||||
@ -65,6 +68,7 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1', 'd2', 'd3'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
end;
|
||||
|
||||
function FpSysCall(sysnr,param1,param2,param3,param4:TSysParam):TSysResult; [public,alias:'FPC_SYSCALL4'];
|
||||
@ -78,6 +82,7 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1', 'd2', 'd3', 'd4'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
end;
|
||||
|
||||
|
||||
@ -93,6 +98,7 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1', 'd2', 'd3', 'd4', 'd5'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
end;
|
||||
|
||||
|
||||
@ -109,5 +115,6 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1', 'd2', 'd3', 'd4', 'd5', 'a0'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user