mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 06:49:27 +02:00
* m68k-linux: syscalls are expected to return -1 on failure, not -errno. This fixes some of the tests, webtbs/tw2494 is one of them.
git-svn-id: trunk@28089 -
This commit is contained in:
parent
b3bb9df19f
commit
4b4651d298
@ -29,7 +29,11 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
if (result < 0) then
|
||||
begin
|
||||
seterrno(-result);
|
||||
result:=TSysResult(-1);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -41,7 +45,11 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
if (result < 0) then
|
||||
begin
|
||||
seterrno(-result);
|
||||
result:=TSysResult(-1);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -54,7 +62,11 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1', 'd2'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
if (result < 0) then
|
||||
begin
|
||||
seterrno(-result);
|
||||
result:=TSysResult(-1);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -68,7 +80,11 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1', 'd2', 'd3'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
if (result < 0) then
|
||||
begin
|
||||
seterrno(-result);
|
||||
result:=TSysResult(-1);
|
||||
end;
|
||||
end;
|
||||
|
||||
function FpSysCall(sysnr,param1,param2,param3,param4:TSysParam):TSysResult; [public,alias:'FPC_SYSCALL4'];
|
||||
@ -82,7 +98,11 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1', 'd2', 'd3', 'd4'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
if (result < 0) then
|
||||
begin
|
||||
seterrno(-result);
|
||||
result:=TSysResult(-1);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -98,7 +118,11 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1', 'd2', 'd3', 'd4', 'd5'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
if (result < 0) then
|
||||
begin
|
||||
seterrno(-result);
|
||||
result:=TSysResult(-1);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
||||
@ -115,6 +139,10 @@ begin
|
||||
trap #0
|
||||
move.l d0, @Result
|
||||
end ['d0', 'd1', 'd2', 'd3', 'd4', 'd5', 'a0'];
|
||||
if (result < 0) then seterrno(-result);
|
||||
if (result < 0) then
|
||||
begin
|
||||
seterrno(-result);
|
||||
result:=TSysResult(-1);
|
||||
end;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user