123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248 |
- #ifndef BOOST_DLL_SHARED_LIBRARY_MODE_HPP
- #define BOOST_DLL_SHARED_LIBRARY_MODE_HPP
- #include <boost/dll/config.hpp>
- #include <boost/predef/os.h>
- #include <boost/predef/library/c.h>
- #if BOOST_OS_WINDOWS
- # include <boost/winapi/dll.hpp>
- #else
- # include <dlfcn.h>
- #endif
- #ifdef BOOST_HAS_PRAGMA_ONCE
- # pragma once
- #endif
- namespace boost { namespace dll { namespace load_mode {
- enum type {
- #ifdef BOOST_DLL_DOXYGEN
-
- default_mode,
-
- dont_resolve_dll_references,
-
- load_ignore_code_authz_level,
-
- load_with_altered_search_path,
-
- rtld_lazy,
-
- rtld_now,
-
- rtld_global,
-
- rtld_local,
-
- rtld_deepbind,
-
- append_decorations,
-
- search_system_folders
- #elif BOOST_OS_WINDOWS
- default_mode = 0,
- dont_resolve_dll_references = boost::winapi::DONT_RESOLVE_DLL_REFERENCES_,
- load_ignore_code_authz_level = boost::winapi::LOAD_IGNORE_CODE_AUTHZ_LEVEL_,
- load_with_altered_search_path = boost::winapi::LOAD_WITH_ALTERED_SEARCH_PATH_,
- rtld_lazy = 0,
- rtld_now = 0,
- rtld_global = 0,
- rtld_local = 0,
- rtld_deepbind = 0,
- append_decorations = 0x00800000,
- search_system_folders = (append_decorations << 1)
- #else
- default_mode = 0,
- dont_resolve_dll_references = 0,
- load_ignore_code_authz_level = 0,
- load_with_altered_search_path = 0,
- rtld_lazy = RTLD_LAZY,
- rtld_now = RTLD_NOW,
- rtld_global = RTLD_GLOBAL,
- rtld_local = RTLD_LOCAL,
- #if BOOST_LIB_C_GNU < BOOST_VERSION_NUMBER(2,3,4)
- rtld_deepbind = 0,
- #else
- rtld_deepbind = RTLD_DEEPBIND,
- #endif
- append_decorations = 0x00800000,
- search_system_folders = (append_decorations << 1)
- #endif
- };
- BOOST_CONSTEXPR inline type operator|(type left, type right) BOOST_NOEXCEPT {
- return static_cast<type>(
- static_cast<unsigned int>(left) | static_cast<unsigned int>(right)
- );
- }
- BOOST_CXX14_CONSTEXPR inline type& operator|=(type& left, type right) BOOST_NOEXCEPT {
- left = left | right;
- return left;
- }
- BOOST_CONSTEXPR inline type operator&(type left, type right) BOOST_NOEXCEPT {
- return static_cast<type>(
- static_cast<unsigned int>(left) & static_cast<unsigned int>(right)
- );
- }
- BOOST_CXX14_CONSTEXPR inline type& operator&=(type& left, type right) BOOST_NOEXCEPT {
- left = left & right;
- return left;
- }
- BOOST_CONSTEXPR inline type operator^(type left, type right) BOOST_NOEXCEPT {
- return static_cast<type>(
- static_cast<unsigned int>(left) ^ static_cast<unsigned int>(right)
- );
- }
- BOOST_CXX14_CONSTEXPR inline type& operator^=(type& left, type right) BOOST_NOEXCEPT {
- left = left ^ right;
- return left;
- }
- BOOST_CONSTEXPR inline type operator~(type left) BOOST_NOEXCEPT {
- return static_cast<type>(
- ~static_cast<unsigned int>(left)
- );
- }
- }}}
- #endif
|