diff options
author | Gabriele Svelto <gabriele.svelto@gmail.com> | 2012-05-08 20:17:01 +0200 |
---|---|---|
committer | Martin Sustrik <sustrik@250bpm.com> | 2012-05-12 12:13:19 +0200 |
commit | e1dff473a625cdbecbaddb89d48fc675efea09f0 (patch) | |
tree | 3bbed0ac0a82c3b719fdeaa71c04c66966abfa8a /src/ctx.hpp | |
parent | 0b1bfac99a01db54396875ca49987f4117061990 (diff) |
Enabled plug-in loading on all hosts with support for dlopen()
Previously the code used for loading plug-ins would be built only on
Linux hosts. Now the required functions are checked for and plug-in
loading code is enabled if those are present on all platforms. Using
lstat() to check for file types also increases portability to hosts that
do not have the dirent.d_type field. If shared libraries support is
disabled plug-ins will also be automatically disabled.
Signed-off-by: Gabriele Svelto <gabriele.svelto@gmail.com>
Diffstat (limited to 'src/ctx.hpp')
-rw-r--r-- | src/ctx.hpp | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/src/ctx.hpp b/src/ctx.hpp index 7b0b74b..8e2fd03 100644 --- a/src/ctx.hpp +++ b/src/ctx.hpp @@ -54,7 +54,7 @@ namespace xs // Context object encapsulates all the global state associated with // the library. - + class ctx_t { public: @@ -173,7 +173,7 @@ namespace xs #if defined XS_HAVE_WINDOWS typedef std::vector <HMODULE> plugins_t; plugins_t plugins; -#elif defined XS_HAVE_LINUX +#elif defined XS_HAVE_PLUGINS typedef std::vector <void*> plugins_t; plugins_t plugins; #endif @@ -185,8 +185,7 @@ namespace xs ctx_t (const ctx_t&); const ctx_t &operator = (const ctx_t&); }; - + } #endif - |