mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-12 21:11:45 +02:00
* set/getrlimit now also visible in baseunix when syscalls are used.
on systems that force ugetrlimit, use that transparently. (since ugetrlimit is not posix in theory or practice, we can't export it), resolves 13916 git-svn-id: trunk@13903 -
This commit is contained in:
parent
7ad93d7e52
commit
778505701c
rtl
@ -552,6 +552,6 @@ end;
|
||||
|
||||
function FpSetRLimit(Resource:cint;rlim:PRLimit):cint; [public, alias : 'FPC_SYSC_SETRLIMIT'];
|
||||
begin
|
||||
fpsetrlimit:=do_syscall(syscall_nr_getrlimit,TSysParam(Resource),TSysParam(rlim));
|
||||
fpsetrlimit:=do_syscall(syscall_nr_setrlimit,TSysParam(Resource),TSysParam(rlim));
|
||||
end;
|
||||
|
||||
|
@ -568,13 +568,18 @@ begin
|
||||
fpgettimeofday:=do_syscall(syscall_nr_gettimeofday,TSysParam(tp),TSysParam(tzp));
|
||||
end;
|
||||
|
||||
{$ifndef NO_SYSCALL_GETRLIMIT}
|
||||
|
||||
function FpGetRLimit(resource : cInt; rlim : PRLimit) : cInt;
|
||||
begin
|
||||
{$ifndef NO_SYSCALL_GETRLIMIT}
|
||||
FpGetRLimit := do_syscall(syscall_nr_getrlimit,
|
||||
TSysParam(resource), TSysParam(rlim));
|
||||
end;
|
||||
{$else}
|
||||
FpGetRLimit := do_syscall(syscall_nr_ugetrlimit,
|
||||
TSysParam(resource), TSysParam(rlim));
|
||||
{$endif}
|
||||
end;
|
||||
|
||||
|
||||
{$ifdef HAS_UGETRLIMIT}
|
||||
function fpugetrlimit(resource : cInt; rlim : PRLimit) : cInt;
|
||||
@ -592,3 +597,8 @@ begin
|
||||
end;
|
||||
{$endif}
|
||||
|
||||
function FpSetRLimit(Resource:cint;rlim:PRLimit):cint; [public, alias : 'FPC_SYSC_SETRLIMIT'];
|
||||
begin
|
||||
fpsetrlimit:=do_syscall(syscall_nr_setrlimit,TSysParam(Resource),TSysParam(rlim));
|
||||
end;
|
||||
|
||||
|
@ -106,3 +106,6 @@ Type TGrpArr = Array [0..0] of TGid; { C style array workarounds}
|
||||
Function FpGetEnv (name : pChar): pChar;
|
||||
function fpsettimeofday(tp:ptimeval;tzp:ptimezone):cint;
|
||||
|
||||
function FpGetRLimit(resource:cint;rlim:PRLimit):cint; external name 'FPC_SYSC_GETRLIMIT';
|
||||
function FpSetRLimit(Resource:cint;rlim:PRLimit):cint; external name 'FPC_SYSC_SETRLIMIT';
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user