Răsfoiți Sursa

* removed dos usage from fpc binary. (mostly fsearch -> filesearch).
This because of reports with problems with path env variables >255

git-svn-id: trunk@1367 -

marco 20 ani în urmă
părinte
comite
bf92c461d1
1 a modificat fișierele cu 5 adăugiri și 7 ștergeri
  1. 5 7
      compiler/utils/fpc.pp

+ 5 - 7
compiler/utils/fpc.pp

@@ -23,7 +23,7 @@ program fpc;
 {$mode objfpc}{$H+}
 
   uses
-     Sysutils,dos;
+     Sysutils;
 
   const
 {$ifdef UNIX}
@@ -65,14 +65,12 @@ program fpc;
 
   function FileExists ( Const F : String) : Boolean;
     var
-      Info : SearchRec;
+      Info : TSearchRec;
     begin
-      findfirst(F,readonly+archive+hidden,info);
-      FileExists:=(doserror=0);
+      FileExists:= findfirst(F,fareadonly+faarchive+fahidden,info)=0;
       findclose(Info);
     end;
 
-
   procedure findexe(var ppcbin:string);
     var
       path : string;
@@ -86,13 +84,13 @@ program fpc;
        ppcbin:=path+ppcbin
       else
        begin
-         path:=FSearch(ppcbin,getenv('PATH'));
+         path:=FileSearch(ppcbin,getenvironmentvariable('PATH'));
          if path<>'' then
           ppcbin:=path;
+
        end;
     end;
 
-
   var
      s              : ansistring;
      processorname,