* use statvfs/fstatvfs on solaris instead of statfs/fstatfs, because the

latter are deprecated
  * replaced (wrong) statfs record definition with the definition of statvfs

git-svn-id: trunk@12815 -
This commit is contained in:
Jonas Maebe 2009-02-28 10:18:36 +00:00
parent f7003119d0
commit fba565d666
2 changed files with 25 additions and 12 deletions

View File

@ -158,17 +158,30 @@ Type
ptimespec = ^timespec;
TTimeSpec = timespec;
{$ifdef cpu64}
fsblkcnt_t = culonglong;
{$else}
fsblkcnt_t = culong;
{$endif}
{ actually stavfs, statfs is deprecated on Solaris }
TStatfs = packed record
fstype, { File system type }
bsize : cint; { Optimal block trensfer size }
bsize, { fundamental file system block size }
frsize : culong; { fragment size }
blocks, { Data blocks in system }
bfree, { free blocks in system }
bavail, { Available free blocks to non-root users }
files, { File nodes in system }
ffree : clong; { Free file nodes in system }
fsid : array[0..1] of cint; { File system ID }
namelen : clong; { Maximum name length in system }
spare : array [0..5] of clong; { For later use }
ffree, { Free file nodes in system }
favail : fsblkcnt_t; { free nodes avail to non-superuser}
fsid : clong; { File system ID }
basetype: array [0..15] of char; { null-terminated fs type name }
flag : culong; { bit-mask of flags }
namelen : culong; { Maximum name length in system }
fstr : array[0..31] of char; { fs-specific string }
{$ifndef cpu64}
spare : array[0..15] of clong; { reserved for future use }
{$endif}
end;
PStatFS=^TStatFS;

View File

@ -23,19 +23,19 @@ Function fpFlock (fd,mode : longint) : cint; cdecl; external clib name 'flock';
{$endif beos}
{$endif solaris}
{$ifdef beos}
{$if defined(beos) or defined(solaris) }
Function fpfStatFS(Fd:Longint; Info:pstatfs):cint; cdecl; external clib name 'fstatvfs';
{$else beos}
{$else beos or solaris }
Function fpfStatFS(Fd:Longint; Info:pstatfs):cint; cdecl; external clib name 'fstatfs';
{$endif beos}
{$endif beos or solaris }
Function fpfsync (fd : cint) : cint; cdecl; external clib name 'fsync';
{$ifdef beos}
{$if defined(beos) or defined(solaris) }
Function fpStatFS (Path:pchar; Info:pstatfs):cint; cdecl; external clib name 'statvfs';
{$else beos}
{$else beos or solaris }
Function fpStatFS (Path:pchar; Info:pstatfs):cint; cdecl; external clib name 'statfs';
{$endif beos}
{$endif beos or solaris }
function pipe (var fildes: filedesarray):cint; cdecl; external clib name 'pipe';
function fpgettimeofday(tp: ptimeval;tzp:ptimezone):cint; cdecl; external clib name 'gettimeofday';