From e1dff473a625cdbecbaddb89d48fc675efea09f0 Mon Sep 17 00:00:00 2001 From: Gabriele Svelto Date: Tue, 8 May 2012 20:17:01 +0200 Subject: 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 --- src/ctx.hpp | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'src/ctx.hpp') 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 plugins_t; plugins_t plugins; -#elif defined XS_HAVE_LINUX +#elif defined XS_HAVE_PLUGINS typedef std::vector 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 - -- cgit v1.2.3