Browse Source

* moved fplstat(ansistring,pstat) overload to bunxovl(h).inc, so all
platforms have (fixes compilation for FPC_USE_LIBC platforms after
r11681)

git-svn-id: trunk@11693 -

Jonas Maebe 17 years ago
parent
commit
7aee2f3d71
5 changed files with 10 additions and 29 deletions
  1. 0 9
      rtl/bsd/bunxsysc.inc
  2. 0 15
      rtl/linux/bunxsysc.inc
  3. 0 1
      rtl/unix/bunxh.inc
  4. 7 2
      rtl/unix/bunxovl.inc
  5. 3 2
      rtl/unix/bunxovlh.inc

+ 0 - 9
rtl/bsd/bunxsysc.inc

@@ -446,15 +446,6 @@ begin
  fpLStat:=do_syscall(syscall_nr_lstat,TSysParam(path),TSysParam(info));
  fpLStat:=do_syscall(syscall_nr_lstat,TSysParam(path),TSysParam(info));
 end;
 end;
 
 
-Function fpLstat(Filename: ansistring;Info:pstat):cint;
-{
-  Get all information on a link (the link itself), and return it in info.
-}
-
-begin
- fpLStat:=do_syscall(syscall_nr_lstat,TSysParam(pchar(filename)),TSysParam(info));
-end;
-
 function fpNice(N:cint):cint;
 function fpNice(N:cint):cint;
 {
 {
   Set process priority. A positive N means a lower priority.
   Set process priority. A positive N means a lower priority.

+ 0 - 15
rtl/linux/bunxsysc.inc

@@ -415,21 +415,6 @@ begin
     TSysParam(path),TSysParam(info));
     TSysParam(path),TSysParam(info));
 end;
 end;
 
 
-Function fpLstat(Filename: ansistring;Info:pstat):cint;
-{
-  Get all information on a link (the link itself), and return it in info.
-}
-
-begin
- fpLStat:=do_syscall(
-{$ifdef cpux86_64}
-    syscall_nr_lstat,
-{$else}
-    syscall_nr_lstat64,
-{$endif}
-    TSysParam(pchar(filename)),TSysParam(info));
-end;
-
 
 
 function fpNice(N:cint):cint;
 function fpNice(N:cint):cint;
 {
 {

+ 0 - 1
rtl/unix/bunxh.inc

@@ -93,7 +93,6 @@ Type TGrpArr = Array [0..0] of TGid;            { C style array workarounds}
     Function  FpIOCtl      (Handle:cint;Ndx: TIOCtlRequest; Data: Pointer):cint; external name  'FPC_SYSC_IOCTL';
     Function  FpIOCtl      (Handle:cint;Ndx: TIOCtlRequest; Data: Pointer):cint; external name  'FPC_SYSC_IOCTL';
     Function  FpNanoSleep  (req : ptimespec;rem : ptimespec):cint; external name 'FPC_SYSC_NANOSLEEP';
     Function  FpNanoSleep  (req : ptimespec;rem : ptimespec):cint; external name 'FPC_SYSC_NANOSLEEP';
     Function  fpLstat(path:pchar;Info:pstat):cint;
     Function  fpLstat(path:pchar;Info:pstat):cint;
-    Function  fpLstat(Filename: ansistring;Info:pstat):cint;
     Function  fpSymlink(oldname,newname:pchar):cint;
     Function  fpSymlink(oldname,newname:pchar):cint;
     Function  fpReadLink(name,linkname:pchar;maxlen:size_t):cint; external name  'FPC_SYSC_READLINK';
     Function  fpReadLink(name,linkname:pchar;maxlen:size_t):cint; external name  'FPC_SYSC_READLINK';
 
 

+ 7 - 2
rtl/unix/bunxovl.inc

@@ -110,13 +110,18 @@ begin
   FpStat:=FpStat(pchar(path),buf);
   FpStat:=FpStat(pchar(path),buf);
 End;
 End;
 
 
-Function  fpLstat   (path:pchar;var Info:stat):cint;
+Function  fpLstat   (path: Ansistring; Info: pstat):cint; inline;
+begin
+  fplstat:=fplstat(pchar(path), info);
+end;
+
+Function  fpLstat   (path:pchar;var Info:stat):cint; inline;
 
 
 begin
 begin
   fpLstat:=fplstat(path,@info);
   fpLstat:=fplstat(path,@info);
 end;
 end;
 
 
-Function  fpLstat   (Filename: ansistring;var Info:stat):cint;
+Function  fpLstat   (Filename: ansistring;var Info:stat):cint; inline;
 
 
 begin
 begin
   fpLstat:=fplstat(filename,@info);
   fpLstat:=fplstat(filename,@info);

+ 3 - 2
rtl/unix/bunxovlh.inc

@@ -37,8 +37,9 @@ Function  FpRmdir   (path : AnsiString): cInt; inline;
 Function  FpRename  (old  : AnsiString;newpath: AnsiString): cInt; inline;
 Function  FpRename  (old  : AnsiString;newpath: AnsiString): cInt; inline;
 Function  FpStat    (path: AnsiString; var buf : stat): cInt; inline;
 Function  FpStat    (path: AnsiString; var buf : stat): cInt; inline;
 Function  FpStat    (path: String; var buf : stat): cInt;
 Function  FpStat    (path: String; var buf : stat): cInt;
-Function  fpLstat   (path:pchar;var Info:stat):cint;
-Function  fpLstat   (Filename: ansistring;var Info:stat):cint;
+Function  fpLstat   (path: Ansistring; Info: pstat):cint; inline;
+Function  fpLstat   (path:pchar;var Info:stat):cint; inline;
+Function  fpLstat   (Filename: ansistring;var Info:stat):cint; inline;
 Function  FpAccess  (pathname : AnsiString; aMode : cInt): cInt; inline;
 Function  FpAccess  (pathname : AnsiString; aMode : cInt): cInt; inline;
 function  FpWaitPid (pid : TPid; Var Status : cInt; Options : cint) : TPid;
 function  FpWaitPid (pid : TPid; Var Status : cInt; Options : cint) : TPid;