[fpc-pascal] DirectoryExists on FreeBSD , problem

Karoly Balogh (Charlie/SGR) charlie at scenergy.dfmk.hu
Mon Oct 14 16:40:59 CEST 2019


Hi Alexey,

On Mon, 14 Oct 2019, Alexey Tor. wrote:

>  FPC 3.3.1-r43118 [2019/10/04], on Linux x64, cross compiling to
> FreeBSD x64 12.0 (TrueOS).
> Smth is broken in DirectoryExistsUTF8() on FreeBSD. After this FPC
> update CudaText cannot see that folder (in subdir of home dir, access
> rights ok) exists. After removing this check in app, app now cannot see
> that another dir (also in home dir) exists.
>
> I removed VM with freebsd so cannot check in small demo.

If I can have a random guess, it's probably the stat structure being
outdated with the C equivalent, therefore whatever tests are being made on
the result of fstat() or fpstat() call, is not working properly. The BSDs
were notorius for changing their stat structures, or changing the type of
some fields in the structure (which totally changes the alignment), maybe
even several times during the past years... Decades... :P I had to adapt
the NetBSD one too to make it work on recent NetBSD versions a while back,
when I brought the NetBSD port to be somewhat up to date.

The structure in question is in rtl/bsd/ostypes.inc.

Sadly I know very little about FreeBSD, and I don't have it in any form,
and never had it, so I'd pass on attempting to reproduce and fix this.

Charlie


More information about the fpc-pascal mailing list