* Try to update i386/openbsd port

git-svn-id: trunk@19350 -
This commit is contained in:
pierre 2011-10-03 23:22:28 +00:00
parent 7e87ca4c3c
commit 7f69e6426d
3 changed files with 15 additions and 11 deletions

View File

@ -50,6 +50,7 @@ begin
FPsigsuspend:= do_syscall(syscall_nr_sigsuspend,TSysParam(@sigmask));
end;
{$ifndef FPC_SYS_SIGTIMEDWAIT_UNAVAILABLE}
function fpsigtimedwait(const sigset:TSigSet;info:Psiginfo;timeout:Ptimespec):cint;
begin
@ -58,6 +59,7 @@ begin
Tsysparam(info),
Tsysparam(timeout));
end;
{$endif ndef FPC_SYS_SIGTIMEDWAIT_UNAVAILABLE}
Type // implementation side for now. Should move to BSD unit.
@ -567,7 +569,7 @@ end;
function Fppread(fd: cint; buf: pchar; nbytes : size_t; offset:Toff): ssize_t; [public, alias : 'FPC_SYSC_PREAD'];
begin
{$ifdef CPU64}
Fppread:=do_syscall(syscall_nr_pread,Fd,TSysParam(buf),nbytes,TSysParam(OffSet));
{$else}

View File

@ -24,7 +24,9 @@ Type TGrpArr = Array [0..0] of TGid; { C style array workarounds}
Function FpSigProcMask (how : cInt; Const nset : TSigSet; var oset : TSigSet): cInt; external name 'FPC_SYSC_SIGPROCMASK';
Function FpSigPending (var nset : TSigSet): cInt;
Function FpSigSuspend (Const sigmask : TSigSet): cInt;
{$ifndef FPC_SYS_SIGTIMEDWAIT_UNAVAILABLE}
Function FpSigTimedWait (Const sigset : TSigSet; info : Psiginfo; timeout:Ptimespec): cInt;
{$endif ndef FPC_SYS_SIGTIMEDWAIT_UNAVAILABLE}
Function FpUmask (cmask : TMode): TMode;
Function FpLink (existing : pChar; newone : pChar): cInt;
@ -85,7 +87,7 @@ Type TGrpArr = Array [0..0] of TGid; { C style array workarounds}
function FpReadV (fd: cint; const iov : piovec; iovcnt : cint):TSSize;
Function FpWrite (fd : cInt; buf:pChar; nbytes : TSize): TSsize; external name 'FPC_SYSC_WRITE';
Function FpPWrite (fd : cInt; buf:pChar; nbytes : TSize; offset:Toff): TSSize;
function FpWriteV (fd: cint; const iov : piovec; iovcnt : cint):TSSize;
function FpWriteV (fd: cint; const iov : piovec; iovcnt : cint):TSSize;
Function FpLseek (fd : cInt; offset : TOff; whence : cInt): TOff; external name 'FPC_SYSC_LSEEK';
Function FpTime (var tloc : TTime): TTime; external name 'FPC_SYSC_TIME';

View File

@ -47,7 +47,7 @@ Type
Const
{ IPC flags for get calls }
{$if defined(FreeBSD) or defined(NetBSD)} // BSD_VISIBLE
{$if defined(FreeBSD) or defined(NetBSD) or defined(OpenBSD)} // BSD_VISIBLE
IPC_R = 4 shl 6;
IPC_W = 2 shl 6;
IPC_M = 2 shl 12;
@ -63,7 +63,7 @@ Const
IPC_EXCL = 2 shl 9; { fail if key exists }
IPC_NOWAIT = 4 shl 9; { return error on wait }
{$if defined(FreeBSD) or defined(Darwin) or defined(Linux)}
{$if defined(FreeBSD) or defined(Darwin) or defined(Linux) or defined(OpenBSD)}
IPC_PRIVATE : TKey = 0;
{$endif}
@ -81,7 +81,7 @@ type
{$ifdef darwin}
{$packrecords 4}
{$endif}
{$if defined(FreeBSD) or defined(Darwin)}
{$if defined(FreeBSD) or defined(Darwin) or defined(OpenBSD)}
TIPC_Perm = record
cuid : cushort; { creator user id }
cgid : cushort; { creator group id }
@ -146,7 +146,7 @@ Function ftok (Path : pchar; ID : cint) : TKey; {$ifdef FPC_USE_LIBC} cdecl; ex
Type
PShmid_DS = ^TShmid_ds;
{$ifdef FreeBSD}
{$if defined(FreeBSD) or defined(OpenBSD)}
TShmid_ds = record
shm_perm : TIPC_Perm;
shm_segsz : cint;
@ -190,7 +190,7 @@ Type
__unused4 : culong;
__unused5 : culong;
end;
{$else cpux86_64}
{$else cpux86_64}
TShmid_ds = record
shm_perm : TIPC_Perm;
shm_segsz : cint;
@ -204,7 +204,7 @@ Type
shm_pages : pointer;
attaches : pointer;
end;
{$endif cpux86_64}
{$endif cpux86_64}
{$endif}
const
@ -243,7 +243,7 @@ type // the shm*info kind is "kernel" only.
shmall : cint;
end;
{$if defined(FreeBSD) or defined(Linux)}
{$if defined(FreeBSD) or defined(OpenBSD) or defined(Linux)}
PSHM_info = ^TSHM_info;
TSHM_info = record
used_ids : cint;
@ -279,7 +279,7 @@ type
msglen_t = culong;
msgqnum_t= culong;
{$ifdef Darwin}
{$ifdef Darwin}
user_msglen_t = culonglong;
user_msgqnum_t= culonglong;
{$endif}
@ -287,7 +287,7 @@ type
PMSG = ^TMSG;
TMSG = record
{$ifndef FreeBSD} // opague in FreeBSD
{$ifdef Darwin}
{$ifdef Darwin}
msg_next : PMSG;
msg_type : clong;
msg_ts : cushort;