summaryrefslogtreecommitdiff
path: root/src/cppunit
diff options
context:
space:
mode:
authorBaptiste Lepilleur <gaiacrtn@free.fr>2003-05-07 19:07:17 +0000
committerBaptiste Lepilleur <gaiacrtn@free.fr>2003-05-07 19:07:17 +0000
commitad7d9b040b7a78e7ac14f7d3556b2eb5f09f5b81 (patch)
treedbfd72bd0f17fbf40d857aa14c121cf0a53f9aa8 /src/cppunit
parent31ca191eaeffb4288f01b78d64535c70a07473f2 (diff)
downloadcppunit-ad7d9b040b7a78e7ac14f7d3556b2eb5f09f5b81.tar.gz
Makefile.
Makefile.am * configure.in * config/ac_dll.m4 * examples/cppunittest/Makefile.am * examples/hierarchy/Makefile.am * examples/money/Makefile.am * examples/simple/Makefile.am * include/cppunit/config/SelectDllLoader.h * include/cppunit/plugin/TestPlugIn.h * include/cppunit/tools/Algorithm.h * src/DllPlugInTester/Makefile.am * src/cppunit/Makefile.am * src/cppunit/TestDecorator.cpp * src/cppunit/ShlDynamicLibraryManager.cpp * src/cppunit/UnixDynamicLibraryManager.cpp * src/cppunit/Win32DynamicLibraryManager.cpp: applied patch from Abdessattar Sassi <abdesassi@users.sourceforge.net> to add support for plug-in to hp-ux.
Diffstat (limited to 'src/cppunit')
-rw-r--r--src/cppunit/BeOsDynamicLibraryManager.cpp2
-rw-r--r--src/cppunit/Makefile.am3
-rw-r--r--src/cppunit/ShlDynamicLibraryManager.cpp52
-rw-r--r--src/cppunit/TestDecorator.cpp2
-rw-r--r--src/cppunit/UnixDynamicLibraryManager.cpp2
-rw-r--r--src/cppunit/Win32DynamicLibraryManager.cpp2
6 files changed, 58 insertions, 5 deletions
diff --git a/src/cppunit/BeOsDynamicLibraryManager.cpp b/src/cppunit/BeOsDynamicLibraryManager.cpp
index 677ff9d..b8568be 100644
--- a/src/cppunit/BeOsDynamicLibraryManager.cpp
+++ b/src/cppunit/BeOsDynamicLibraryManager.cpp
@@ -46,4 +46,4 @@ DynamicLibraryManager::getLastErrorDetail() const
CPPUNIT_NS_END
-#endif // defined(CPPUNIT_HAVE_BEOS_DLL_LOADER) \ No newline at end of file
+#endif // defined(CPPUNIT_HAVE_BEOS_DLL_LOADER)
diff --git a/src/cppunit/Makefile.am b/src/cppunit/Makefile.am
index 5d6703c..cdb03ce 100644
--- a/src/cppunit/Makefile.am
+++ b/src/cppunit/Makefile.am
@@ -1,5 +1,5 @@
#
-# $Id: Makefile.am,v 1.42 2002-08-28 22:20:52 blep Exp $
+# $Id: Makefile.am,v 1.43 2003-05-07 20:07:17 blep Exp $
#
EXTRA_DIST = cppunit.dsp cppunit_dll.dsp DllMain.cpp
@@ -54,6 +54,7 @@ libcppunit_la_SOURCES = \
TextTestRunner.cpp \
TypeInfoHelper.cpp \
UnixDynamicLibraryManager.cpp \
+ ShlDynamicLibraryManager.cpp \
XmlDocument.cpp \
XmlElement.cpp \
XmlOutputter.cpp \
diff --git a/src/cppunit/ShlDynamicLibraryManager.cpp b/src/cppunit/ShlDynamicLibraryManager.cpp
new file mode 100644
index 0000000..a9849e9
--- /dev/null
+++ b/src/cppunit/ShlDynamicLibraryManager.cpp
@@ -0,0 +1,52 @@
+#include <cppunit/Portability.h>
+
+#if defined(CPPUNIT_HAVE_UNIX_SHL_LOADER)
+#include <cppunit/plugin/DynamicLibraryManager.h>
+
+#include <dl.h>
+#include <unistd.h>
+
+
+CPPUNIT_NS_BEGIN
+
+
+DynamicLibraryManager::LibraryHandle
+DynamicLibraryManager::doLoadLibrary( const std::string &libraryName )
+{
+ return ::shl_load(libraryName.c_str(), BIND_IMMEDIATE, 0L);
+ //return ::dlopen( libraryName.c_str(), RTLD_NOW ); // RTLD_LAZY ?
+}
+
+
+void
+DynamicLibraryManager::doReleaseLibrary()
+{
+ ::shl_unload( (shl_t)m_libraryHandle);
+ //::dlclose( m_libraryHandle);
+}
+
+
+DynamicLibraryManager::Symbol
+DynamicLibraryManager::doFindSymbol( const std::string &symbol )
+{
+ DynamicLibraryManager::Symbol L_symaddr = 0;
+ if ( ::shl_findsym ( (shl_t*)(&m_libraryHandle), symbol.c_str(), TYPE_UNDEFINED, &L_symaddr ) == 0 ) {
+ return L_symaddr;
+ } else {
+ return 0;
+ }
+ //return ::dlsym ( m_libraryHandle, symbol.c_str() );
+}
+
+
+std::string
+DynamicLibraryManager::getLastErrorDetail() const
+{
+ return "";
+}
+
+
+CPPUNIT_NS_END
+
+
+#endif // defined(CPPUNIT_HAVE_UNIX_SHL_LOADER)
diff --git a/src/cppunit/TestDecorator.cpp b/src/cppunit/TestDecorator.cpp
index 918a26e..4e25a6a 100644
--- a/src/cppunit/TestDecorator.cpp
+++ b/src/cppunit/TestDecorator.cpp
@@ -50,4 +50,4 @@ TestDecorator::doGetChildTestAt( int index ) const
}
-CPPUNIT_NS_END \ No newline at end of file
+CPPUNIT_NS_END
diff --git a/src/cppunit/UnixDynamicLibraryManager.cpp b/src/cppunit/UnixDynamicLibraryManager.cpp
index d6419f2..c5cbcfe 100644
--- a/src/cppunit/UnixDynamicLibraryManager.cpp
+++ b/src/cppunit/UnixDynamicLibraryManager.cpp
@@ -41,4 +41,4 @@ DynamicLibraryManager::getLastErrorDetail() const
CPPUNIT_NS_END
-#endif // defined(CPPUNIT_HAVE_UNIX_DLL_LOADER) \ No newline at end of file
+#endif // defined(CPPUNIT_HAVE_UNIX_DLL_LOADER)
diff --git a/src/cppunit/Win32DynamicLibraryManager.cpp b/src/cppunit/Win32DynamicLibraryManager.cpp
index 0a82a88..194b5ba 100644
--- a/src/cppunit/Win32DynamicLibraryManager.cpp
+++ b/src/cppunit/Win32DynamicLibraryManager.cpp
@@ -69,4 +69,4 @@ DynamicLibraryManager::getLastErrorDetail() const
CPPUNIT_NS_END
-#endif // defined(CPPUNIT_HAVE_WIN32_DLL_LOADER) \ No newline at end of file
+#endif // defined(CPPUNIT_HAVE_WIN32_DLL_LOADER)