[Pkg-electronics-commits] [gnucap] 09/43: getenv LD_LIBRARY_PATH in main.
felix salfelder
felix-guest at moszumanska.debian.org
Wed Oct 4 03:21:43 UTC 2017
This is an automated email from the git hooks/post-receive script.
felix-guest pushed a commit to branch master
in repository gnucap.
commit 94db8950cb504cd1684d215cec1192eb3d60c857
Author: Felix Salfelder <felix at salfelder.org>
Date: Sun Mar 12 23:32:50 2017 +0000
getenv LD_LIBRARY_PATH in main.
now LD_LIBRARY_PATH is searched first, unless GNUCAP_PLUGPATH is set.
no deprecation warning, if plugin is loaded from LD_LIBRARY_PATH. good?
---
lib/c_attach.cc | 4 ----
main/main.cc | 3 ++-
2 files changed, 2 insertions(+), 5 deletions(-)
diff --git a/lib/c_attach.cc b/lib/c_attach.cc
index b570ea7..4a9c2e4 100644
--- a/lib/c_attach.cc
+++ b/lib/c_attach.cc
@@ -34,11 +34,7 @@ std::string plug_path()
std::string path = OS::getenv("GNUCAP_PLUGPATH");
if(path==""){ unreachable();
}else{ untested();
- path += ':';
}
-
- path += OS::getenv("LD_LIBRARY_PATH") + ':';
-
return path;
}
/*--------------------------------------------------------------------------*/
diff --git a/main/main.cc b/main/main.cc
index 82532e1..dc6be9c 100644
--- a/main/main.cc
+++ b/main/main.cc
@@ -60,7 +60,8 @@ static void prepare_env()
static std::string plugpath("PLUGPATH=" STRINGIZE_VALUE_OF(GNUCAP_PLUGPATH)
"\0 (reserved space) ");
- OS::setenv("GNUCAP_PLUGPATH", plugpath.substr(9), false);
+ std::string ldlpath = OS::getenv("LD_LIBRARY_PATH");
+ OS::setenv("GNUCAP_PLUGPATH", ldlpath + ':' + plugpath.substr(9), false);
}
/*--------------------------------------------------------------------------*/
static void read_startup_files(void)
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-electronics/gnucap.git
More information about the Pkg-electronics-commits
mailing list