summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnny Willemsen <jwillemsen@remedy.nl>2005-08-15 08:59:39 +0000
committerJohnny Willemsen <jwillemsen@remedy.nl>2005-08-15 08:59:39 +0000
commit1ed201a24c89e780d0dee4c0dccecbcf0fc2cb4a (patch)
tree6f16037fe425d7d6b1ac7e9c2ccefe722e6a9ba1
parentac964bd022a4d21d1592589543c77edd443ce7b2 (diff)
downloadATCD-1ed201a24c89e780d0dee4c0dccecbcf0fc2cb4a.tar.gz
ChangeLogTag: Mon Aug 15 08:59:12 UTC 2005 Johnny Willemsen <jwillemsen@remedy.nl>
-rw-r--r--ace/DLL_Manager.cpp28
1 files changed, 17 insertions, 11 deletions
diff --git a/ace/DLL_Manager.cpp b/ace/DLL_Manager.cpp
index 72702a845e9..9229482c317 100644
--- a/ace/DLL_Manager.cpp
+++ b/ace/DLL_Manager.cpp
@@ -342,11 +342,18 @@ ACE_DLL_Handle::get_dll_names (const ACE_TCHAR *dll_name,
// 3. Build the combinations to try for this platform.
// Try these combinations:
- // - name as originally given
// - name with decorator and platform's suffix appended (if not supplied)
// - name with platform's suffix appended (if not supplied)
// - name with platform's dll prefix (if it has one) and suffix
// - name with platform's dll prefix, decorator, and suffix.
+ // - name as originally given
+ // We first try to find the file using the decorator so that when a
+ // filename with and without decorator is used, we get the file with
+ // the same decorator as the ACE dll has and then as last resort
+ // the one without. For example with msvc, the debug build has a "d"
+ // decorator, but the release build has none and we really want to get
+ // the debug version of the library in a debug application instead
+ // of the release one.
// So we need room for 5 entries in try_names.
try_names.size (0);
if ((try_names.max_size () - try_names.size ()) < 5)
@@ -363,23 +370,19 @@ ACE_DLL_Handle::get_dll_names (const ACE_TCHAR *dll_name,
size_t j = try_names.size ();
switch (i)
{
- case 0:
- try_this = dll_name;
- break;
-
- case 1: // Name + decorator + suffix
- case 2: // Name + suffix
- case 3: // Prefix + name + decorator + suffix
- case 4: // Prefix + name + suffix
+ case 0: // Name + decorator + suffix
+ case 1: // Name + suffix
+ case 2: // Prefix + name + decorator + suffix
+ case 3: // Prefix + name + suffix
if (
base_suffix.length () > 0
#if !(defined(ACE_WIN32) && defined (ACE_LD_DECORATOR_STR) && !defined (ACE_DISABLE_DEBUG_DLL_CHECK))
- || (i == 2 || i == 4) // No decorator desired; skip
+ || (i == 1 || i == 3) // No decorator desired; skip
#endif
)
break;
try_this = base_dir;
- if (i > 2)
+ if (i > 1)
try_this += prefix;
try_this += base_file;
if (base_suffix.length () > 0)
@@ -392,6 +395,9 @@ ACE_DLL_Handle::get_dll_names (const ACE_TCHAR *dll_name,
try_this += suffix;
}
break;
+ case 4:
+ try_this = dll_name;
+ break;
}
if (try_this.length ())