|
@@ -29,32 +29,16 @@
|
|
|
{$ENDIF}
|
|
|
|
|
|
Type
|
|
|
- timezone = packed record
|
|
|
+ timezone = record
|
|
|
tz_minuteswest,tz_dsttime:cint;
|
|
|
end;
|
|
|
ptimezone =^timezone;
|
|
|
TTimeZone = timezone;
|
|
|
-
|
|
|
- rusage = packed 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
|
|
|
+
|
|
|
+ rusage = record
|
|
|
+ ru_utime : timeval; { user time used }
|
|
|
+ ru_stime : timeval; { system time used }
|
|
|
+ end;
|
|
|
|
|
|
{ auto generated by a c prog, statmacr.c}
|
|
|
|
|
@@ -78,15 +62,15 @@ Const
|
|
|
// _UTSNAME_LENGTH = ;
|
|
|
// _UTSNAME_NODENAME_LENGTH = ;
|
|
|
|
|
|
-CONST // OS specific parameters for general<fd,sig>set behaviour
|
|
|
+CONST // OS specific parameters for general<fd,sig>set behaviour
|
|
|
BITSINWORD = 8*sizeof(longint);
|
|
|
// SIG_MAXSIG = 32; //128; // highest signal version
|
|
|
- FD_MAXFDSET = 1024;
|
|
|
-// wordsinsigset = 4; // words in sigset_t
|
|
|
+ FD_MAXFDSET = 1024;
|
|
|
+// wordsinsigset = 4; // words in sigset_t
|
|
|
ln2bitsinword = 5; { 32bit : ln(32)/ln(2)=5 }
|
|
|
ln2bitmask = 2 shl ln2bitsinword - 1;
|
|
|
- wordsinfdset = FD_MAXFDSET DIV BITSINWORD; // words in fdset_t
|
|
|
- wordsinsigset = SIG_MAXSIG DIV BITSINWORD;
|
|
|
+ wordsinfdset = FD_MAXFDSET DIV BITSINWORD; // words in fdset_t
|
|
|
+ wordsinsigset = SIG_MAXSIG DIV BITSINWORD;
|
|
|
|
|
|
TYPE
|
|
|
{ system information services }
|
|
@@ -124,83 +108,63 @@ TYPE
|
|
|
st_type : cint; // attribute/index type
|
|
|
st_blocks : fsblkcnt_t; // blocks allocated for file
|
|
|
end;
|
|
|
-
|
|
|
+
|
|
|
TStat = stat;
|
|
|
pStat = ^stat;
|
|
|
|
|
|
- { directory services }
|
|
|
+ { directory services }
|
|
|
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;
|
|
|
+ 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
|
|
|
- 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
|
|
|
+ dir = record
|
|
|
+ fd : cint; // file descriptor associated with directory
|
|
|
+ next_entry : cshort;
|
|
|
+ entries_left : cushort;
|
|
|
+ seek_position : clong;
|
|
|
+ current_position : clong;
|
|
|
+ first_entry : dirent;
|
|
|
end;
|
|
|
TDir = dir;
|
|
|
pDir = ^dir;
|
|
|
|
|
|
- utimbuf = record
|
|
|
- actime : time_t;
|
|
|
- modtime : time_t;
|
|
|
- end;
|
|
|
+ utimbuf = record
|
|
|
+ actime : time_t;
|
|
|
+ modtime : time_t;
|
|
|
+ end;
|
|
|
TUtimBuf = utimbuf;
|
|
|
putimbuf = ^utimbuf;
|
|
|
|
|
|
- flock = record
|
|
|
- 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;
|
|
|
+ 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 }
|
|
|
+ end;
|
|
|
TFlock = flock;
|
|
|
pFlock = ^flock;
|
|
|
|
|
|
- tms = packed 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 }
|
|
|
- tms_cstime : clock_t; { System CPU time of terminated child procs }
|
|
|
- end;
|
|
|
- TTms= tms;
|
|
|
- pTms= ^tms;
|
|
|
+ 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 }
|
|
|
+ tms_cstime : clock_t; { System CPU time of terminated child procs }
|
|
|
+ end;
|
|
|
+ TTms= tms;
|
|
|
+ pTms= ^tms;
|
|
|
|
|
|
- TFDSetEl = Cardinal;
|
|
|
- TFDSet = ARRAY[0..(FD_MAXFDSET div 32)-1] of TFDSetEl;
|
|
|
- pFDSet = ^TFDSet;
|
|
|
+type
|
|
|
+ TFDSetEl = Cardinal;
|
|
|
+ TFDSet = ARRAY[0..(FD_MAXFDSET div 32)-1] of TFDSetEl;
|
|
|
+ pFDSet = ^TFDSet;
|
|
|
|
|
|
{***********************************************************************}
|
|
|
{ POSIX CONSTANT ROUTINE DEFINITIONS }
|
|
@@ -244,19 +208,19 @@ CONST
|
|
|
WNOHANG = 1; { don't block waiting }
|
|
|
WUNTRACED = 2; { report status of stopped children }
|
|
|
|
|
|
-Type
|
|
|
- TRLimit = record
|
|
|
- rlim_cur, { current (soft) limit }
|
|
|
- rlim_max : TRLim; { maximum value for rlim_cur }
|
|
|
- end;
|
|
|
- PRLimit = ^TRLimit;
|
|
|
+type
|
|
|
+ TRLimit = record
|
|
|
+ rlim_cur, { current (soft) limit }
|
|
|
+ rlim_max : TRLim; { maximum value for rlim_cur }
|
|
|
+ end;
|
|
|
+ PRLimit = ^TRLimit;
|
|
|
|
|
|
- iovec = record
|
|
|
- iov_base : pointer;
|
|
|
- iov_len : size_t;
|
|
|
- end;
|
|
|
- tiovec=iovec;
|
|
|
- piovec=^tiovec;
|
|
|
+ iovec = record
|
|
|
+ iov_base : pointer;
|
|
|
+ iov_len : size_t;
|
|
|
+ end;
|
|
|
+ tiovec=iovec;
|
|
|
+ piovec=^tiovec;
|
|
|
|
|
|
|
|
|
{*************************************************************************}
|
|
@@ -312,10 +276,11 @@ const
|
|
|
B_LIBRARY_IMAGE = 2;
|
|
|
B_ADD_ON_IMAGE = 3;
|
|
|
B_SYSTEM_IMAGE = 4;
|
|
|
+
|
|
|
type
|
|
|
- image_info = packed record
|
|
|
- id : image_id;
|
|
|
- _type : longint;
|
|
|
+ image_info = record
|
|
|
+ id: image_id;
|
|
|
+ _type: longint;
|
|
|
sequence: longint;
|
|
|
init_order: longint;
|
|
|
init_routine: pointer;
|
|
@@ -323,18 +288,12 @@ 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;
|
|
|
data_size: longint;
|
|
|
- end;
|
|
|
-
|
|
|
+ end;
|
|
|
+
|
|
|
(*----- symbol types and functions ------------------------*)
|
|
|
|
|
|
const B_SYMBOL_TYPE_DATA = $1;
|