* made HMODULE a PtrInt on unix, this is compatible with the other platforms

git-svn-id: trunk@1104 -
This commit is contained in:
florian 2005-09-17 22:49:42 +00:00
parent ee9862d231
commit 66e8097281
2 changed files with 7 additions and 3 deletions

View File

@ -21,6 +21,9 @@ Function dlopen(Name : PChar; Flags : longint) : Pointer; cdecl; external libdl;
FUnction dlsym(Lib : Pointer; Name : Pchar) : Pointer; cdecl; external Libdl;
Function dlclose(Lib : Pointer) : Longint; cdecl; external libdl;
Function dlerror() : Pchar; cdecl; external libdl;
{ overloaded for compatibility with hmodule }
FUnction dlsym(Lib : PtrInt; Name : Pchar) : Pointer; cdecl; external Libdl;
Function dlclose(Lib : PtrInt) : Longint; cdecl; external libdl;
implementation

View File

@ -20,10 +20,11 @@
---------------------------------------------------------------------}
Type
TLibHandle = Pointer;
{ using PtrInt here is compliant with the other platforms }
TLibHandle = PtrInt;
Const
NilHandle = Nil;
NilHandle : TLibHandle = 0;
{$else}
@ -36,7 +37,7 @@ uses dl;
Function LoadLibrary(Name : AnsiString) : TLibHandle;
begin
Result:=dlopen(Pchar(Name),RTLD_LAZY);
Result:=TLibHandle(dlopen(Pchar(Name),RTLD_LAZY));
end;
Function GetProcedureAddress(Lib : TLibHandle; ProcName : AnsiString) : Pointer;