Browse Source

- 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 -

nickysn 6 years ago
parent
commit
aa3d13dd4a
3 changed files with 1 additions and 20 deletions
  1. 1 16
      rtl/bsd/ossysc.inc
  2. 0 3
      rtl/openbsd/setsysnr.inc
  3. 0 1
      rtl/openbsd/sysnr.inc

+ 1 - 16
rtl/bsd/ossysc.inc

@@ -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}
+begin
  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

+ 0 - 3
rtl/openbsd/setsysnr.inc

@@ -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;

+ 0 - 1
rtl/openbsd/sysnr.inc

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