haiku: cleanup of some interface definitions, verify structures against the actual haiku code, so it should work both on 32bit and 64bit

git-svn-id: trunk@40792 -
This commit is contained in:
Károly Balogh 2019-01-07 13:01:08 +00:00
parent 9ce876e2ae
commit 1a26c381f9
2 changed files with 79 additions and 120 deletions

View File

@ -29,32 +29,16 @@
{$ENDIF}
Type
timezone = packed record
timezone = record
tz_minuteswest,tz_dsttime:cint;
end;
ptimezone =^timezone;
TTimeZone = timezone;
rusage = packed record
rusage = record
ru_utime : timeval; { user time used }
ru_stime : timeval; { system time used }
ru_maxrss : clong; { max resident set size }
ru_ixrss : clong; { integral shared memory size }
ru_idrss : clong; { integral unshared data " }
ru_isrss : clong; { integral unshared stack " }
ru_minflt : clong; { page reclaims }
ru_majflt : clong; { page faults }
ru_nswap : clong; { swaps }
ru_inblock : clong; { block input operations }
ru_oublock : clong; { block output operations }
ru_msgsnd : clong; { messages sent }
ru_msgrcv : clong; { messages received }
ru_nsignals : clong; { signals received }
ru_nvcsw : clong; { voluntary context switches }
ru_nivcsw : clong; { involuntary " }
end;
// #define ru_last ru_nivcsw
// #define ru_first ru_ixrss
{ auto generated by a c prog, statmacr.c}
@ -137,37 +121,16 @@ TYPE
d_reclen : cushort;
d_name : array[0..255] of char;
end;
(* dirent = record
d_dev : dev_t;
d_pdev : dev_t;
d_ino : ino_t;
d_pino : ino_t;
d_reclen : word;
d_name : Char;
// d_fileno : cuint32; // file number of entry
// d_reclen : cuint16; // length of this record
// d_type : cuint8; // file type, see below
// d_namlen : cuint8; // length of string in d_name
// d_name : array[0..(255 + 1)-1] of char; // name must be no longer than this
end;*)
TDirent = dirent;
pDirent = ^dirent;
dir = packed record
dir = record
fd : cint; // file descriptor associated with directory
ent : dirent;
// dd_loc : clong; // offset in current buffer
// dd_size : clong; // amount of data returned by getdirentries
// dd_buf : pchar; // data buffer
// dd_len : cint; // size of data buffer
{$ifdef netbsdpowerpc}
// dd_pad1 : cint;
// dd_seek : cint64; // magic cookie returned by getdirentries
{$else}
// dd_seek : clong; // magic cookie returned by getdirentries
{$endif}
// dd_rewind : clong; // magic cookie for rewinding
// dd_flags : cint; // flags for readdir
next_entry : cshort;
entries_left : cushort;
seek_position : clong;
current_position : clong;
first_entry : dirent;
end;
TDir = dir;
pDir = ^dir;
@ -180,16 +143,16 @@ TYPE
putimbuf = ^utimbuf;
flock = record
l_type : cshort; { lock type: read/write, etc. }
l_whence : cshort; { type of l_start }
l_start : off_t; { starting offset }
l_len : off_t; { len = 0 means until end of file }
l_pid : pid_t; { lock owner }
l_type : cshort; { lock type: read/write, etc. }
l_whence: cshort; { type of l_start }
end;
TFlock = flock;
pFlock = ^flock;
tms = packed record
tms = record
tms_utime : clock_t; { User CPU time }
tms_stime : clock_t; { System CPU time }
tms_cutime : clock_t; { User CPU time of terminated child procs }
@ -198,6 +161,7 @@ TYPE
TTms= tms;
pTms= ^tms;
type
TFDSetEl = Cardinal;
TFDSet = ARRAY[0..(FD_MAXFDSET div 32)-1] of TFDSetEl;
pFDSet = ^TFDSet;
@ -244,7 +208,7 @@ CONST
WNOHANG = 1; { don't block waiting }
WUNTRACED = 2; { report status of stopped children }
Type
type
TRLimit = record
rlim_cur, { current (soft) limit }
rlim_max : TRLim; { maximum value for rlim_cur }
@ -312,8 +276,9 @@ const
B_LIBRARY_IMAGE = 2;
B_ADD_ON_IMAGE = 3;
B_SYSTEM_IMAGE = 4;
type
image_info = packed record
image_info = record
id: image_id;
_type: longint;
sequence: longint;
@ -323,12 +288,6 @@ type
device: dev_t;
node: ino_t;
name: array[0..1024{MAXPATHLEN}-1] of char;
{ name: string[255];
name2: string[255];
name3: string[255];
name4: string[255];
name5: string[5];
}
text: pointer;
data: pointer;
text_size: longint;

View File

@ -25,18 +25,18 @@
type
fsblkcnt_t = clonglong;
TStatfs = packed record
bsize : Cardinal;
frsize : Cardinal;
TStatfs = record
bsize : culong;
frsize : culong;
blocks : fsblkcnt_t;
bfree : fsblkcnt_t;
bavail : fsblkcnt_t;
files : fsblkcnt_t;
ffree : fsblkcnt_t;
favail : fsblkcnt_t;
fsid : Cardinal;
flag : Cardinal;
namemax : Cardinal;
fsid : culong;
flag : culong;
namemax : culong;
end;
PStatFS=^TStatFS;