mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 18:09:30 +02:00
* hopefuly fix the fp* problems for stat and others
git-svn-id: trunk@8405 -
This commit is contained in:
parent
7a94d05e23
commit
d2e4f53a13
@ -14,3 +14,9 @@
|
||||
|
||||
function fpgettimeofday(tp: ptimeval;tzp:ptimezone):cint; external name 'FPC_SYSC_GETTIMEOFDAY';
|
||||
|
||||
function fpfStatFS (Fd: cint; Info:pstatfs):cint;
|
||||
function fpStatFS (Path:pchar; Info:pstatfs):cint;
|
||||
function fpfsync (fd : cint) : cint;
|
||||
Function fpFlock (fd,mode : cint) : cint ;
|
||||
|
||||
|
||||
|
@ -61,10 +61,21 @@ END;
|
||||
end;
|
||||
*)
|
||||
|
||||
Function fsync (fd : cint) : cint;
|
||||
Function fpfStatFS (Fd: cint; Info:pstatfs):cint;
|
||||
begin
|
||||
fpfstatfs:=do_SysCall(SysCall_nr_fstatfs,fd,TSysParam(info))
|
||||
end;
|
||||
|
||||
Function fpStatFS (Path:pchar; Info:pstatfs):cint;
|
||||
|
||||
begin
|
||||
fsync:=fpfSync(fd);
|
||||
fpstatfs:=do_SysCall(SysCall_nr_statfs,TSysParam(path),TSysParam(Info))
|
||||
end;
|
||||
|
||||
Function fpfsync (fd : cint) : cint;
|
||||
|
||||
begin
|
||||
fpfsync:=do_SysCall(syscall_nr_fsync, fd);
|
||||
end;
|
||||
|
||||
Function fpFlock (fd,mode : longint) : cint;
|
||||
@ -73,28 +84,6 @@ begin
|
||||
fpFlock:=do_syscall(syscall_nr_flock,fd,mode);
|
||||
end;
|
||||
|
||||
Function fStatFS(Fd:Longint;Var Info:tstatfs):cint;
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
Fd is the file descriptor of a file/directory on the fileSystem
|
||||
you wish to investigate.
|
||||
}
|
||||
|
||||
begin
|
||||
fStatFS:=fpfStatFS(fd, @info);
|
||||
end;
|
||||
|
||||
Function StatFS(path:pchar;Var Info:tstatfs):cint;
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
Fd is the file descriptor of a file/directory on the fileSystem
|
||||
you wish to investigate.
|
||||
}
|
||||
|
||||
begin
|
||||
StatFS:=fpStatFS(path, @info);
|
||||
end;
|
||||
|
||||
// needs oldfpccall;
|
||||
Function intAssignPipe(var pipe_in,pipe_out:longint;var errn:cint):cint; oldfpccall;
|
||||
{
|
||||
|
@ -13,37 +13,27 @@
|
||||
|
||||
***********************************************************************}
|
||||
|
||||
Function fsync (fd : cint) : cint;
|
||||
begin
|
||||
fsync := fpFSync(fd);
|
||||
end;
|
||||
|
||||
Function fpFlock (fd,mode : cint) : cint;
|
||||
begin
|
||||
fpflock:=do_Syscall(Syscall_nr_flock,fd,mode);
|
||||
end;
|
||||
|
||||
|
||||
Function StatFS(Path:Pchar;Var Info:tstatfs):cint;
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
Path is the name of a file/directory on the fileSystem you wish to
|
||||
investigate.
|
||||
}
|
||||
Function fpfStatFS (Fd: cint; Info:pstatfs):cint;
|
||||
begin
|
||||
StatFS:=fpStatFS(Path, @Info);;
|
||||
fpfstatfs:=do_SysCall(SysCall_nr_fstatfs,fd,TSysParam(info))
|
||||
end;
|
||||
|
||||
Function fStatFS(Fd:cint;Var Info:tstatfs):cint;
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
Fd is the file descriptor of a file/directory on the fileSystem
|
||||
you wish to investigate.
|
||||
}
|
||||
Function fpStatFS (Path:pchar; Info:pstatfs):cint;
|
||||
|
||||
begin
|
||||
fStatFS:=fpfStatFS(fd, @Info);
|
||||
fpstatfs:=do_SysCall(SysCall_nr_statfs,TSysParam(path),TSysParam(Info))
|
||||
end;
|
||||
|
||||
Function fpfsync (fd : cint) : cint;
|
||||
|
||||
begin
|
||||
fpfsync:=do_SysCall(syscall_nr_fsync, fd);
|
||||
end;
|
||||
|
||||
{--------------------------------
|
||||
Port IO functions
|
||||
|
@ -15,3 +15,9 @@
|
||||
|
||||
function fpgettimeofday(tp: ptimeval;tzp:ptimezone):cint; external name 'FPC_SYSC_GETTIMEOFDAY';
|
||||
|
||||
function fpfStatFS (Fd: cint; Info:pstatfs):cint;
|
||||
function fpStatFS (Path:pchar; Info:pstatfs):cint;
|
||||
function fpfsync (fd : cint) : cint;
|
||||
Function fpFlock (fd,mode : cint) : cint ;
|
||||
|
||||
|
||||
|
@ -62,38 +62,27 @@ end;
|
||||
}
|
||||
|
||||
{$ifndef FPC_USE_LIBC}
|
||||
Function fsync (fd : cint) : cint;
|
||||
|
||||
begin
|
||||
fsync:=fpfsync(fd);
|
||||
end;
|
||||
|
||||
Function fpFlock (fd,mode : longint) : cint;
|
||||
|
||||
begin
|
||||
fpFlock:=do_syscall(syscall_nr_flock,fd,mode);
|
||||
end;
|
||||
|
||||
Function fStatFS(Fd:Longint;Var Info:tstatfs):cint;
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
Fd is the file descriptor of a file/directory on the fileSystem
|
||||
you wish to investigate.
|
||||
}
|
||||
|
||||
Function fpfStatFS (Fd: cint; Info:pstatfs):cint;
|
||||
begin
|
||||
fStatFS:=fpfstatFS(fd, @info);
|
||||
fpfstatfs:=do_SysCall(SysCall_nr_fstatfs,fd,TSysParam(info))
|
||||
end;
|
||||
|
||||
Function StatFS(path:pchar;Var Info:tstatfs):cint;
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
Fd is the file descriptor of a file/directory on the fileSystem
|
||||
you wish to investigate.
|
||||
}
|
||||
Function fpStatFS (Path:pchar; Info:pstatfs):cint;
|
||||
|
||||
begin
|
||||
StatFS:=fpStatFS(path, @info);
|
||||
fpstatfs:=do_SysCall(SysCall_nr_statfs,TSysParam(path),TSysParam(Info))
|
||||
end;
|
||||
|
||||
Function fpfsync (fd : cint) : cint;
|
||||
|
||||
begin
|
||||
fpfsync:=do_SysCall(syscall_nr_fsync, fd);
|
||||
end;
|
||||
|
||||
// needs oldfpccall;
|
||||
|
@ -62,38 +62,28 @@ end;
|
||||
}
|
||||
|
||||
{$ifndef FPC_USE_LIBC}
|
||||
Function fsync (fd : cint) : cint;
|
||||
|
||||
begin
|
||||
fsync:=do_syscall(syscall_nr_fsync,fd);
|
||||
end;
|
||||
|
||||
Function Flock (fd,mode : longint) : cint;
|
||||
Function fpFlock (fd,mode : longint) : cint;
|
||||
|
||||
begin
|
||||
Flock:=do_syscall(syscall_nr_flock,fd,mode);
|
||||
end;
|
||||
|
||||
Function fStatFS(Fd:Longint;Var Info:tstatfs):cint;
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
Fd is the file descriptor of a file/directory on the fileSystem
|
||||
you wish to investigate.
|
||||
}
|
||||
|
||||
Function fpfStatFS (Fd: cint; Info:pstatfs):cint;
|
||||
begin
|
||||
fStatFS:=do_syscall(syscall_nr_fstatfs,fd,longint(@info));
|
||||
fpfstatfs:=do_SysCall(SysCall_nr_fstatfs,fd,TSysParam(info))
|
||||
end;
|
||||
|
||||
Function StatFS(path:pchar;Var Info:tstatfs):cint;
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
Fd is the file descriptor of a file/directory on the fileSystem
|
||||
you wish to investigate.
|
||||
}
|
||||
Function fpStatFS (Path:pchar; Info:pstatfs):cint;
|
||||
|
||||
begin
|
||||
StatFS:=do_syscall(syscall_nr_statfs,longint(path),longint(@info));
|
||||
fpstatfs:=do_SysCall(SysCall_nr_statfs,TSysParam(path),TSysParam(Info))
|
||||
end;
|
||||
|
||||
Function fpfsync (fd : cint) : cint;
|
||||
|
||||
begin
|
||||
fpfsync:=do_SysCall(syscall_nr_fsync, fd);
|
||||
end;
|
||||
|
||||
// needs oldfpccall;
|
||||
|
@ -96,17 +96,10 @@ Function W_STOPCODE (Signal: Integer): Integer;
|
||||
|
||||
{** File Handling **}
|
||||
|
||||
{$ifndef FPC_USE_LIBC} // defined using cdecl for libc.
|
||||
// some of these are formally listed as deprecated, but specially statfs will remain for a while, no rush.
|
||||
Function fsync (fd : cint) : cint; deprecated;
|
||||
Function fpFlock (fd,mode : cint) : cint ;
|
||||
Function fStatFS (Fd: cint;Var Info:tstatfs):cint; deprecated;
|
||||
Function StatFS (Path:pchar;Var Info:tstatfs):cint; deprecated;
|
||||
{$endif}
|
||||
|
||||
Function fpfStatFS (Fd: cint; Info:pstatfs):cint;
|
||||
Function fpStatFS (Path:pchar; Info:pstatfs):cint;
|
||||
Function fpfsync (fd : cint) : cint;
|
||||
|
||||
Function fpFlock (var T : text;mode : cint) : cint;
|
||||
Function fpFlock (var F : File;mode : cint) : cint;
|
||||
@ -1314,21 +1307,29 @@ Begin
|
||||
FSearch:=FSearch(path,dirlist,CurrentDirectoryFirst);
|
||||
End;
|
||||
|
||||
Function fpfStatFS (Fd: cint; Info:pstatfs):cint;
|
||||
Function fsync (fd : cint) : cint;
|
||||
begin
|
||||
fpfstatfs:=do_SysCall(SysCall_nr_fstatfs,fd,TSysParam(info))
|
||||
fsync := fpFSync(fd);
|
||||
end;
|
||||
|
||||
Function fpStatFS (Path:pchar; Info:pstatfs):cint;
|
||||
|
||||
Function StatFS(Path:Pchar;Var Info:tstatfs):cint;
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
Path is the name of a file/directory on the fileSystem you wish to
|
||||
investigate.
|
||||
}
|
||||
begin
|
||||
fpstatfs:=do_SysCall(SysCall_nr_statfs,TSysParam(path),TSysParam(Info))
|
||||
StatFS:=fpStatFS(Path, @Info);;
|
||||
end;
|
||||
|
||||
Function fpfsync (fd : cint) : cint;
|
||||
|
||||
Function fStatFS(Fd:cint;Var Info:tstatfs):cint;
|
||||
{
|
||||
Get all information on a fileSystem, and return it in Info.
|
||||
Fd is the file descriptor of a file/directory on the fileSystem
|
||||
you wish to investigate.
|
||||
}
|
||||
begin
|
||||
fpfsync:=do_SysCall(syscall_nr_fsync, fd);
|
||||
fStatFS:=fpfStatFS(fd, @Info);
|
||||
end;
|
||||
|
||||
Initialization
|
||||
|
@ -24,16 +24,18 @@ Function fpFlock (fd,mode : longint) : cint; cdecl; external clib name 'flock';
|
||||
{$endif solaris}
|
||||
|
||||
{$ifdef beos}
|
||||
Function fStatFS(Fd:Longint;Var Info:tstatfs):cint; cdecl; external clib name 'fstatvfs';
|
||||
Function fpfStatFS(Fd:Longint; Info:pstatfs):cint; cdecl; external clib name 'fstatvfs';
|
||||
{$else beos}
|
||||
Function fStatFS(Fd:Longint;Var Info:tstatfs):cint; cdecl; external clib name 'fstatfs';
|
||||
Function fpfStatFS(Fd:Longint; Info:pstatfs):cint; cdecl; external clib name 'fstatfs';
|
||||
{$endif beos}
|
||||
|
||||
Function fsync (fd : cint) : cint; cdecl; external clib name 'fsync';
|
||||
Function fpfsync (fd : cint) : cint; cdecl; external clib name 'fsync';
|
||||
|
||||
{$ifdef beos}
|
||||
Function StatFS (Path:pchar;Var Info:tstatfs):cint; cdecl; external clib name 'statvfs';
|
||||
Function fpStatFS (Path:pchar; Info:pstatfs):cint; cdecl; external clib name 'statvfs';
|
||||
{$else beos}
|
||||
Function StatFS (Path:pchar;Var Info:tstatfs):cint; cdecl; external clib name 'statfs';
|
||||
Function fpStatFS (Path:pchar; Info:pstatfs):cint; cdecl; external clib name 'statfs';
|
||||
{$endif beos}
|
||||
|
||||
function pipe (var fildes: filedesarray):cint; cdecl; external clib name 'pipe';
|
||||
function fpgettimeofday(tp: ptimeval;tzp:ptimezone):cint; cdecl; external clib name 'gettimeofday';
|
||||
|
Loading…
Reference in New Issue
Block a user