mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 18:29:13 +02:00
* fixed ambiguity between pipe(2) with two params and pipe(3) with one that broke -dFPC_USE_LIBC
(cherry picked from commit f341baeaa7
)
This commit is contained in:
parent
9b2ba834a6
commit
3a399845e4
@ -51,7 +51,7 @@ var
|
|||||||
pip : tfildes;
|
pip : tfildes;
|
||||||
flags : cint;
|
flags : cint;
|
||||||
begin
|
begin
|
||||||
assignPipe:=fppipe(pip, 0);
|
assignPipe:=fppipe(pip); // default parameter adds 0, if necessary. This abstracts between pipe(2) and pipe(3)
|
||||||
pipe_in:=pip[0];
|
pipe_in:=pip[0];
|
||||||
pipe_out:=pip[1];
|
pipe_out:=pip[1];
|
||||||
end;
|
end;
|
||||||
|
@ -13,6 +13,7 @@
|
|||||||
|
|
||||||
**********************************************************************}
|
**********************************************************************}
|
||||||
Unit BaseUnix;
|
Unit BaseUnix;
|
||||||
|
{$modeswitch defaultparameters} // on freebsd to make one (libc) and two parameter pipe transparent.
|
||||||
|
|
||||||
Interface
|
Interface
|
||||||
{$modeswitch out}
|
{$modeswitch out}
|
||||||
|
@ -35,7 +35,7 @@ Type TGrpArr = Array [0..0] of TGid; { C style array workarounds}
|
|||||||
Function FpChown (path : pChar; owner : TUid; group : TGid): cInt;
|
Function FpChown (path : pChar; owner : TUid; group : TGid): cInt;
|
||||||
Function FpUtime (path : pChar; times : putimbuf): cInt;
|
Function FpUtime (path : pChar; times : putimbuf): cInt;
|
||||||
{$if defined(freebsd)}
|
{$if defined(freebsd)}
|
||||||
Function FpPipe (var fildes : tfildes; flags : cInt):cInt;
|
Function FpPipe (var fildes : tfildes; flags : cInt=0):cInt;
|
||||||
{$else}
|
{$else}
|
||||||
Function FpPipe (var fildes : tfildes):cInt;
|
Function FpPipe (var fildes : tfildes):cInt;
|
||||||
{$endif}
|
{$endif}
|
||||||
|
Loading…
Reference in New Issue
Block a user