* 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 -
This commit is contained in:
marco 2005-10-13 18:36:01 +00:00
parent 5a95586f38
commit bf92c461d1

View File

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