Skip to content
This repository was archived by the owner on Oct 12, 2022. It is now read-only.
/ druntime Public archive
Merged
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
15 changes: 6 additions & 9 deletions src/core/sys/freebsd/dlfcn.d
Original file line number Diff line number Diff line change
Expand Up @@ -86,16 +86,13 @@ static if (__BSD_VISIBLE)
};
}

private template __externC(RT, P...)
{
alias __externC = extern(C) RT function(P) nothrow @nogc;
}

/* XSI functions first. */
static assert(is(typeof(&dlclose) == __externC!(int, void*)));
static assert(is(typeof(&dlerror) == __externC!(char*)));
static assert(is(typeof(&dlopen) == __externC!(void*, const char*, int)));
static assert(is(typeof(&dlsym) == __externC!(void*, void*, const char*)));
extern(C) {
static assert(is(typeof(&dlclose) == int function(void*)));
static assert(is(typeof(&dlerror) == char* function()));
static assert(is(typeof(&dlopen) == void* function(in char*, int)));
static assert(is(typeof(&dlsym) == void* function(void*, in char*)));
}

static if (__BSD_VISIBLE)
{
Expand Down