瀏覽代碼

Use new getdirentriesi49 syscall, contributed by Pascal Stumpf

git-svn-id: trunk@23223 -
pierre 12 年之前
父節點
當前提交
7457a0f321
共有 2 個文件被更改,包括 7 次插入1 次删除
  1. 5 0
      rtl/bsd/ossysc.inc
  2. 2 1
      rtl/openbsd/sysnr.inc

+ 5 - 0
rtl/bsd/ossysc.inc

@@ -223,7 +223,12 @@ with blockmode have this higher?}
 function readbuffer:longint;
 
 var retval :longint;
+{$ifdef USE_GETDIRENTRIES_I49_SYSCALL}
+  { OpenBSD i49 getDirEntries system call uses off_t type for last parameter }
+    basep : off_t;
+{$else not USE_GETDIRENTRIES_I49_SYSCALL}
     basep : clong;
+{$endif not USE_GETDIRENTRIES_I49_SYSCALL}
 begin
 {$ifdef USE_GETDIRENTRIES_SYSCALL}
  Retval:=do_syscall(syscall_nr_getdirentries,TSysParam(dirp^.dd_fd),TSysParam(@dirp^.dd_buf^),DIRBLKSIZ {sizeof(getdentsbuffer)},TSysParam(@basep));

+ 2 - 1
rtl/openbsd/sysnr.inc

@@ -256,8 +256,9 @@ Const
         syscall_nr_MAXSYSCALL   = 313;
 
 { Aliases }
-        syscall_nr_getdirentries = syscall_nr_ogetdirentries;
+        syscall_nr_getdirentries = syscall_nr_getdirentriesi49;
         syscall_nr_waitpid      = syscall_nr_wait4;  // 7, added: ease of notation purposes
 {        syscall_nr_getdents = syscall_nr_getdirentries; }
 {$define USE_GETDIRENTRIES_SYSCALL}
+{$define USE_GETDIRENTRIES_I49_SYSCALL}