From c4d8a4c5f2b497dcbdb59394458bee30924290b7 Mon Sep 17 00:00:00 2001 From: marco Date: Sat, 4 Oct 2014 11:25:45 +0000 Subject: [PATCH] * Stat file patches from OpenBSD ports tree. git-svn-id: trunk@28739 - --- rtl/bsd/ostypes.inc | 24 +++++++++++++++++++++--- 1 file changed, 21 insertions(+), 3 deletions(-) diff --git a/rtl/bsd/ostypes.inc b/rtl/bsd/ostypes.inc index 97d8923cb1..b14ef26bb7 100644 --- a/rtl/bsd/ostypes.inc +++ b/rtl/bsd/ostypes.inc @@ -63,6 +63,9 @@ TYPE { file characteristics services } stat = record { the types are real} +{$ifdef openbsd} + st_mode : mode_t; // inode protection mode +{$endif} st_dev : dev_t; // inode's device {$ifdef darwinarm} st_mode : mode_t; // inode protection mode @@ -75,16 +78,15 @@ 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} {$endif not netbsd} st_nlink : nlink_t; // number of hard links {$endif} 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 -{$ifdef openbsd} - st_padd0 : cint; -{$endif} st_atime : time_t; // time of last access st_atimensec : clong; // nsec of last access st_mtime : time_t; // time of last data modification @@ -121,10 +123,20 @@ TYPE { directory services } {$ifndef darwinarm} dirent = record + {$ifdef openbsd} + d_fileno : ino_t; + {$else} d_fileno : cuint32; // file number of entry + {$endif} +{$ifdef openbsd} + d_off : off_t; +{$endif} d_reclen : cuint16; // length of this record d_type : cuint8; // file type, see below d_namlen : cuint8; // length of string in d_name +{$ifdef openbsd} + d_padding : array[1..4] of cuint8; +{$endif} d_name : array[0..(255 + 1)-1] of char; // name must be no longer than this end; {$else not darwinarm} @@ -149,6 +161,11 @@ TYPE dd_size : clong; // amount of data returned by getdirentries dd_buf : pchar; // data buffer dd_len : cint; // size of data buffer +{$ifdef openbsd} + dd_curpos : off_t; + dd_lock : pointer; + dd_rewind : clong; +{$else} {$ifdef netbsdpowerpc} dd_pad1 : cint; dd_seek : cint64; // magic cookie returned by getdirentries @@ -161,6 +178,7 @@ TYPE __dd_lock : pthread_mutex_t; // for thread locking __dd_td : pointer; // telldir position recording {$endif} +{$endif not openbsd} end; TDir = dir; pDir = ^dir;