ソースを参照

* fixed FPC_USE_LIBC on linux

git-svn-id: trunk@1218 -
florian 20 年 前
コミット
a78703fb5a
3 ファイル変更10 行追加6 行削除
  1. 3 3
      rtl/linux/osmacro.inc
  2. 1 0
      rtl/unix/baseunix.pp
  3. 6 3
      rtl/unix/oscdeclh.inc

+ 3 - 3
rtl/linux/osmacro.inc

@@ -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;

+ 1 - 0
rtl/unix/baseunix.pp

@@ -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}

+ 6 - 3
rtl/unix/oscdeclh.inc

@@ -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';