This repository has been archived by the owner on Oct 12, 2022. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1635 from klickverbot/osx-dlfcn
Add non-POSIX dlfcn extensions for Darwin, add const to dladdr
- Loading branch information
Showing
3 changed files
with
42 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
/** | ||
* D header file for Darwin. | ||
* | ||
* $(LINK2 https://opensource.apple.com/source/dyld/dyld-360.22/include/dlfcn.h, Apple dyld/dlfcn.h) | ||
* | ||
* Copyright: Copyright David Nadlinger 2016. | ||
* License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0). | ||
* Authors: David Nadlinger | ||
*/ | ||
module core.sys.darwin.dlfcn; | ||
|
||
version (OSX) | ||
version = Darwin; | ||
else version (iOS) | ||
version = Darwin; | ||
else version (TVOS) | ||
version = Darwin; | ||
else version (WatchOS) | ||
version = Darwin; | ||
|
||
version (Darwin): | ||
extern(C): | ||
nothrow: | ||
@nogc: | ||
|
||
public import core.sys.posix.dlfcn; | ||
|
||
struct Dl_info | ||
{ | ||
const(char)* dli_fname; | ||
void* dli_fbase; | ||
const(char)* dli_sname; | ||
void* dli_saddr; | ||
} | ||
|
||
int dladdr(in void* addr, Dl_info* info); | ||
|
||
enum RTLD_NOLOAD = 0x10; | ||
enum RTLD_NODELETE = 0x80; | ||
enum RTLD_FIRST = 0x100; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters