~ubuntu-branches/ubuntu/quantal/psi/quantal

« back to all changes in this revision

Viewing changes to third-party/cppunit/cppunit/src/cppunit/UnixDynamicLibraryManager.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Jan Niehusmann
  • Date: 2009-09-25 17:49:51 UTC
  • mfrom: (6.1.3 sid)
  • Revision ID: james.westby@ubuntu.com-20090925174951-lvm7kdap82o8xhn3
Tags: 0.13-1
* Updated to upstream version 0.13
* Set Standards-Version to 3.8.3

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
#include <cppunit/Portability.h>
2
 
 
3
 
#if defined(CPPUNIT_HAVE_UNIX_DLL_LOADER)
4
 
#include <cppunit/plugin/DynamicLibraryManager.h>
5
 
 
6
 
#include <dlfcn.h>
7
 
#include <unistd.h>
8
 
 
9
 
 
10
 
CPPUNIT_NS_BEGIN
11
 
 
12
 
 
13
 
DynamicLibraryManager::LibraryHandle 
14
 
DynamicLibraryManager::doLoadLibrary( const std::string &libraryName )
15
 
{
16
 
  return ::dlopen( libraryName.c_str(), RTLD_NOW | RTLD_GLOBAL );
17
 
}
18
 
 
19
 
 
20
 
void 
21
 
DynamicLibraryManager::doReleaseLibrary()
22
 
{
23
 
  ::dlclose( m_libraryHandle);
24
 
}
25
 
 
26
 
 
27
 
DynamicLibraryManager::Symbol 
28
 
DynamicLibraryManager::doFindSymbol( const std::string &symbol )
29
 
{
30
 
  return ::dlsym ( m_libraryHandle, symbol.c_str() );
31
 
}
32
 
 
33
 
 
34
 
std::string 
35
 
DynamicLibraryManager::getLastErrorDetail() const
36
 
{
37
 
  return "";
38
 
}
39
 
 
40
 
 
41
 
CPPUNIT_NS_END
42
 
 
43
 
 
44
 
#endif // defined(CPPUNIT_HAVE_UNIX_DLL_LOADER)