diff options
| author | Antonin Kral <a.kral@bobek.cz> | 2010-09-24 19:01:03 +0200 |
|---|---|---|
| committer | Antonin Kral <a.kral@bobek.cz> | 2010-09-24 19:01:03 +0200 |
| commit | 0ad0c09511a04ebe837f2acb859d47f2aa4e038a (patch) | |
| tree | 109babcb556f6c5884b77853120717f0617c7a1e /util/version.cpp | |
| parent | 03e58f81cad8dd4cfcd1530f327116f0cff6ceb3 (diff) | |
Imported Upstream version 1.6.3
Diffstat (limited to 'util/version.cpp')
| -rw-r--r-- | util/version.cpp | 29 |
1 files changed, 20 insertions, 9 deletions
diff --git a/util/version.cpp b/util/version.cpp index bba3dd1913c..4987e196bb6 100644 --- a/util/version.cpp +++ b/util/version.cpp @@ -14,7 +14,7 @@ namespace mongo { // mongo processes version support // - const char versionString[] = "1.6.2"; + const char versionString[] = "1.6.3"; string mongodVersion() { stringstream ss; @@ -61,26 +61,37 @@ namespace mongo { // 32 bit systems warning // - void show_32_warning(){ + void show_warnings(){ + // each message adds a leading but not a trailing newline + bool warned = false; { const char * foo = strchr( versionString , '.' ) + 1; int bar = atoi( foo ); if ( ( 2 * ( bar / 2 ) ) != bar ) { cout << "\n** NOTE: This is a development version (" << versionString << ") of MongoDB."; - cout << "\n** Not recommended for production. \n" << endl; + cout << "\n** Not recommended for production." << endl; warned = true; } } - if ( sizeof(int*) != 4 ) - return; + if ( sizeof(int*) == 4 ) { + cout << endl; + cout << "** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data" << endl; + cout << "** see http://blog.mongodb.org/post/137788967/32-bit-limitations" << endl; + warned = true; + } + +#ifdef __linux__ + if (boost::filesystem::exists("/proc/vz") && !boost::filesystem::exists("/proc/bc")){ + cout << endl; + cout << "** WARNING: You are running in OpenVZ. This is known to be broken!!!" << endl; + warned = true; + } +#endif - if( !warned ) // prettier this way + if (warned) cout << endl; - cout << "** NOTE: when using MongoDB 32 bit, you are limited to about 2 gigabytes of data" << endl; - cout << "** see http://blog.mongodb.org/post/137788967/32-bit-limitations" << endl; - cout << endl; } } |
