* arm-linux-eabi uses mmap2 and ugetrlimit

git-svn-id: trunk@11908 -
This commit is contained in:
florian 2008-10-17 19:00:58 +00:00
parent 7b188a6a0e
commit 7c6e0a48e9
2 changed files with 15 additions and 2 deletions

View File

@ -33,7 +33,8 @@
{$endif}
{$endif}
{$if defined(cpupowerpc) or defined(cpupowerpc64) or defined(cpui386)}
{$if defined(cpupowerpc) or defined(cpupowerpc64) or defined(cpui386) or
(defined(cpuarm) and defined(FPC_ABI_EABI))}
{$DEFINE has_ugetrlimit}
{$endif}

View File

@ -471,7 +471,11 @@ type
{$endif cpum68k}
{$ifdef cpuarm}
{$define OLDMMAP}
{$ifdef FPC_ABI_EABI}
{$define MMAP2}
{$else FPC_ABI_EABI}
{$define OLDMMAP}
{$endif FPC_ABI_EABI}
{$endif cpuarm}
@ -491,11 +495,19 @@ begin
Fpmmap:=pointer(do_syscall(syscall_nr_mmap,TSysParam(@MMapArgs)));
end;
{$else OLDMMAP}
{$ifdef MMAP2}
begin
{$message warning need mmap64 syscall, hi(off) not used}
Fpmmap:= pointer(do_syscall(syscall_nr_mmap2,TSysParam(adr),TSysParam(len),
TSysParam(prot),TSysParam(flags),TSysParam(fd),TSysParam(lo(off))));
end;
{$else MMAP2}
begin
{$message warning need mmap64 syscall, hi(off) not used}
Fpmmap:= pointer(do_syscall(syscall_nr_mmap,TSysParam(adr),TSysParam(len),
TSysParam(prot),TSysParam(flags),TSysParam(fd),TSysParam(lo(off))));
end;
{$endif MMAP2}
{$endif OLDMMAP}