From 0f76db6b442a9c7985adbe5b8a3f06469ccbe9b3 Mon Sep 17 00:00:00 2001 From: Bernard Normier Date: Wed, 31 Jan 2007 18:49:34 +0000 Subject: Beta versioning --- cpp/src/Ice/Initialize.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'cpp/src/Ice/Initialize.cpp') 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 } -- cgit v1.2.3