mirror of
https://gcc.gnu.org/git/gcc.git
synced 2024-11-27 05:44:15 +08:00
libphobos: Fix static asserts on NetBSD, FreeBSD, DragonFlyBSD
The function declarations were updated to use `const scope', but the static asserts were not. Reviewed-on: https://github.com/dlang/druntime/pull/3470 libphobos/ChangeLog: * libdruntime/MERGE: Merge upstream druntime 98c6ff0c.
This commit is contained in:
parent
1f152f2996
commit
b7b413152e
@ -1,4 +1,4 @@
|
||||
89f870b76710a4cfa96f711bb5b14a7439c5c2a7
|
||||
98c6ff0cf1241a0cfac196bf8a0523b1d4ecd3ac
|
||||
|
||||
The first line of this file holds the git revision number of the last
|
||||
merge done from the dlang/druntime repository.
|
||||
|
@ -82,16 +82,13 @@ struct __dlfunc_arg {
|
||||
|
||||
alias dlfunc_t = void function(__dlfunc_arg);
|
||||
|
||||
private template __externC(RT, P...)
|
||||
{
|
||||
alias __externC = extern(C) RT function(P) nothrow @nogc @system;
|
||||
}
|
||||
|
||||
/* 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(const scope char*, int)));
|
||||
static assert(is(typeof(&dlsym) == void* function(void*, const scope char*)));
|
||||
}
|
||||
|
||||
void* fdlopen(int, int);
|
||||
int dladdr(const(void)*, Dl_info*);
|
||||
|
@ -90,8 +90,8 @@ static if (__BSD_VISIBLE)
|
||||
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 assert(is(typeof(&dlopen) == void* function(const scope char*, int)));
|
||||
static assert(is(typeof(&dlsym) == void* function(void*, const scope char*)));
|
||||
}
|
||||
|
||||
static if (__BSD_VISIBLE)
|
||||
|
@ -87,16 +87,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(const scope char*, int)));
|
||||
static assert(is(typeof(&dlsym) == void* function(void*, const scope char*)));
|
||||
}
|
||||
|
||||
static if (__BSD_VISIBLE)
|
||||
{
|
||||
|
@ -158,8 +158,8 @@ else version (FreeBSD)
|
||||
|
||||
int dlclose(void*);
|
||||
char* dlerror();
|
||||
void* dlopen(in char*, int);
|
||||
void* dlsym(void*, in char*);
|
||||
void* dlopen(const scope char*, int);
|
||||
void* dlsym(void*, const scope char*);
|
||||
int dladdr(const(void)* addr, Dl_info* info);
|
||||
|
||||
struct Dl_info
|
||||
|
Loading…
Reference in New Issue
Block a user