[fpc-devel] DF64 BSD -- FPC running natively but argument address mangling prevents bootstrap
John Marino
fpc-devel at marino.st
Tue Nov 18 17:42:46 CET 2014
On 11/18/2014 17:35, John Marino wrote:
> 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;
>
so DirectoryExists is only hit once -- on a file
(/usr/local/etc/fpc.cfg). The DirCache.DirectoryExists function seems
to be used instead for all directories, all the time.
John
More information about the fpc-devel
mailing list