Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
A
alta
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
5
Issues
5
List
Boards
Labels
Service Desk
Milestones
Merge Requests
1
Merge Requests
1
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alta
alta
Commits
a4a6bc31
Commit
a4a6bc31
authored
May 06, 2015
by
Laurent Belcour
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[Update] Removing an unecessary #ifdef WIN32.
parent
a305b2f2
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
7 deletions
+16
-7
sources/core/plugins_manager.cpp
sources/core/plugins_manager.cpp
+16
-7
No files found.
sources/core/plugins_manager.cpp
View file @
a4a6bc31
...
...
@@ -18,6 +18,7 @@
#else
#include <dlfcn.h>
#endif
#include <cstdlib>
#include <stdio.h>
#include <list>
...
...
@@ -60,9 +61,8 @@ void get_library_dirs(std::list<std::string>& dirs)
{
dirs
.
push_back
(
""
);
#ifndef _WIN32
std
::
string
obj_str
;
const
char
*
env_str
=
getenv
(
"ALTA_LIB"
)
;
const
char
*
env_str
=
std
::
getenv
(
"ALTA_LIB"
)
;
if
(
env_str
==
NULL
)
{
obj_str
=
""
;
...
...
@@ -81,7 +81,6 @@ void get_library_dirs(std::list<std::string>& dirs)
break
;
}
}
#endif
}
//! \brief Open a dynamic library file (.so or .dll) and extract the associated
...
...
@@ -107,8 +106,10 @@ template<typename T> T open_library(const std::string& filename, const char* fun
if
(
res
==
NULL
)
{
std
::
cerr
<<
"<<ERROR>> unable to load the symbol
\"
"
<<
function
<<
"
\"
from "
<<
filename
<<
std
::
endl
;
continue
;
#ifdef DEBUG_CORE
std
::
cerr
<<
"<<ERROR>> unable to load the symbol
\"
"
<<
function
<<
"
\"
from "
<<
filename
<<
std
::
endl
;
#endif
continue
;
}
#ifdef DEBUG_CORE
std
::
cout
<<
"<<DEBUG>> will provide a "
<<
function
<<
" for library
\"
"
<<
filename
<<
"
\"
"
<<
std
::
endl
;
...
...
@@ -117,9 +118,11 @@ template<typename T> T open_library(const std::string& filename, const char* fun
}
else
{
#ifdef DEBUG_CORE
std
::
cerr
<<
"<<ERROR>> unable to load the dynamic library file
\"
"
<<
libname
<<
"
\"
"
<<
std
::
endl
;
std
::
cerr
<<
" cause:
\"
"
<<
GetLastError
()
<<
"
\"
"
<<
std
::
endl
;
continue
;
#endif
continue
;
}
#else
void
*
handle
=
dlopen
(
libname
.
c_str
(),
RTLD_GLOBAL
|
RTLD_LAZY
);
...
...
@@ -131,7 +134,9 @@ template<typename T> T open_library(const std::string& filename, const char* fun
if
(
dlerror
()
!=
NULL
)
{
#ifdef DEBUG_CORE
std
::
cerr
<<
"<<ERROR>> unable to load the symbol
\"
"
<<
function
<<
"
\"
from "
<<
libname
<<
std
::
endl
;
#endif
continue
;
}
#ifdef DEBUG_CORE
...
...
@@ -141,13 +146,17 @@ template<typename T> T open_library(const std::string& filename, const char* fun
}
else
{
#ifdef DEBUG_CORE
std
::
cerr
<<
"<<ERROR>> unable to load the dynamic library file
\"
"
<<
libname
<<
"
\"
"
<<
std
::
endl
;
std
::
cerr
<<
" cause:
\"
"
<<
dlerror
()
<<
"
\"
"
<<
std
::
endl
;
#endif
continue
;
}
#endif
}
return
NULL
;
std
::
cerr
<<
"<<ERROR>> unable to load the symbol
\"
"
<<
function
<<
"
\"
from "
<<
filename
<<
std
::
endl
;
return
NULL
;
}
//! \brief load a function from the ALTA input file.
...
...
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