summaryrefslogtreecommitdiff
path: root/rtl/bsd
diff options
context:
space:
mode:
authornickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-03-08 16:18:17 +0000
committernickysn <nickysn@3ad0048d-3df7-0310-abae-a5850022a9f2>2019-03-08 16:18:17 +0000
commit75011a1dccc4c6e71d9fc48c69ea190c85ba139c (patch)
tree1baf808ae31b121253957761cc3de2f47b430a99 /rtl/bsd
parent5ff3d45363d7894adccd4bc3429076f46568f548 (diff)
downloadfpc-75011a1dccc4c6e71d9fc48c69ea190c85ba139c.tar.gz
* refactored the ifdefs around the dirent structure
git-svn-id: https://svn.freepascal.org/svn/fpc/trunk@41641 3ad0048d-3df7-0310-abae-a5850022a9f2
Diffstat (limited to 'rtl/bsd')
-rw-r--r--rtl/bsd/ostypes.inc28
1 files changed, 13 insertions, 15 deletions
diff --git a/rtl/bsd/ostypes.inc b/rtl/bsd/ostypes.inc
index 1b3b7c7f43..d588fdcf21 100644
--- a/rtl/bsd/ostypes.inc
+++ b/rtl/bsd/ostypes.inc
@@ -146,8 +146,19 @@ TYPE
pStat = ^stat;
{ directory services }
-{$ifndef darwin_new_iostructs}
-{$ifdef dragonfly}
+{$if defined(darwin_new_iostructs)}
+ {$packrecords 4}
+ { available on Mac OS X 10.6 and later, and used by all iPhoneOS versions }
+ dirent = record
+ d_fileno : cuint64; // file number of entry
+ d_seekoff : cuint64; // seek offset (optional, used by servers)
+ d_reclen : cuint16; // length of this record
+ d_namlen : cuint16; // length of string in d_name
+ d_type : cuint8; // file type, see below
+ d_name : array[0..PATH_MAX-1] of char; // name must be no longer than this
+ end;
+ {$packrecords c}
+{$elseif defined(dragonfly)}
dirent = record
d_fileno : ino_t; // file number of entry
d_namlen : cuint16; // strlen (d_name)
@@ -165,19 +176,6 @@ TYPE
d_name : array[0..(255 + 1)-1] of char; // name must be no longer than this
end;
{$endif}
-{$else not darwin_new_iostructs}
- {$packrecords 4}
- { available on Mac OS X 10.6 and later, and used by all iPhoneOS versions }
- dirent = record
- d_fileno : cuint64; // file number of entry
- d_seekoff : cuint64; // seek offset (optional, used by servers)
- d_reclen : cuint16; // length of this record
- d_namlen : cuint16; // length of string in d_name
- d_type : cuint8; // file type, see below
- d_name : array[0..PATH_MAX-1] of char; // name must be no longer than this
- end;
- {$packrecords c}
-{$endif darwin_new_iostructs}
TDirent = dirent;
pDirent = ^dirent;