mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 20:09:27 +02:00
* fix AssignPipe for FreeBSD
git-svn-id: trunk@11996 -
This commit is contained in:
parent
ecef0ed86a
commit
600da72d75
@ -48,23 +48,14 @@ Function AssignPipe(var pipe_in,pipe_out:cint):cint; [public, alias : 'FPC_SYSC_
|
|||||||
If the operation was unsuccesful, linuxerror is set.
|
If the operation was unsuccesful, linuxerror is set.
|
||||||
}
|
}
|
||||||
var
|
var
|
||||||
ret : longint;
|
pip : tpipe;
|
||||||
errn : cint;
|
|
||||||
{$ifdef FPC_USE_LIBC}
|
|
||||||
fdis : array[0..1] of cint;
|
|
||||||
{$endif}
|
|
||||||
begin
|
begin
|
||||||
{$ifndef FPC_USE_LIBC}
|
{$ifdef FPC_USE_LIBC}
|
||||||
ret:=intAssignPipe(pipe_in,pipe_out,errn);
|
assignpipe:=pipe(pip);
|
||||||
if ret=-1 Then
|
{$else}
|
||||||
fpseterrno(errn);
|
assignPipe:=fppipe(pip);
|
||||||
{$ELSE}
|
{$endif}
|
||||||
fdis[0]:=pipe_in;
|
pipe_in:=pip[0];
|
||||||
fdis[1]:=pipe_out;
|
pipe_out:=pip[1];
|
||||||
ret:=pipe(fdis);
|
|
||||||
pipe_in:=fdis[0];
|
|
||||||
pipe_out:=fdis[1];
|
|
||||||
{$ENDIF}
|
|
||||||
AssignPipe:=ret;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user