mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-06 18:32:23 +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
|
trap #0
|
||||||
move.l d0, @Result
|
move.l d0, @Result
|
||||||
end ['d0'];
|
end ['d0'];
|
||||||
|
if (result < 0) then seterrno(-result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -40,6 +41,7 @@ begin
|
|||||||
trap #0
|
trap #0
|
||||||
move.l d0, @Result
|
move.l d0, @Result
|
||||||
end ['d0', 'd1'];
|
end ['d0', 'd1'];
|
||||||
|
if (result < 0) then seterrno(-result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -52,6 +54,7 @@ begin
|
|||||||
trap #0
|
trap #0
|
||||||
move.l d0, @Result
|
move.l d0, @Result
|
||||||
end ['d0', 'd1', 'd2'];
|
end ['d0', 'd1', 'd2'];
|
||||||
|
if (result < 0) then seterrno(-result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -65,6 +68,7 @@ begin
|
|||||||
trap #0
|
trap #0
|
||||||
move.l d0, @Result
|
move.l d0, @Result
|
||||||
end ['d0', 'd1', 'd2', 'd3'];
|
end ['d0', 'd1', 'd2', 'd3'];
|
||||||
|
if (result < 0) then seterrno(-result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
function FpSysCall(sysnr,param1,param2,param3,param4:TSysParam):TSysResult; [public,alias:'FPC_SYSCALL4'];
|
function FpSysCall(sysnr,param1,param2,param3,param4:TSysParam):TSysResult; [public,alias:'FPC_SYSCALL4'];
|
||||||
@ -78,6 +82,7 @@ begin
|
|||||||
trap #0
|
trap #0
|
||||||
move.l d0, @Result
|
move.l d0, @Result
|
||||||
end ['d0', 'd1', 'd2', 'd3', 'd4'];
|
end ['d0', 'd1', 'd2', 'd3', 'd4'];
|
||||||
|
if (result < 0) then seterrno(-result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -93,6 +98,7 @@ begin
|
|||||||
trap #0
|
trap #0
|
||||||
move.l d0, @Result
|
move.l d0, @Result
|
||||||
end ['d0', 'd1', 'd2', 'd3', 'd4', 'd5'];
|
end ['d0', 'd1', 'd2', 'd3', 'd4', 'd5'];
|
||||||
|
if (result < 0) then seterrno(-result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -109,5 +115,6 @@ begin
|
|||||||
trap #0
|
trap #0
|
||||||
move.l d0, @Result
|
move.l d0, @Result
|
||||||
end ['d0', 'd1', 'd2', 'd3', 'd4', 'd5', 'a0'];
|
end ['d0', 'd1', 'd2', 'd3', 'd4', 'd5', 'a0'];
|
||||||
|
if (result < 0) then seterrno(-result);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user