Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 40 additions & 0 deletions src/core/sys/darwin/dlfcn.d
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;
2 changes: 1 addition & 1 deletion src/core/sys/linux/dlfcn.d
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ static if (__USE_GNU)
void* dli_saddr;
}

int dladdr(void* __address, Dl_info* __info);
int dladdr(in void* __address, Dl_info* __info);
int dladdr1(void* __address, Dl_info* __info, void** __extra_info, int __flags);

enum
Expand Down
2 changes: 1 addition & 1 deletion src/core/sys/posix/dlfcn.d
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,7 @@ version( CRuntime_Glibc )

deprecated("Please use core.sys.linux.dlfcn for non-POSIX extensions")
{
int dladdr(void* addr, Dl_info* info);
int dladdr(in void* addr, Dl_info* info);
void* dlvsym(void* handle, in char* symbol, in char* version_);

struct Dl_info
Expand Down