- removed the FPC_USE_GETDIRENTRIES_SYSCALL define and use_getdirentries_syscall

global variable, they are compatibility flags of a no longer supported OpenBSD version

git-svn-id: trunk@41790 -
This commit is contained in:
nickysn 2019-03-24 16:30:50 +00:00
parent ede50a2c4f
commit aa3d13dd4a
3 changed files with 0 additions and 19 deletions

View File

@ -220,9 +220,6 @@ begin
dispose(dirp);
end;
var
use_getdirentries_syscall : boolean = true;
function Fpreaddir(dirp : pdir) : pdirent; [public, alias : 'FPC_SYSC_READDIR'];
{Different from Linux, Readdir on BSD is based on Getdents, due to the
@ -234,20 +231,8 @@ with blockmode have this higher?}
function readbuffer:longint;
var retval :longint;
{$ifdef FPC_USE_GETDIRENTRIES_SYSCALL}
basepp : pointer;
basep : clong;
{$endif FPC_USE_GETDIRENTRIES_SYSCALL}
begin
{$ifdef FPC_USE_GETDIRENTRIES_SYSCALL}
basepp:=@basep;
if use_getdirentries_syscall then
Retval:=do_syscall(syscall_nr_getdirentries,TSysParam(dirp^.dd_fd),TSysParam(@dirp^.dd_buf^),DIRBLKSIZ {sizeof(getdentsbuffer)},TSysParam(basepp))
else
Retval:=do_syscall(syscall_nr_getdents,TSysParam(dirp^.dd_fd),TSysParam(@dirp^.dd_buf^),DIRBLKSIZ {sizeof(getdentsbuffer)});
{$else not FPC_USE_GETDIRENTRIES_SYSCALL}
Retval:=do_syscall(syscall_nr_getdents,TSysParam(dirp^.dd_fd),TSysParam(@dirp^.dd_buf^),DIRBLKSIZ {sizeof(getdentsbuffer)});
{$endif not FPC_USE_GETDIRENTRIES_SYSCALL}
dirp^.dd_rewind:=TSysParam(dirp^.dd_buf);
if retval=0 then
begin

View File

@ -9,8 +9,6 @@
{$endif FPC_COMPILING_SYSCALL_UNIT}
{$ifndef FPC_IS_SYSTEM}
var
use_getdirentries_syscall : boolean = true;
function geterrno:longint; external name 'FPC_SYS_GETERRNO';
procedure seterrno(err:longint); external name 'FPC_SYS_SETERRNO';
@ -68,7 +66,6 @@ Begin
begin
{ FIXME: what should we do here? }
syscall_nr_getdirentries := -1;
use_getdirentries_syscall:=false;
end;
end;

View File

@ -259,5 +259,4 @@ var
{ The variables above need to be changed at startup }
{$define FPC_HAS_SETSYSNR_INC}
{$define FPC_USE_GETDIRENTRIES_SYSCALL}