Skip to content
This repository has been archived by the owner on Oct 12, 2022. It is now read-only.

Commit

Permalink
Merge pull request #324 from alexrp/dladdr
Browse files Browse the repository at this point in the history
Fix issue #5593 - add dladdr, dlvsym, and Dl_info to core.sys.posix.dlfcn.
  • Loading branch information
andralex committed Oct 15, 2012
2 parents be3a7fa + a2c5494 commit ada94eb
Showing 1 changed file with 29 additions and 1 deletion.
30 changes: 29 additions & 1 deletion src/core/sys/posix/dlfcn.d
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
*
* Copyright: Copyright Sean Kelly 2005 - 2009.
* License: <a href="http://www.boost.org/LICENSE_1_0.txt">Boost License 1.0</a>.
* Authors: Sean Kelly
* Authors: Sean Kelly, Alex Rønne Petersen
* Standards: The Open Group Base Specifications Issue 6, IEEE Std 1003.1, 2004 Edition
*/

Expand Down Expand Up @@ -45,6 +45,16 @@ version( linux )
char* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
int dladdr(void* addr, Dl_info* info);
void* dlvsym(void* handle, in char* symbol, in char* version_);

struct Dl_info
{
const(char)* dli_fname;
void* dli_fbase;
const(char)* dli_sname;
void* dli_saddr;
}
}
else version( OSX )
{
Expand All @@ -57,6 +67,15 @@ else version( OSX )
char* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
int dladdr(void* addr, Dl_info* info);

struct Dl_info
{
const(char)* dli_fname;
void* dli_fbase;
const(char)* dli_sname;
void* dli_saddr;
}
}
else version( FreeBSD )
{
Expand All @@ -69,4 +88,13 @@ else version( FreeBSD )
char* dlerror();
void* dlopen(in char*, int);
void* dlsym(void*, in char*);
int dladdr(const(void)* addr, Dl_info* info);

struct Dl_info
{
const(char)* dli_fname;
void* dli_fbase;
const(char)* dli_sname;
void* dli_saddr;
}
}

0 comments on commit ada94eb

Please sign in to comment.