diff options
author | nickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2019-04-04 15:55:16 +0000 |
---|---|---|
committer | nickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2> | 2019-04-04 15:55:16 +0000 |
commit | 4e887d2f57950f1f151c52a8679d1aee1d55a533 (patch) | |
tree | 04668c4c24e3fa53c4b914c5ee2ef024912db420 | |
parent | 508d106c949e68c3f5b17d6d7f9f02b223ebc75d (diff) | |
download | fpc-4e887d2f57950f1f151c52a8679d1aee1d55a533.tar.gz |
* separated the OpenBSD version of the stat structure to a separate ifdef block.
* Fixed some incompatibilities in the OpenBSD stat structure - removed st_lspare
and changed the type of st_blksize to cint32 instead of cuint32.
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@41827 3ad0048d-3df7-0310-abae-a5850022a9f2
-rw-r--r-- | rtl/bsd/ostypes.inc | 34 |
1 files changed, 23 insertions, 11 deletions
diff --git a/rtl/bsd/ostypes.inc b/rtl/bsd/ostypes.inc index e2002feb57..9ed69d7ebc 100644 --- a/rtl/bsd/ostypes.inc +++ b/rtl/bsd/ostypes.inc @@ -63,7 +63,7 @@ TYPE { file characteristics services } stat = record { the types are real} -{$ifdef dragonfly} +{$if defined(dragonfly)} st_ino : ino_t; // inode's number st_nlink : nlink_t; // number of hard links st_dev : dev_t; // inode's device @@ -86,10 +86,28 @@ TYPE st_lspare : cint32; st_qspare1 : cint64; // was recursive change detect st_qspare2 : cint64; -{$else dragonfly} -{$ifdef openbsd} +{$elseif defined(openbsd)} st_mode : mode_t; // inode protection mode -{$endif openbsd} + st_dev : dev_t; // inode's device + st_ino : ino_t; // inode's number + st_nlink : nlink_t; // number of hard links + st_uid : uid_t; // user ID of the file's owner + st_gid : gid_t; // group ID of the file's group + st_rdev : dev_t; // device type + st_atime : time_t; // time of last access + st_atimensec : clong; // nsec of last access + st_mtime : time_t; // time of last data modification + st_mtimensec : clong; // nsec of last data modification + st_ctime : time_t; // time of last file status change + st_ctimensec : clong; // nsec of last file status change + st_size : off_t; // file size, in bytes + st_blocks : cint64; // blocks allocated for file + st_blksize : cint32; // optimal blocksize for I/O + st_flags : cuint32; // user defined flags for file + st_gen : cuint32; // file generation number + st_birthtime : time_t; // File creation time + st_birthtimensec : clong; // nsec of file creation time +{$else} st_dev : dev_t; // inode's device {$ifdef darwin_new_iostructs} st_mode : mode_t; // inode protection mode @@ -102,9 +120,7 @@ TYPE st_ino : ino_t; // inode's number {$else not netbsd} st_ino : ino_t; // inode's number -{$ifndef openbsd} st_mode : mode_t; // inode protection mode -{$endif not openbsd} {$endif not netbsd} st_nlink : nlink_t; // number of hard links {$endif not darwin_new_iostructs} @@ -135,12 +151,8 @@ TYPE {$ifndef NetBSD} st_lspare : cint32; {$endif} -{$ifdef openbsd} - st_birthtime : time_t; // File creation time - st_birthtimensec : clong; // nsec of file creation time -{$endif} st_qspare : array[0..1] Of cint64; -{$endif dragonfly} +{$endif} end; TStat = stat; pStat = ^stat; |