diff options
author | Philip Balister <philip@opensdr.com> | 2010-04-13 16:38:42 +0000 |
---|---|---|
committer | Philip Balister <philip@opensdr.com> | 2010-04-13 16:38:42 +0000 |
commit | f1838b9284a124fcfb5996eaf1647a69b4473278 (patch) | |
tree | 15e69f3641f8919fae201ec002a2edfc61f6cb42 /host/lib/load_modules.cpp | |
parent | b59c54e334dfc1c6ab7da81c62038444f93efe61 (diff) | |
parent | 41a515f3f97ae77b7c1b4371fdef7c085dce8c1c (diff) | |
download | uhd-f1838b9284a124fcfb5996eaf1647a69b4473278.tar.gz uhd-f1838b9284a124fcfb5996eaf1647a69b4473278.tar.bz2 uhd-f1838b9284a124fcfb5996eaf1647a69b4473278.zip |
Merge branch 'usrp_e' of git@ettus.sourcerepo.com:ettus/uhd into usrp_e
Diffstat (limited to 'host/lib/load_modules.cpp')
-rw-r--r-- | host/lib/load_modules.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/host/lib/load_modules.cpp b/host/lib/load_modules.cpp index babff1ca5..ef633325d 100644 --- a/host/lib/load_modules.cpp +++ b/host/lib/load_modules.cpp @@ -31,6 +31,7 @@ namespace fs = boost::filesystem; **********************************************************************/ #ifdef HAVE_DLFCN_H #include <dlfcn.h> +static const std::string env_path_sep = ":"; static void load_module(const std::string &file_name){ if (dlopen(file_name.c_str(), RTLD_LAZY) == NULL){ @@ -42,6 +43,7 @@ static void load_module(const std::string &file_name){ #elif HAVE_WINDOWS_H #include <windows.h> +static const std::string env_path_sep = ";"; static void load_module(const std::string &file_name){ if (LoadLibrary(file_name.c_str()) == NULL){ @@ -52,6 +54,7 @@ static void load_module(const std::string &file_name){ } #else +static const std::string env_path_sep = ":"; static void load_module(const std::string &file_name){ throw std::runtime_error(str( @@ -108,7 +111,7 @@ UHD_STATIC_BLOCK(load_modules){ //split the path at the path separators std::vector<std::string> module_paths; - boost::split(module_paths, env_module_path, boost::is_any_of(":;")); + boost::split(module_paths, env_module_path, boost::is_any_of(env_path_sep)); //load modules in each path BOOST_FOREACH(const std::string &module_path, module_paths){ |