From 7eed0b9400b819a645c5acdd65e342c2195554ed Mon Sep 17 00:00:00 2001 From: Dwight Date: Wed, 15 Apr 2009 10:29:17 -0400 Subject: [PATCH 1/3] compile windows --- db/db.cpp | 2 +- db/db.vcproj | 6 +++++- s/dbgrid.vcproj | 2 +- s/request.cpp | 2 +- s/strategy.h | 2 +- 5 files changed, 9 insertions(+), 5 deletions(-) diff --git a/db/db.cpp b/db/db.cpp index 1260b496a32..0d612129293 100644 --- a/db/db.cpp +++ b/db/db.cpp @@ -335,7 +335,7 @@ namespace mongo { Timer startupSrandTimer; void acquirePathLock() { -#if !defined(_WIN32) and !defined(__sunos__) +#if !defined(_WIN32) && !defined(__sunos__) string name = ( boost::filesystem::path( dbpath ) / "mongod.lock" ).native_file_string(); lockFile = open( name.c_str(), O_RDONLY | O_CREAT, S_IRWXU | S_IRWXG | S_IRWXO ); massert( "Unable to create / open lock file for dbpath: " + name, lockFile > 0 ); diff --git a/db/db.vcproj b/db/db.vcproj index 9594f73e683..470b5a42ca5 100644 --- a/db/db.vcproj +++ b/db/db.vcproj @@ -52,7 +52,7 @@ WarningLevel="3" Detect64BitPortabilityProblems="false" DebugInformationFormat="4" - DisableSpecificWarnings="4355" + DisableSpecificWarnings="4355;4800" /> + + diff --git a/s/dbgrid.vcproj b/s/dbgrid.vcproj index fd5dcc7d560..2135cd26063 100644 --- a/s/dbgrid.vcproj +++ b/s/dbgrid.vcproj @@ -50,7 +50,7 @@ PrecompiledHeaderThrough="stdafx.h" WarningLevel="3" DebugInformationFormat="4" - DisableSpecificWarnings="4355" + DisableSpecificWarnings="4355;4800" /> Date: Wed, 15 Apr 2009 10:39:57 -0400 Subject: [PATCH 2/3] minor compile tweeaks for windows release_nojni option --- db/db.vcproj | 2 +- db/instance.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/db/db.vcproj b/db/db.vcproj index 470b5a42ca5..ed820dbaf1a 100644 --- a/db/db.vcproj +++ b/db/db.vcproj @@ -210,7 +210,7 @@ PrecompiledHeaderThrough="stdafx.h" WarningLevel="3" DebugInformationFormat="3" - DisableSpecificWarnings="4355" + DisableSpecificWarnings="4355;4800" /> Date: Wed, 15 Apr 2009 13:49:06 -0400 Subject: [PATCH 3/3] uassert on invalid size spec to create collection --- db/pdfile.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/db/pdfile.cpp b/db/pdfile.cpp index d3240d00c75..e5e84f25c74 100644 --- a/db/pdfile.cpp +++ b/db/pdfile.cpp @@ -119,6 +119,8 @@ namespace mongo { size += 256; size &= 0xffffffffffffff00LL; } + + uassert( "invalid size spec", size > 0 ); bool newCapped = false; int mx = 0;