summaryrefslogtreecommitdiff
path: root/Source/kwsys/DynamicLoader.cxx
diff options
context:
space:
mode:
authorAlexander Neundorf <neundorf@kde.org>2007-07-30 15:52:36 -0400
committerAlexander Neundorf <neundorf@kde.org>2007-07-30 15:52:36 -0400
commit220fe4f3ce1d8cf1446f3f38f3ec55279bcfc3ae (patch)
treeba114761ec0bcb6f030c082156b2e4c45f6be1aa /Source/kwsys/DynamicLoader.cxx
parenta9d19d884ebdfe45d50a47537d81f3b5cd1792c9 (diff)
downloadcmake-220fe4f3ce1d8cf1446f3f38f3ec55279bcfc3ae.tar.gz
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.cxx57
1 files changed, 56 insertions, 1 deletions
diff --git a/Source/kwsys/DynamicLoader.cxx b/Source/kwsys/DynamicLoader.cxx
index 0ff6278094..efab65a5c0 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