* fixed FPC_USE_LIBC on linux

git-svn-id: trunk@1218 -
This commit is contained in:
florian 2005-09-28 19:30:55 +00:00
parent dcd346f0bb
commit a78703fb5a
3 changed files with 10 additions and 6 deletions

View File

@ -100,19 +100,19 @@ function __lxstat64(__ver : cint; FileName: PChar; var __stat: tstat): cint; cde
function __xmknod(__ver : cint; Pathname: PChar; Mode: mode_t; var Device: dev_t): cint; cdecl; external clib name '__xmknod';
}
{$define FPC_HAS_BASEUNIX_STAT}
function FpFstat (fd : cint; var sb : stat): cint;
function FpFstat(fd : cint; var sb : stat): cint;inline;
begin
__fxstat(_STAT_VER,fd,sb);
end;
function fpLstat (path:pchar;Info:pstat):cint;
function fpLstat(path:pchar;Info:pstat):cint;inline;
begin
__lxstat(_STAT_VER,path,Info^);
end;
function FpStat (path: pchar; var buf : stat): cint;
function FpStat(path: pchar; var buf : stat): cint;inline;
begin
__xstat(_STAT_VER,path,buf);
end;

View File

@ -33,6 +33,7 @@ Uses UnixType;
{$ifdef FPC_USE_LIBC}
const clib = 'c';
{$define FPC_IN_BASEUNIX}
{$i oscdeclh.inc}
{$ELSE}
{$i bunxh.inc} { Functions}

View File

@ -88,9 +88,12 @@ Type TGrpArr = Array [0..0] of TGid; { C style array workarounds}
function fpsettimeofday(tp:ptimeval;tzp:ptimezone):cint; cdecl; external clib name 'settimeofday';
{$ifdef linux}
function FpFstat (fd : cint; var sb : stat): cint;
Function fpLstat (path:pchar;Info:pstat):cint;
function FpStat (path: pchar; var buf : stat): cint;
{$ifndef FPC_IS_SYSTEM}
{ those functions are macros on linux }
function FpFstat (fd : cint; var sb : stat): cint;inline;
Function fpLstat (path:pchar;Info:pstat):cint;inline;
function FpStat (path: pchar; var buf : stat): cint;inline;
{$endif FPC_IS_SYSTEM}
{$else linux}
function FpFstat (fd : cint; var sb : stat): cint; cdecl; external clib name 'fstat';
Function fpLstat (path:pchar;Info:pstat):cint; cdecl; external clib name 'lstat';