guanaqo 1.0.0-alpha.26
Utilities for scientific software
Loading...
Searching...
No Matches
dl-flags.cpp
Go to the documentation of this file.
2
3#if !_WIN32
4#include <dlfcn.h>
5#endif
6
7namespace guanaqo {
8
9DynamicLoadFlags::operator int() const {
10#if _WIN32
11 return 0;
12#else
13 return (global ? RTLD_GLOBAL : RTLD_LOCAL) | //
14 (lazy ? RTLD_LAZY : RTLD_NOW) | //
15 (nodelete ? RTLD_NODELETE : 0) |
16#ifdef RTLD_DEEPBIND
17 (deepbind ? RTLD_DEEPBIND : 0) |
18#endif
19 0;
20#endif
21}
22
23} // namespace guanaqo
Flags wrapper for dynamic library loading.
bool nodelete
RTLD_NODELETE
Definition dl-flags.hpp:19
bool global
RTLD_GLOBAL (true) or RTLD_LOCAL (false).
Definition dl-flags.hpp:15
bool lazy
RTLD_LAZY (true) or RTLD_NOW (false).
Definition dl-flags.hpp:17
bool deepbind
RTLD_DEEPBIND
Definition dl-flags.hpp:21