summaryrefslogtreecommitdiff
path: root/ace/DLL.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ace/DLL.cpp')
-rw-r--r--ace/DLL.cpp41
1 files changed, 11 insertions, 30 deletions
diff --git a/ace/DLL.cpp b/ace/DLL.cpp
index 44e935f62b2..961b3e1cafd 100644
--- a/ace/DLL.cpp
+++ b/ace/DLL.cpp
@@ -5,8 +5,8 @@
#include "ace/DLL.h"
ACE_RCSID(ace, DLL, "$Id$")
-
-// Default constructor. Also, by default, the object will be closed
+
+// Default constructor. Also, by default, the object will be closed
// before it is destroyed.
ACE_DLL::ACE_DLL (int close_on_destruction)
@@ -17,7 +17,7 @@ ACE_DLL::ACE_DLL (int close_on_destruction)
// If the library name and the opening mode are specified than on
// object creation the library is implicitly opened.
-
+
ACE_DLL::ACE_DLL (ACE_DL_TYPE dll_name,
int open_mode,
int close_on_destruction)
@@ -26,7 +26,7 @@ ACE_DLL::ACE_DLL (ACE_DL_TYPE dll_name,
{
if (this->handle_ == ACE_SHLIB_INVALID_HANDLE)
ACE_ERROR ((LM_ERROR,
- ASYS_TEXT ("%s\n"),
+ "%s\n",
this->error ()));
}
@@ -39,19 +39,19 @@ ACE_DLL::~ACE_DLL (void)
// CLose the library only if it hasn't been already.
this->close ();
}
-
+
// This method opens the library based on the mode specified using the
// ACE_SHLIB_HANDLE which is obtained on making the ACE_OS::dlopen call.
// The default mode is:
-// RTLD_LAZY Only references to data symbols are relocate when the
+// RTLD_LAZY Only references to data symbols are relocate when the
// object is first loaded.
// The other modes include:
// RTLD_NOW All necessary relocations are performed when the
// object is first loaded.
// RTLD_GLOBAL The object symbols are made available for the
-// relocation processing of any other object.
+// relocation processing of any other object.
-int
+int
ACE_DLL::open (ACE_DL_TYPE dll_filename,
int open_mode,
int close_on_destruction)
@@ -80,7 +80,7 @@ ACE_DLL::open (ACE_DL_TYPE dll_filename,
if (this->handle_ == ACE_SHLIB_INVALID_HANDLE)
ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%s\n"), this->error ()),
+ "%s\n", this->error ()),
-1);
return 0;
}
@@ -96,7 +96,7 @@ ACE_DLL::symbol (ACE_DL_TYPE sym_name)
// The library is closed using the ACE_SHLIB_HANDLE obejct. i.e. The
// shared object is now disassociated form the current process.
-int
+int
ACE_DLL::close (void)
{
int retval = 0;
@@ -121,7 +121,7 @@ char *
ACE_DLL::error (void)
{
return ACE_OS::dlerror ();
-}
+}
// Return the handle to the user either temporarily or forever, thus
// orphaning it. If 0 means the user wants the handle forever and if 1
@@ -139,22 +139,3 @@ ACE_DLL::get_handle (int become_owner)
// Return the handle requested by the user.
return this->handle_;
}
-
-// Set the handle for the DLL. By default, the object will be closed
-// before it is destroyed.
-
-int
-ACE_DLL::set_handle (ACE_SHLIB_HANDLE handle,
- int close_on_destruction)
-{
- // Close the handle in use before accepting the next one.
- if (this->close () == -1)
- ACE_ERROR_RETURN ((LM_ERROR,
- ASYS_TEXT ("%s\n"), this->error ()),
- -1);
-
- this->handle_ = handle;
- this->close_on_destruction_ = close_on_destruction;
-
- return 0;
-}