Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
tsoc
openmm
Commits
d169badc
Unverified
Commit
d169badc
authored
Mar 04, 2020
by
peastman
Committed by
GitHub
Mar 04, 2020
Browse files
Merge pull request #2587 from tristanic/rtld_local
Switched dlopen flag from RTLD_GLOBAL to RTLD_LOCAL
parents
a9223eea
cbdb2736
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
olla/src/Platform.cpp
olla/src/Platform.cpp
+4
-5
No files found.
olla/src/Platform.cpp
View file @
d169badc
...
@@ -61,7 +61,7 @@ static bool stringLengthComparator(string i, string j) {
...
@@ -61,7 +61,7 @@ static bool stringLengthComparator(string i, string j) {
static
int
registerPlatforms
()
{
static
int
registerPlatforms
()
{
// Register the Platforms built into the main library. This should eventually be moved elsewhere.
// Register the Platforms built into the main library. This should eventually be moved elsewhere.
ReferencePlatform
*
platform
=
new
ReferencePlatform
();
ReferencePlatform
*
platform
=
new
ReferencePlatform
();
Platform
::
registerPlatform
(
platform
);
Platform
::
registerPlatform
(
platform
);
return
0
;
return
0
;
...
@@ -117,7 +117,7 @@ void Platform::contextCreated(ContextImpl& context, const map<string, string>& p
...
@@ -117,7 +117,7 @@ void Platform::contextCreated(ContextImpl& context, const map<string, string>& p
void
Platform
::
linkedContextCreated
(
ContextImpl
&
context
,
ContextImpl
&
originalContext
)
const
{
void
Platform
::
linkedContextCreated
(
ContextImpl
&
context
,
ContextImpl
&
originalContext
)
const
{
// The default implementation just copies over the properties and calls contextCreated().
// The default implementation just copies over the properties and calls contextCreated().
// Subclasses may override this to do something different.
// Subclasses may override this to do something different.
map
<
string
,
string
>
properties
;
map
<
string
,
string
>
properties
;
for
(
auto
&
name
:
getPropertyNames
())
for
(
auto
&
name
:
getPropertyNames
())
properties
[
name
]
=
getPropertyValue
(
originalContext
.
getOwner
(),
name
);
properties
[
name
]
=
getPropertyValue
(
originalContext
.
getOwner
(),
name
);
...
@@ -221,8 +221,8 @@ static void initializePlugins(vector<HMODULE>& plugins) {
...
@@ -221,8 +221,8 @@ static void initializePlugins(vector<HMODULE>& plugins) {
static
void
*
loadOneLibrary
(
const
string
&
file
)
{
static
void
*
loadOneLibrary
(
const
string
&
file
)
{
#ifdef __PNACL__
#ifdef __PNACL__
throw
OpenMMException
(
"Loading dynamic libraries is not supported on PNaCl"
);
throw
OpenMMException
(
"Loading dynamic libraries is not supported on PNaCl"
);
#else
#else
void
*
handle
=
dlopen
(
file
.
c_str
(),
RTLD_LAZY
|
RTLD_
G
LO
B
AL
);
void
*
handle
=
dlopen
(
file
.
c_str
(),
RTLD_LAZY
|
RTLD_LO
C
AL
);
if
(
handle
==
NULL
)
{
if
(
handle
==
NULL
)
{
throw
OpenMMException
(
"Error loading library "
+
file
+
": "
+
dlerror
());
throw
OpenMMException
(
"Error loading library "
+
file
+
": "
+
dlerror
());
}
}
...
@@ -357,4 +357,3 @@ ContextImpl& Platform::getContextImpl(Context& context) const {
...
@@ -357,4 +357,3 @@ ContextImpl& Platform::getContextImpl(Context& context) const {
const
ContextImpl
&
Platform
::
getContextImpl
(
const
Context
&
context
)
const
{
const
ContextImpl
&
Platform
::
getContextImpl
(
const
Context
&
context
)
const
{
return
*
context
.
impl
;
return
*
context
.
impl
;
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment