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

« back to all changes in this revision

Viewing changes to rtl/unix/dynlibs.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
 
    $Id: dynlibs.inc,v 1.2 2002/09/07 16:01:27 peter Exp $
3
 
    This file is part of the Free Pascal run time library.
4
 
    Copyright (c) 1999-2000 by the Free Pascal development team
5
 
 
6
 
    Implement OS-dependent part of dynamic library loading.
7
 
 
8
 
    See the file COPYING.FPC, included in this distribution,
9
 
    for details about the copyright.
10
 
 
11
 
    This program is distributed in the hope that it will be useful,
12
 
    but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
14
 
 
15
 
 **********************************************************************}
16
 
 
17
 
{$ifdef readinterface}
18
 
 
19
 
{ ---------------------------------------------------------------------
20
 
    Interface declarations
21
 
  ---------------------------------------------------------------------}
22
 
 
23
 
Type
24
 
  TLibHandle = Pointer;
25
 
 
26
 
Const
27
 
  NilHandle = Nil;
28
 
 
29
 
{$else}
30
 
 
31
 
{ ---------------------------------------------------------------------
32
 
    Implementation section
33
 
  ---------------------------------------------------------------------}
34
 
 
35
 
uses dl;
36
 
 
37
 
Function LoadLibrary(Name : AnsiString) : TLibHandle;
38
 
 
39
 
begin
40
 
  Result:=dlopen(Pchar(Name),RTLD_LAZY);
41
 
end;
42
 
 
43
 
Function GetProcedureAddress(Lib : TLibHandle; ProcName : AnsiString) : Pointer;
44
 
 
45
 
begin
46
 
  Result:=dlsym(lib,pchar(ProcName));
47
 
end;
48
 
 
49
 
Function UnloadLibrary(Lib : TLibHandle) : Boolean;
50
 
 
51
 
begin
52
 
  Result:=dlClose(Lib)=0;
53
 
end;
54
 
 
55
 
{$endif}
56
 
 
57
 
{
58
 
  $Log: dynlibs.inc,v $
59
 
  Revision 1.2  2002/09/07 16:01:27  peter
60
 
    * old logs removed and tabs fixed
61
 
 
62
 
}