aboutsummaryrefslogtreecommitdiff
path: root/libphobos
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2019-02-19 12:38:48 +0000
committerRainer Orth <ro@gcc.gnu.org>2019-02-19 12:38:48 +0000
commitbe200c5c41cd17948aca4932fe96aeae268c99fc (patch)
tree0b3080a4ea03c5029df991e1c5cef9c2c2355cf0 /libphobos
parent6138fed0bea4a1d7e25a272514edc7f75ed92285 (diff)
downloadgcc-be200c5c41cd17948aca4932fe96aeae268c99fc.zip
gcc-be200c5c41cd17948aca4932fe96aeae268c99fc.tar.gz
gcc-be200c5c41cd17948aca4932fe96aeae268c99fc.tar.bz2
Fix libphobos.shared/load.d compile failure on Solaris
2019-02-19 Iain Buclaw <ibuclaw@gdcproject.org> * testsuite/libphobos.shared/load.d: Import core.sys.posix.dlfcn. [DragonFlyBSD, FreeBSD, linux, NetBSD, OSX, Solaris]: Import only RTLD_NOLOAD from core.sys.*.dlfcn. Assert RTLD_NOLOAD is available. From-SVN: r269014
Diffstat (limited to 'libphobos')
-rw-r--r--libphobos/ChangeLog7
-rw-r--r--libphobos/testsuite/libphobos.shared/load.d14
2 files changed, 17 insertions, 4 deletions
diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog
index 5279c89..16514ff 100644
--- a/libphobos/ChangeLog
+++ b/libphobos/ChangeLog
@@ -1,3 +1,10 @@
+2019-02-19 Iain Buclaw <ibuclaw@gdcproject.org>
+
+ * testsuite/libphobos.shared/load.d: Import core.sys.posix.dlfcn.
+ [DragonFlyBSD, FreeBSD, linux, NetBSD, OSX, Solaris]: Import only
+ RTLD_NOLOAD from core.sys.*.dlfcn.
+ Assert RTLD_NOLOAD is available.
+
2019-02-19 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE>
* m4/druntime/libraries.m4 (DRUNTIME_LIBRARIES_NET): New macro.
diff --git a/libphobos/testsuite/libphobos.shared/load.d b/libphobos/testsuite/libphobos.shared/load.d
index 8c13f51..5a2dd01 100644
--- a/libphobos/testsuite/libphobos.shared/load.d
+++ b/libphobos/testsuite/libphobos.shared/load.d
@@ -3,10 +3,16 @@ import core.stdc.stdio;
import core.stdc.string;
import core.thread;
-version (linux) import core.sys.linux.dlfcn;
-else version (FreeBSD) import core.sys.freebsd.dlfcn;
-else version (NetBSD) import core.sys.netbsd.dlfcn;
-else static assert(0, "unimplemented");
+import core.sys.posix.dlfcn;
+
+version (DragonFlyBSD) import core.sys.dragonflybsd.dlfcn : RTLD_NOLOAD;
+version (FreeBSD) import core.sys.freebsd.dlfcn : RTLD_NOLOAD;
+version (linux) import core.sys.linux.dlfcn : RTLD_NOLOAD;
+version (NetBSD) import core.sys.netbsd.dlfcn : RTLD_NOLOAD;
+version (OSX) import core.sys.darwin.dlfcn : RTLD_NOLOAD;
+version (Solaris) import core.sys.solaris.dlfcn : RTLD_NOLOAD;
+
+static assert(__traits(compiles, RTLD_NOLOAD), "unimplemented");
void loadSym(T)(void* handle, ref T val, const char* mangle)
{