Browse Source

* move fdatasync to linux unit

git-svn-id: trunk@12109 -
micha 16 years ago
parent
commit
28e614c237
3 changed files with 10 additions and 6 deletions
  1. 10 0
      rtl/linux/linux.pp
  2. 0 5
      rtl/linux/unxsysc.inc
  3. 0 1
      rtl/linux/unxsysch.inc

+ 10 - 0
rtl/linux/linux.pp

@@ -106,6 +106,10 @@ function futex_op(op, oparg, cmp, cmparg: cint): cint; {$ifdef SYSTEMINLINE}inli
 {$endif}
 
 const
+  POLLMSG     = $0400;
+  POLLREMOVE  = $1000;
+  POLLRDHUP   = $2000;
+
   EPOLLIN  = $01; { The associated file is available for read(2) operations. }
   EPOLLPRI = $02; { There is urgent data available for read(2) operations. }
   EPOLLOUT = $04; { The associated file is available for write(2) operations. }
@@ -326,6 +330,7 @@ const
   SYNC_FILE_RANGE_WAIT_AFTER  = 4;
 
 function sync_file_range(fd: cInt; offset, nbytes: off64_t; flags: cuInt): cInt; {$ifdef FPC_USE_LIBC} cdecl; external name 'sync_file_range'; {$ENDIF}
+function fdatasync (fd: cint): cint; {$ifdef FPC_USE_LIBC} cdecl; external name 'sync_file_range'; {$ENDIF}
 
 implementation
 
@@ -487,6 +492,11 @@ begin
 {$endif}
 end;
 
+function fdatasync (fd: cint): cint;
+begin
+  fpfdatasync:=do_SysCall(syscall_nr_fdatasync, fd);
+end;
+
 {$endif} // non-libc
 
 { FUTEX_OP is a macro, doesn't exist in libC as function}

+ 0 - 5
rtl/linux/unxsysc.inc

@@ -29,11 +29,6 @@ begin
   fpstatfs:=do_SysCall(SysCall_nr_statfs,TSysParam(path),TSysParam(Info))
 end;
 
-Function  fpfdatasync (fd : cint) : cint;
-begin
-  fpfdatasync:=do_SysCall(syscall_nr_fdatasync, fd);
-end;
-
 Function  fpfsync (fd : cint) : cint;
 
 begin

+ 0 - 1
rtl/linux/unxsysch.inc

@@ -18,7 +18,6 @@ function fpgettimeofday(tp: ptimeval;tzp:ptimezone):cint; external name 'FPC_SYS
 function  fpfStatFS (Fd: cint; Info:pstatfs):cint;
 function  fpStatFS  (Path:pchar; Info:pstatfs):cint;
 function  fpfsync (fd : cint) : cint;
-function  fpfdatasync (fd : cint) : cint;
 Function  fpFlock   (fd,mode : cint)   : cint ;