<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<p>freebsd src is
<a class="moz-txt-link-freetext" href="https://github.com/freebsd/freebsd/blob/master/sys/sys/stat.h">https://github.com/freebsd/freebsd/blob/master/sys/sys/stat.h</a></p>
<p>it has 2 defines for "stat": usual</p>
<p>struct stat {<br>
dev_t st_dev; /* inode's device */<br>
ino_t st_ino; /* inode's number */<br>
nlink_t st_nlink; /* number of hard links */<br>
<b>mode_t st_mode; /* inode protection mode */</b></p>
<p>.....<br>
</p>
<p>and additional one for freebsd 11:</p>
<p>#if defined(_WANT_FREEBSD11_STAT) || defined(_KERNEL)<br>
struct freebsd11_stat {<br>
__uint32_t st_dev; /* inode's device */<br>
__uint32_t st_ino; /* inode's number */<br>
<b> mode_t st_mode; /* inode protection mode */</b></p>
<p>....</p>
<p>FPC--
<a class="moz-txt-link-freetext" href="https://github.com/graemeg/freepascal/blob/master/rtl/bsd/ostypes.inc#L65">https://github.com/graemeg/freepascal/blob/master/rtl/bsd/ostypes.inc#L65</a><br>
</p>
<p>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.</p>
<p>DirectoryExists reads st_mode item.</p>
<pre class="moz-signature" cols="72">--
Regards,
Alexey</pre>
</body>
</html>