~ubuntu-branches/debian/lenny/fpc/lenny

« back to all changes in this revision

Viewing changes to fpcsrc/rtl/darwin/unxfunc.inc

  • Committer: Bazaar Package Importer
  • Author(s): Mazen Neifer, Torsten Werner, Mazen Neifer
  • Date: 2008-05-17 17:12:11 UTC
  • mfrom: (3.1.9 intrepid)
  • Revision ID: james.westby@ubuntu.com-20080517171211-9qi33xhd9evfa0kg
Tags: 2.2.0-dfsg1-9
[ Torsten Werner ]
* Add Mazen Neifer to Uploaders field.

[ Mazen Neifer ]
* Moved FPC sources into a version dependent directory from /usr/share/fpcsrc
  to /usr/share/fpcsrc/${FPCVERSION}. This allow installing more than on FPC
  release.
* Fixed far call issue in compiler preventing building huge binearies.
  (closes: #477743)
* Updated building dependencies, recomennded and suggested packages.
* Moved fppkg to fp-utils as it is just a helper tool and is not required by
  compiler.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
{
 
2
    This file is part of the Free Component Library (FCL)
 
3
    Copyright (c) 1999-2000 by Peter Vreman
 
4
 
 
5
    Darwin temporary pclose/assignpipe implementation
 
6
 
 
7
    See the file COPYING.FPC, included in this distribution,
 
8
    for details about the copyright.
 
9
 
 
10
    This program is distributed in the hope that it will be useful,
 
11
    but WITHOUT ANY WARRANTY; without even the implied warranty of
 
12
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
 
13
 
 
14
 **********************************************************************}
 
15
 
 
16
 
 
17
 
 
18
Function PClose(Var F:file) : cint;
 
19
var
 
20
  pl : ^cint;
 
21
 
 
22
begin
 
23
  fpclose(filerec(F).Handle);
 
24
{ closed our side, Now wait for the other - this appears to be needed ?? }
 
25
  pl:=@(filerec(f).userdata[2]);
 
26
  pclose := WaitProcess(pl^);
 
27
end;
 
28
 
 
29
Function PClose(Var F:text) :cint;
 
30
var
 
31
  pl  : ^longint;
 
32
 
 
33
begin
 
34
  fpclose(Textrec(F).Handle);
 
35
{ closed our side, Now wait for the other - this appears to be needed ?? }
 
36
  pl:=@(textrec(f).userdata[2]);
 
37
  pclose:= WaitProcess(pl^);
 
38
end;
 
39
 
 
40
 
 
41
// can't have oldfpccall here, linux doesn't need it.
 
42
Function AssignPipe(var pipe_in,pipe_out:cint):cint; [public, alias : 'FPC_SYSC_ASSIGNPIPE'];
 
43
{
 
44
  Sets up a pair of file variables, which act as a pipe. The first one can
 
45
  be read from, the second one can be written to.
 
46
  If the operation was unsuccesful, linuxerror is set.
 
47
}
 
48
var
 
49
  ret  : longint;
 
50
  fdis : array[0..1] of cint;
 
51
begin
 
52
 fdis[0]:=pipe_in;
 
53
 fdis[1]:=pipe_out;
 
54
 ret:=pipe(fdis);
 
55
 pipe_in:=fdis[0];
 
56
 pipe_out:=fdis[1];
 
57
 AssignPipe:=ret;
 
58
end;
 
59
 
 
60