[fpc-devel] DF64 BSD -- FPC running natively but argument address mangling prevents bootstrap

John Marino fpc-devel at marino.st
Tue Nov 18 17:35:23 CET 2014


On 11/18/2014 17:29, John Marino wrote:
> getcwd seems to work okay, I don't think that's a problem.
> This is where the problems start (cfileutl.pas, PathExists function):
> 
> if allowcache then
>   Result:=DirCache.DirectoryExists(hs)
> 
> The DirCache.DirectoryExists function always returns false, even on
> valid paths.
> 

more importantly,
if allowcache then
          Result:=DirCache.DirectoryExists(hs)
        else
          Result:=SysUtils.DirectoryExists(hs);

SysUtils.DirectoryExists(hs) returns false too.


so I'm back at rtl/unix/sysutils

Function DirectoryExists (Const Directory : String) : Boolean;

Var Info : Stat;

begin
  DirectoryExists:=(fpstat(pointer(Directory),Info)>=0) and
fpS_ISDIR(Info.st_mode);
end;


John



More information about the fpc-devel mailing list