mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-15 21:19:26 +02:00
* fix fplseek for 64 bit CPUs
git-svn-id: trunk@5119 -
This commit is contained in:
parent
4700eee7cf
commit
e11995aa99
@ -43,9 +43,13 @@ end;
|
||||
|
||||
function Fplseek(fd : cint; offset : off64_t; whence : cint): off64_t; [public, alias : 'FPC_SYSC_LSEEK'];
|
||||
begin
|
||||
{$ifdef CPU64}
|
||||
result:=do_syscall(syscall_nr_lseek,tsysparam(fd),tsysparam(offset),tsysparam(whence));
|
||||
{$else}
|
||||
if do_syscall(syscall_nr__llseek,tsysparam(fd),tsysparam(offset shr 32),tsysparam(offset),
|
||||
tsysparam(@result), tsysparam(whence)) = -1 then
|
||||
result:=off64_t(-1);
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
function Fpread(fd: cint; buf: pchar; nbytes : size_t): ssize_t; [public, alias : 'FPC_SYSC_READ'];
|
||||
|
Loading…
Reference in New Issue
Block a user