summaryrefslogtreecommitdiffstats
path: root/host/lib/load_modules.cpp
diff options
context:
space:
mode:
authorJosh Blum <josh@joshknows.com>2010-04-12 13:55:57 +0000
committerJosh Blum <josh@joshknows.com>2010-04-12 13:55:57 +0000
commit615f7081d8361643031437ac31bb4a44e41839e8 (patch)
treef092991d1f3ff97fa53d9373c90e358105c4ff79 /host/lib/load_modules.cpp
parent50780640a1b9ed6abb2abebbc727ce19711fbcb4 (diff)
parent34854116a4fd287fe681222f2b7a881692e418d3 (diff)
downloaduhd-615f7081d8361643031437ac31bb4a44e41839e8.tar.gz
uhd-615f7081d8361643031437ac31bb4a44e41839e8.tar.bz2
uhd-615f7081d8361643031437ac31bb4a44e41839e8.zip
Merge branch 'master' into usrp_e
Diffstat (limited to 'host/lib/load_modules.cpp')
-rw-r--r--host/lib/load_modules.cpp5
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){