diff options
author | Alexander Neundorf <neundorf@kde.org> | 2007-07-30 19:52:36 (GMT) |
---|---|---|
committer | Alexander Neundorf <neundorf@kde.org> | 2007-07-30 19:52:36 (GMT) |
commit | 220fe4f3ce1d8cf1446f3f38f3ec55279bcfc3ae (patch) | |
tree | ba114761ec0bcb6f030c082156b2e4c45f6be1aa /Source/kwsys/DynamicLoader.cxx | |
parent | a9d19d884ebdfe45d50a47537d81f3b5cd1792c9 (diff) | |
download | CMake-220fe4f3ce1d8cf1446f3f38f3ec55279bcfc3ae.zip CMake-220fe4f3ce1d8cf1446f3f38f3ec55279bcfc3ae.tar.gz CMake-220fe4f3ce1d8cf1446f3f38f3ec55279bcfc3ae.tar.bz2 |
COMP: add a dynamic loader for systems which don't support dynamic loading, so this is handled in kwsys and not every project using this has to care for it
Alex
Diffstat (limited to 'Source/kwsys/DynamicLoader.cxx')
-rw-r--r-- | Source/kwsys/DynamicLoader.cxx | 57 |
1 files changed, 56 insertions, 1 deletions
diff --git a/Source/kwsys/DynamicLoader.cxx b/Source/kwsys/DynamicLoader.cxx index 0ff6278..efab65a 100644 --- a/Source/kwsys/DynamicLoader.cxx +++ b/Source/kwsys/DynamicLoader.cxx @@ -435,7 +435,62 @@ const char* DynamicLoader::LastError() #endif // --------------------------------------------------------------- -// 5. Implementation for default UNIX machines. +// 5. Implementation for systems without dynamic libs +// __gnu_blrts__ is IBM BlueGene/L +#ifdef __gnu_blrts__ +#include <string.h> // for strerror() +#define DYNAMICLOADER_DEFINED 1 + +namespace KWSYS_NAMESPACE +{ + +//---------------------------------------------------------------------------- +DynamicLoader::LibraryHandle DynamicLoader::OpenLibrary(const char* libname ) +{ + return 0; +} + +//---------------------------------------------------------------------------- +int DynamicLoader::CloseLibrary(DynamicLoader::LibraryHandle lib) +{ + if (!lib) + { + return 0; + } + + return 1; +} + +//---------------------------------------------------------------------------- +DynamicLoader::SymbolPointer DynamicLoader::GetSymbolAddress( + DynamicLoader::LibraryHandle lib, const char* sym) +{ + return 0; +} + +//---------------------------------------------------------------------------- +const char* DynamicLoader::LibPrefix() + { + return "lib"; + } + +//---------------------------------------------------------------------------- +const char* DynamicLoader::LibExtension() + { + return ".a"; + } + +//---------------------------------------------------------------------------- +const char* DynamicLoader::LastError() + { + return "General error"; + } + +} // namespace KWSYS_NAMESPACE +#endif + +// --------------------------------------------------------------- +// 6. Implementation for default UNIX machines. // if nothing has been defined then use this #ifndef DYNAMICLOADER_DEFINED #define DYNAMICLOADER_DEFINED 1 |