mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 20:49:23 +02:00
* revert previous AssignPipe change, will need different approach
git-svn-id: trunk@12002 -
This commit is contained in:
parent
da3718b74b
commit
bf9358efd4
@ -48,14 +48,23 @@ 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
|
||||||
pip : tpipe;
|
ret : longint;
|
||||||
begin
|
errn : cint;
|
||||||
{$ifdef FPC_USE_LIBC}
|
{$ifdef FPC_USE_LIBC}
|
||||||
assignpipe:=pipe(pip);
|
fdis : array[0..1] of cint;
|
||||||
{$else}
|
|
||||||
assignPipe:=fppipe(pip);
|
|
||||||
{$endif}
|
{$endif}
|
||||||
pipe_in:=pip[0];
|
begin
|
||||||
pipe_out:=pip[1];
|
{$ifndef FPC_USE_LIBC}
|
||||||
|
ret:=intAssignPipe(pipe_in,pipe_out,errn);
|
||||||
|
if ret=-1 Then
|
||||||
|
fpseterrno(errn);
|
||||||
|
{$ELSE}
|
||||||
|
fdis[0]:=pipe_in;
|
||||||
|
fdis[1]:=pipe_out;
|
||||||
|
ret:=pipe(fdis);
|
||||||
|
pipe_in:=fdis[0];
|
||||||
|
pipe_out:=fdis[1];
|
||||||
|
{$ENDIF}
|
||||||
|
AssignPipe:=ret;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user