summaryrefslogtreecommitdiff
path: root/cpp/src
diff options
context:
space:
mode:
Diffstat (limited to 'cpp/src')
-rw-r--r--cpp/src/Ice/DynamicLibrary.cpp12
-rw-r--r--cpp/src/Ice/Initialize.cpp22
-rw-r--r--cpp/src/Slice/CPlusPlusUtil.cpp32
-rwxr-xr-xcpp/src/ca/iceca2
4 files changed, 60 insertions, 8 deletions
diff --git a/cpp/src/Ice/DynamicLibrary.cpp b/cpp/src/Ice/DynamicLibrary.cpp
index 9ac4422a950..d1b25c1a46c 100644
--- a/cpp/src/Ice/DynamicLibrary.cpp
+++ b/cpp/src/Ice/DynamicLibrary.cpp
@@ -70,7 +70,17 @@ IceInternal::DynamicLibrary::loadEntryPoint(const string& entryPoint, bool useIc
int minorVersion = (ICE_INT_VERSION / 100) - majorVersion * 100;
ostringstream os;
os << majorVersion * 10 + minorVersion;
- version = os.str();
+
+ int patchVersion = ICE_INT_VERSION % 100;
+ if(patchVersion > 50)
+ {
+ os << 'b';
+ if(patchVersion >= 52)
+ {
+ os << (patchVersion - 50);
+ }
+ }
+ version = os.str();
}
}
else
diff --git a/cpp/src/Ice/Initialize.cpp b/cpp/src/Ice/Initialize.cpp
index ec31d9b7226..cb7252ddf94 100644
--- a/cpp/src/Ice/Initialize.cpp
+++ b/cpp/src/Ice/Initialize.cpp
@@ -108,6 +108,17 @@ Ice::createProperties(int& argc, char* argv[], const PropertiesPtr& defaults, co
inline void checkIceVersion(Int version)
{
#ifndef ICE_IGNORE_VERSION
+
+# if ICE_INT_VERSION % 100 > 50
+ //
+ // Beta version: exact match required
+ //
+ if(ICE_INT_VERSION != version)
+ {
+ throw VersionMismatchException(__FILE__, __LINE__);
+ }
+# else
+
//
// Major and minor version numbers must match.
//
@@ -115,6 +126,15 @@ inline void checkIceVersion(Int version)
{
throw VersionMismatchException(__FILE__, __LINE__);
}
+
+ //
+ // Reject beta caller
+ //
+ if(version % 100 > 50)
+ {
+ throw VersionMismatchException(__FILE__, __LINE__);
+ }
+
//
// The caller's patch level cannot be greater than library's patch level. (Patch level changes are
// backward-compatible, but not forward-compatible.)
@@ -123,6 +143,8 @@ inline void checkIceVersion(Int version)
{
throw VersionMismatchException(__FILE__, __LINE__);
}
+
+# endif
#endif
}
diff --git a/cpp/src/Slice/CPlusPlusUtil.cpp b/cpp/src/Slice/CPlusPlusUtil.cpp
index bef622075e1..b4f9d48f8d0 100644
--- a/cpp/src/Slice/CPlusPlusUtil.cpp
+++ b/cpp/src/Slice/CPlusPlusUtil.cpp
@@ -99,12 +99,32 @@ Slice::printVersionCheck(Output& out)
{
out << "\n";
out << "\n#ifndef ICE_IGNORE_VERSION";
- out << "\n# if ICE_INT_VERSION / 100 != " << ICE_INT_VERSION / 100;
- out << "\n# error Ice version mismatch!";
- out << "\n# endif";
- out << "\n# if ICE_INT_VERSION % 100 < " << ICE_INT_VERSION % 100;
- out << "\n# error Ice patch level mismatch!";
- out << "\n# endif";
+ if(ICE_INT_VERSION % 100 > 50)
+ {
+ //
+ // Beta version: exact match required
+ //
+ out << "\n# if ICE_INT_VERSION != " << ICE_INT_VERSION;
+ out << "\n# error Ice version mismatch: an exact match is required for beta generated code";
+ out << "\n# endif";
+ }
+ else
+ {
+ out << "\n# if ICE_INT_VERSION / 100 != " << ICE_INT_VERSION / 100;
+ out << "\n# error Ice version mismatch!";
+ out << "\n# endif";
+
+ //
+ // Generated code is release; reject beta header
+ //
+ out << "\n# if ICE_INT_VERSION % 100 > 50";
+ out << "\n# error Beta header file detected";
+ out << "\n# endif";
+
+ out << "\n# if ICE_INT_VERSION % 100 < " << ICE_INT_VERSION % 100;
+ out << "\n# error Ice patch level mismatch!";
+ out << "\n# endif";
+ }
out << "\n#endif";
}
diff --git a/cpp/src/ca/iceca b/cpp/src/ca/iceca
index 1d11213724d..56245e1753b 100755
--- a/cpp/src/ca/iceca
+++ b/cpp/src/ca/iceca
@@ -71,7 +71,7 @@ if sys.argv[script] == "import":
# handles standard tarball installs.
#
for bindir in [os.path.dirname(sys.argv[0]), os.path.join(os.getenv("ICE_HOME"), "bin"), ".", "/usr/bin", \
- "/opt/Ice-3.2.0/bin"]:
+ "/opt/Ice-3.2b/bin"]:
bindir = os.path.normpath(bindir)
if os.path.exists(os.path.join(bindir, "ImportKey.class")):
break