From fa4502387b2555d16320227a6fcfc32b7962202a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?K=C3=A1roly=20Balogh?= Date: Fri, 4 Jan 2019 06:34:56 +0000 Subject: [PATCH] haiku: more fixes of base OS types for 64bit, the compiler itself works natively now at least somewhat git-svn-id: trunk@40764 - --- rtl/haiku/ostypes.inc | 16 +++++++-------- rtl/haiku/ptypes.inc | 48 +++++++++++++++++++++++-------------------- 2 files changed, 34 insertions(+), 30 deletions(-) diff --git a/rtl/haiku/ostypes.inc b/rtl/haiku/ostypes.inc index e9a110beb7..129ddf7012 100644 --- a/rtl/haiku/ostypes.inc +++ b/rtl/haiku/ostypes.inc @@ -101,7 +101,7 @@ TYPE pUtsName= ^utsname; { file characteristics services } - stat = packed record { the types are real} + stat = record { the types are real} st_dev : dev_t; // inode's device st_ino : ino_t; // inode's number st_mode : mode_t; // inode protection mode @@ -119,7 +119,7 @@ TYPE st_ctimensec : clong; // nsec of last file status change st_crtime : time_t; // time of creation file st_crtimensec : clong; // nsec of creation file - st_type : cint; // attribute/index type + st_type : cint; // attribute/index type st_blocks : fsblkcnt_t; // blocks allocated for file end; @@ -127,12 +127,12 @@ TYPE pStat = ^stat; { directory services } - dirent = packed record - d_dev:longint; - d_pdev:longint; - d_ino:int64; - d_pino:int64; - d_reclen:word; + dirent = record + d_dev : dev_t; + d_pdev : dev_t; + d_ino : ino_t; + d_pino : ino_t; + d_reclen : cushort; d_name:array[0..255] of char; end; (* dirent = record diff --git a/rtl/haiku/ptypes.inc b/rtl/haiku/ptypes.inc index 1ecf0b5af2..c77bbab4a4 100644 --- a/rtl/haiku/ptypes.inc +++ b/rtl/haiku/ptypes.inc @@ -46,16 +46,16 @@ type end; pmbstate_t = ^mbstate_t; - dev_t = cuint32; { used for device numbers } + dev_t = cint32; { used for device numbers } TDev = dev_t; pDev = ^dev_t; - gid_t = cuint32; { used for group IDs } + gid_t = cint32; { used for group IDs } TGid = gid_t; pGid = ^gid_t; TIOCtlRequest = cuLong; - ino_t = clonglong; { used for file serial numbers } + ino_t = cint64; { used for file serial numbers } TIno = ino_t; pIno = ^ino_t; @@ -78,34 +78,36 @@ type {$ifdef cpu64} size_t = cuint64; { as definied in the C standard} ssize_t = cint64; { used by function for returning number of bytes } - clock_t = cuint64; time_t = cint64; { used for returning the time } {$else} size_t = cuint32; { as definied in the C standard} ssize_t = cint32; { used by function for returning number of bytes } - clock_t = culong; time_t = clong; { used for returning the time } {$endif} - wint_t = cint32; + wint_t = cint32; TSize = size_t; pSize = ^size_t; - psize_t = pSize; + psize_t = pSize; TsSize = ssize_t; - psSize = ^ssize_t; + psSize = ^ssize_t; uid_t = cuint32; { used for user ID type } TUid = Uid_t; pUid = ^Uid_t; + clock_t = cint32; + suseconds_t = cint32; + useconds_t = cuint32; + TClock = clock_t; pClock = ^clock_t; // TTime = time_t; // Not allowed in system unit, -> unixtype pTime = ^time_t; ptime_t = ^time_t; - + wchar_t = cint32; pwchar_t = ^wchar_t; @@ -113,21 +115,23 @@ type TSocklen = socklen_t; pSocklen = ^socklen_t; - timeval = packed record - tv_sec,tv_usec:clong; - end; - ptimeval = ^timeval; - TTimeVal = timeval; + timeval = record + tv_sec: time_t; + tv_usec: suseconds_t; + end; + ptimeval = ^timeval; + TTimeVal = timeval; + + timespec = record + tv_sec : time_t; + tv_nsec : clong; + end; + + ptimespec= ^timespec; + Ttimespec= timespec; - timespec = packed record - tv_sec : time_t; - tv_nsec : clong; - end; - ptimespec= ^timespec; - Ttimespec= timespec; - pthread_t = culong; - + sched_param = record __sched_priority: cint; end;