Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / fpc-pascal / 2019-11

DirectoryExists on FreeBSD 12 problem

1 message · 1 person ·

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

AlexeyT

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

Reply by email