freebsd src is https://github.com/freebsd/freebsd/blob/master/sys/sys/stat.h

it has 2 defines for "stat": usual

struct stat {
    dev_t     st_dev;        /* inode's device */
    ino_t      st_ino;        /* inode's number */
    nlink_t      st_nlink;        /* number of hard links */
*mode_t      st_mode;        /* inode protection mode */*

.....

and additional one for freebsd 11:

#if defined(_WANT_FREEBSD11_STAT) || defined(_KERNEL)
struct freebsd11_stat {
    __uint32_t st_dev;        /* inode's device */
    __uint32_t st_ino;        /* inode's number */
*mode_t      st_mode;        /* inode protection mode */*

....

FPC-- https://github.com/graemeg/freepascal/blob/master/rtl/bsd/ostypes.inc#L65

the 1st freebsd type is compatible with FPC (I checked only by list of fields and order of fields, w/out checking aligns). the 2nd is NOT compatible with FPC. so i wonder, which define freebsd 12 uses??? I cannot google it easily.

DirectoryExists reads st_mode item.

--
Regards,
Alexey

_______________________________________________
fpc-pascal maillist  -  fpc-pascal@lists.freepascal.org
https://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-pascal

Reply via email to