diff options
author | Brad King <brad.king@kitware.com> | 2014-10-31 17:11:58 (GMT) |
---|---|---|
committer | Brad King <brad.king@kitware.com> | 2014-10-31 17:11:58 (GMT) |
commit | 5868b4e2fb7aa7de34403cae7dbc7a827d70a8e8 (patch) | |
tree | a73f41ac49686a9adc8bb27d0c9729833a22580d /Source/kwsys/DynamicLoader.hxx.in | |
parent | 8b16e62c7a10c246744327cde38b0b1d70eb8c48 (diff) | |
parent | 72b5b48040ed65fdb54b8ffeb3326b456586b8c8 (diff) | |
download | CMake-5868b4e2fb7aa7de34403cae7dbc7a827d70a8e8.zip CMake-5868b4e2fb7aa7de34403cae7dbc7a827d70a8e8.tar.gz CMake-5868b4e2fb7aa7de34403cae7dbc7a827d70a8e8.tar.bz2 |
Merge branch 'upstream-kwsys' into update-kwsys
Diffstat (limited to 'Source/kwsys/DynamicLoader.hxx.in')
-rw-r--r-- | Source/kwsys/DynamicLoader.hxx.in | 15 |
1 files changed, 13 insertions, 2 deletions
diff --git a/Source/kwsys/DynamicLoader.hxx.in b/Source/kwsys/DynamicLoader.hxx.in index 64468ec..75811ab 100644 --- a/Source/kwsys/DynamicLoader.hxx.in +++ b/Source/kwsys/DynamicLoader.hxx.in @@ -13,6 +13,7 @@ #define @KWSYS_NAMESPACE@_DynamicLoader_hxx #include <@KWSYS_NAMESPACE@/Configure.h> +#include <@KWSYS_NAMESPACE@/stl/string> #if defined(__hpux) #include <dl.h> @@ -27,6 +28,11 @@ #include <be/kernel/image.h> #endif +/* Define these macros temporarily to keep the code readable. */ +#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS +# define kwsys_stl @KWSYS_NAMESPACE@_stl +#endif + namespace @KWSYS_NAMESPACE@ { /** \class DynamicLoader @@ -77,14 +83,14 @@ public: /** Load a dynamic library into the current process. * The returned LibraryHandle can be used to access the symbols in the * library. */ - static LibraryHandle OpenLibrary(const char*); + static LibraryHandle OpenLibrary(const kwsys_stl::string&); /** Attempt to detach a dynamic library from the * process. A value of true is returned if it is sucessful. */ static int CloseLibrary(LibraryHandle); /** Find the address of the symbol in the given library. */ - static SymbolPointer GetSymbolAddress(LibraryHandle, const char*); + static SymbolPointer GetSymbolAddress(LibraryHandle, const kwsys_stl::string&); /** Return the default module prefix for the current platform. */ static const char* LibPrefix() { return "@KWSYS_DynamicLoader_PREFIX@"; } @@ -98,4 +104,9 @@ public: } // namespace @KWSYS_NAMESPACE@ +/* Undefine temporary macros. */ +#if !defined (KWSYS_NAMESPACE) && !@KWSYS_NAMESPACE@_NAME_IS_KWSYS +# undef kwsys_stl +#endif + #endif |