mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 07:09:23 +02:00
* 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:
parent
5a95586f38
commit
bf92c461d1
@ -23,7 +23,7 @@ program fpc;
|
|||||||
{$mode objfpc}{$H+}
|
{$mode objfpc}{$H+}
|
||||||
|
|
||||||
uses
|
uses
|
||||||
Sysutils,dos;
|
Sysutils;
|
||||||
|
|
||||||
const
|
const
|
||||||
{$ifdef UNIX}
|
{$ifdef UNIX}
|
||||||
@ -65,14 +65,12 @@ program fpc;
|
|||||||
|
|
||||||
function FileExists ( Const F : String) : Boolean;
|
function FileExists ( Const F : String) : Boolean;
|
||||||
var
|
var
|
||||||
Info : SearchRec;
|
Info : TSearchRec;
|
||||||
begin
|
begin
|
||||||
findfirst(F,readonly+archive+hidden,info);
|
FileExists:= findfirst(F,fareadonly+faarchive+fahidden,info)=0;
|
||||||
FileExists:=(doserror=0);
|
|
||||||
findclose(Info);
|
findclose(Info);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure findexe(var ppcbin:string);
|
procedure findexe(var ppcbin:string);
|
||||||
var
|
var
|
||||||
path : string;
|
path : string;
|
||||||
@ -86,13 +84,13 @@ program fpc;
|
|||||||
ppcbin:=path+ppcbin
|
ppcbin:=path+ppcbin
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
path:=FSearch(ppcbin,getenv('PATH'));
|
path:=FileSearch(ppcbin,getenvironmentvariable('PATH'));
|
||||||
if path<>'' then
|
if path<>'' then
|
||||||
ppcbin:=path;
|
ppcbin:=path;
|
||||||
|
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
var
|
var
|
||||||
s : ansistring;
|
s : ansistring;
|
||||||
processorname,
|
processorname,
|
||||||
|
Loading…
Reference in New Issue
Block a user