Lines 1-15
Link Here
|
1 |
--- rtl/bsd/bunxsysc.inc 2015-08-04 04:31:09.000000000 -0500 |
1 |
--- rtl/bsd/bunxsysc.inc.orig 2015-07-14 21:58:27 UTC |
2 |
+++ rtl/bsd/bunxsysc.inc 2020-02-21 18:30:23.409088000 -0500 |
2 |
+++ rtl/bsd/bunxsysc.inc |
3 |
@@ -379,10 +379,10 @@ |
3 |
@@ -374,39 +374,10 @@ begin |
4 |
{$if defined(freebsd) or defined (dragonfly)} |
4 |
FPutime:=do_syscall(syscall_nr_utimes,TSysParam(path),TSysParam(tvp)); |
5 |
{$define PIPE_RESULT_IN_EAX_AND_EDX} |
5 |
end; |
6 |
{$endif} |
6 |
|
7 |
-Function FPpipe(var fildes : tfildes):cint; |
7 |
-function __pipe_call(sysnr:TSysParam):TSysResult; {$ifdef cpui386}oldfpccall{$endif} external name 'FPC_DOSYS0'; |
8 |
+Function FPpipe(var fildes : tfildes; flags:cint):cint; |
8 |
- |
9 |
{$ifndef PIPE_RESULT_IN_EAX_AND_EDX} |
9 |
-{$if defined(freebsd) or defined (dragonfly)} |
|
|
10 |
- {$define PIPE_RESULT_IN_EAX_AND_EDX} |
11 |
-{$endif} |
12 |
Function FPpipe(var fildes : tfildes):cint; |
13 |
-{$ifndef PIPE_RESULT_IN_EAX_AND_EDX} |
10 |
begin |
14 |
begin |
11 |
- fppipe:=do_syscall(syscall_nr_pipe,TSysParam(@fildes)); |
15 |
- fppipe:=do_syscall(syscall_nr_pipe,TSysParam(@fildes)); |
12 |
+ fppipe:=do_syscall(syscall_nr_pipe2,TSysParam(@fildes), TSysParam(flags)); |
16 |
+ FPpipe:=do_syscall(syscall_nr_pipe2,TSysParam(@fildes),0); |
13 |
end; |
17 |
end; |
14 |
{$else} |
18 |
-{$else} |
15 |
var |
19 |
-var |
|
|
20 |
- a, b: cInt; |
21 |
-begin |
22 |
- asm |
23 |
- {$ifdef CPUi386} |
24 |
- pushl syscall_nr_pipe |
25 |
- call __pipe_call |
26 |
- movl %eax, a |
27 |
- movl %edx, b |
28 |
- {$else} |
29 |
- movq syscall_nr_pipe, %rdi |
30 |
- call __pipe_call |
31 |
- movl %eax, a |
32 |
- movl %edx, b |
33 |
- {$endif} |
34 |
- end; |
35 |
- |
36 |
- fpPipe := a; // eax is in a, no matter if it worked or not |
37 |
- fildes[0] := a; |
38 |
- fildes[1] := b; |
39 |
-end; |
40 |
-{$endif} |
41 |
|
42 |
function FPfcntl(fildes:cint;Cmd:cint;Arg:cint):cint; |
43 |
|