mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-18 22:09:28 +02:00
- get rid of the FPC_USE_GETDIRENTRIES_I49_SYSCALL define and the
use_openbsd_getdirentries_49 global variable - both are compatibility features for a no longer supported OpenBSD version git-svn-id: trunk@41789 -
This commit is contained in:
parent
c1224f0705
commit
ede50a2c4f
@ -221,7 +221,6 @@ begin
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
var
|
var
|
||||||
use_openbsd_getdirentries_49 : boolean = false;
|
|
||||||
use_getdirentries_syscall : boolean = true;
|
use_getdirentries_syscall : boolean = true;
|
||||||
|
|
||||||
function Fpreaddir(dirp : pdir) : pdirent; [public, alias : 'FPC_SYSC_READDIR'];
|
function Fpreaddir(dirp : pdir) : pdirent; [public, alias : 'FPC_SYSC_READDIR'];
|
||||||
@ -237,19 +236,10 @@ function readbuffer:longint;
|
|||||||
var retval :longint;
|
var retval :longint;
|
||||||
{$ifdef FPC_USE_GETDIRENTRIES_SYSCALL}
|
{$ifdef FPC_USE_GETDIRENTRIES_SYSCALL}
|
||||||
basepp : pointer;
|
basepp : pointer;
|
||||||
{$ifdef FPC_USE_GETDIRENTRIES_I49_SYSCALL}
|
|
||||||
{ OpenBSD i49 getDirEntries system call uses off_t type for last parameter }
|
|
||||||
basep_off_t : off_t;
|
|
||||||
{$endif not FPC_USE_GETDIRENTRIES_I49_SYSCALL}
|
|
||||||
basep : clong;
|
basep : clong;
|
||||||
{$endif FPC_USE_GETDIRENTRIES_SYSCALL}
|
{$endif FPC_USE_GETDIRENTRIES_SYSCALL}
|
||||||
begin
|
begin
|
||||||
{$ifdef FPC_USE_GETDIRENTRIES_SYSCALL}
|
{$ifdef FPC_USE_GETDIRENTRIES_SYSCALL}
|
||||||
{$ifdef FPC_USE_GETDIRENTRIES_I49_SYSCALL}
|
|
||||||
if use_openbsd_getdirentries_49 then
|
|
||||||
basepp:=@basep_off_t
|
|
||||||
else
|
|
||||||
{$endif FPC_USE_GETDIRENTRIES_I49_SYSCALL}
|
|
||||||
basepp:=@basep;
|
basepp:=@basep;
|
||||||
if use_getdirentries_syscall then
|
if use_getdirentries_syscall then
|
||||||
Retval:=do_syscall(syscall_nr_getdirentries,TSysParam(dirp^.dd_fd),TSysParam(@dirp^.dd_buf^),DIRBLKSIZ {sizeof(getdentsbuffer)},TSysParam(basepp))
|
Retval:=do_syscall(syscall_nr_getdirentries,TSysParam(dirp^.dd_fd),TSysParam(@dirp^.dd_buf^),DIRBLKSIZ {sizeof(getdentsbuffer)},TSysParam(basepp))
|
||||||
|
@ -10,7 +10,6 @@
|
|||||||
|
|
||||||
{$ifndef FPC_IS_SYSTEM}
|
{$ifndef FPC_IS_SYSTEM}
|
||||||
var
|
var
|
||||||
use_openbsd_getdirentries_49 : boolean = false;
|
|
||||||
use_getdirentries_syscall : boolean = true;
|
use_getdirentries_syscall : boolean = true;
|
||||||
|
|
||||||
function geterrno:longint; external name 'FPC_SYS_GETERRNO';
|
function geterrno:longint; external name 'FPC_SYS_GETERRNO';
|
||||||
|
@ -260,5 +260,4 @@ var
|
|||||||
|
|
||||||
{$define FPC_HAS_SETSYSNR_INC}
|
{$define FPC_HAS_SETSYSNR_INC}
|
||||||
{$define FPC_USE_GETDIRENTRIES_SYSCALL}
|
{$define FPC_USE_GETDIRENTRIES_SYSCALL}
|
||||||
{$define FPC_USE_GETDIRENTRIES_I49_SYSCALL}
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user