summaryrefslogtreecommitdiff
path: root/ace/DLL.cpp
diff options
context:
space:
mode:
authorSteve Huston <shuston@riverace.com>2001-05-10 22:48:11 +0000
committerSteve Huston <shuston@riverace.com>2001-05-10 22:48:11 +0000
commit92b1ba96085dd4d9d03f6c3b9f0b09b8ce6183f5 (patch)
tree02a459c70e19ca4f48a3497b665af2b5e8083c81 /ace/DLL.cpp
parent93346cf3709295f11bbd1f9ad79a085819c5ff05 (diff)
downloadATCD-92b1ba96085dd4d9d03f6c3b9f0b09b8ce6183f5.tar.gz
ChangeLogTag:Thu May 10 18:37:41 2001 Steve Huston <shuston@riverace.com>
Diffstat (limited to 'ace/DLL.cpp')
-rw-r--r--ace/DLL.cpp30
1 files changed, 27 insertions, 3 deletions
diff --git a/ace/DLL.cpp b/ace/DLL.cpp
index 9a247b17b73..622cbe081ab 100644
--- a/ace/DLL.cpp
+++ b/ace/DLL.cpp
@@ -83,9 +83,33 @@ ACE_DLL::open (const ACE_TCHAR *dll_filename,
open_mode);
if (this->handle_ == ACE_SHLIB_INVALID_HANDLE)
- ACE_ERROR_RETURN ((LM_ERROR,
- ACE_LIB_TEXT ("%s\n"), this->error ()),
- -1);
+ {
+#if defined (AIX)
+ do
+ {
+ // AIX often puts the shared library file (most often named shr.o)
+ // inside an archive library. If this is an archive library
+ // name, then try appending [shr.o] and retry.
+ if (0 != ACE_OS_String::strstr (dll_pathname, ACE_LIB_TEXT (".a")))
+ {
+ ACE_OS_String::strcat (dll_pathname, ACE_LIB_TEXT ("(shr.o)"));
+ open_mode |= RTLD_MEMBER;
+ this->handle_ = ACE_OS::dlopen (dll_pathname, open_mode);
+ if (this->handle_ != ACE_SHLIB_INVALID_HANDLE)
+ break; // end up returning 0
+ }
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_LIB_TEXT ("%s\n"), this->error ()),
+ -1);
+ }
+ while (0);
+#else
+ ACE_ERROR_RETURN ((LM_ERROR,
+ ACE_LIB_TEXT ("%s\n"), this->error ()),
+ -1);
+#endif /* AIX */
+ }
+
return 0;
}