summaryrefslogtreecommitdiffstats
path: root/host/lib/load_modules.cpp
diff options
context:
space:
mode:
authorPhilip Balister <philip@opensdr.com>2010-04-13 16:38:42 +0000
committerPhilip Balister <philip@opensdr.com>2010-04-13 16:38:42 +0000
commitf1838b9284a124fcfb5996eaf1647a69b4473278 (patch)
tree15e69f3641f8919fae201ec002a2edfc61f6cb42 /host/lib/load_modules.cpp
parentb59c54e334dfc1c6ab7da81c62038444f93efe61 (diff)
parent41a515f3f97ae77b7c1b4371fdef7c085dce8c1c (diff)
downloaduhd-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.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){