summaryrefslogtreecommitdiff
path: root/cpp/src/Ice/DynamicLibrary.cpp
diff options
context:
space:
mode:
authorMark Spruiell <mes@zeroc.com>2003-02-06 18:01:52 +0000
committerMark Spruiell <mes@zeroc.com>2003-02-06 18:01:52 +0000
commitedf693cab7be62486c5412fe10fc2669224eba80 (patch)
tree8585d08a19c00f1115e22c81f3d84d2c34e51a39 /cpp/src/Ice/DynamicLibrary.cpp
parentfix (diff)
downloadice-edf693cab7be62486c5412fe10fc2669224eba80.tar.bz2
ice-edf693cab7be62486c5412fe10fc2669224eba80.tar.xz
ice-edf693cab7be62486c5412fe10fc2669224eba80.zip
make use of Ice version optional in shared library name
Diffstat (limited to 'cpp/src/Ice/DynamicLibrary.cpp')
-rw-r--r--cpp/src/Ice/DynamicLibrary.cpp26
1 files changed, 18 insertions, 8 deletions
diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp
index 11a030470d1..05481688e2f 100644
--- a/cpp/src/Ice/DynamicLibrary.cpp
+++ b/cpp/src/Ice/DynamicLibrary.cpp
@@ -47,7 +47,7 @@ IceInternal::DynamicLibrary::~DynamicLibrary()
}
IceInternal::DynamicLibrary::symbol_type
-IceInternal::DynamicLibrary::loadEntryPoint(const string& entryPoint)
+IceInternal::DynamicLibrary::loadEntryPoint(const string& entryPoint, bool useIceVersion)
{
string::size_type colon = entryPoint.rfind(':');
string::size_type comma = entryPoint.find(',');
@@ -63,7 +63,10 @@ IceInternal::DynamicLibrary::loadEntryPoint(const string& entryPoint)
if(comma == string::npos)
{
libName = libSpec;
- version = ICE_STRING_VERSION;
+ if(useIceVersion)
+ {
+ version = ICE_STRING_VERSION;
+ }
}
else
{
@@ -75,19 +78,26 @@ IceInternal::DynamicLibrary::loadEntryPoint(const string& entryPoint)
#ifdef _WIN32
lib = libName;
- for(string::size_type n = 0; n < version.size(); n++)
+ if(!version.empty())
{
- if(version[n] != '.') // Remove periods
+ for(string::size_type n = 0; n < version.size(); n++)
{
- lib += version[n];
+ if(version[n] != '.') // Remove periods
+ {
+ lib += version[n];
+ }
}
- }
# ifdef _DEBUG
- lib += 'd';
+ lib += 'd';
# endif
+ }
lib += ".dll";
#else
- lib = "lib" + libName + ".so." + version;
+ lib = "lib" + libName + ".so";
+ if(!version.empty())
+ {
+ lib += "." + version;
+ }
#endif
if(!load(lib))