diff options
author | Eliot Horowitz <eliot@10gen.com> | 2009-05-28 13:19:31 -0400 |
---|---|---|
committer | Eliot Horowitz <eliot@10gen.com> | 2009-05-28 13:19:31 -0400 |
commit | c3a6bf36932a30fbc1105cdcd79642cf49d90ca3 (patch) | |
tree | f5be1a40e47658ded70bb117356502561dda8eb9 | |
parent | 7c0ef7b21df0e8c90d12080b95be8d6d804656b3 (diff) | |
parent | 3eb90c304180e95694b5ff12935de97c40be4a9d (diff) | |
download | mongo-c3a6bf36932a30fbc1105cdcd79642cf49d90ca3.tar.gz |
Merge branch 'master' of git@github.com:mongodb/mongo
-rw-r--r-- | db/db.vcproj | 18 | ||||
-rw-r--r-- | scripting/engine.cpp | 9 | ||||
-rw-r--r-- | util/mmap.cpp | 2 |
3 files changed, 15 insertions, 14 deletions
diff --git a/db/db.vcproj b/db/db.vcproj index 9675a9a3d6f..f413bfd6dec 100644 --- a/db/db.vcproj +++ b/db/db.vcproj @@ -2,7 +2,7 @@ <VisualStudioProject
ProjectType="Visual C++"
Version="9.00"
- Name="db"
+ Name="mongod"
ProjectGUID="{215B2D68-0A70-4D10-8E75-B31010C62A91}"
RootNamespace="db"
Keyword="Win32Proj"
@@ -350,30 +350,30 @@ >
</File>
<File
- RelativePath="..\..\js\js\Debug\js.lib"
+ RelativePath="..\..\js\js\Release\js.lib"
>
<FileConfiguration
- Name="Release|Win32"
+ Name="Debug|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
- </File>
- <File
- RelativePath="..\..\js\js\Release\js.lib"
- >
<FileConfiguration
- Name="Debug|Win32"
+ Name="Debug Recstore|Win32"
ExcludedFromBuild="true"
>
<Tool
Name="VCCustomBuildTool"
/>
</FileConfiguration>
+ </File>
+ <File
+ RelativePath="..\..\js\js\Debug\js.lib"
+ >
<FileConfiguration
- Name="Debug Recstore|Win32"
+ Name="Release|Win32"
ExcludedFromBuild="true"
>
<Tool
diff --git a/scripting/engine.cpp b/scripting/engine.cpp index b355e65954a..33c0f400470 100644 --- a/scripting/engine.cpp +++ b/scripting/engine.cpp @@ -37,10 +37,11 @@ namespace mongo { File f; f.open( filename.c_str() ); - char * data = (char*)malloc( f.len() + 1 ); - data[f.len()] = 0; - - f.read( 0 , data , f.len() ); + fileofs L = f.len(); + assert( L <= 0x7ffffffe ); + char * data = (char*)malloc( (size_t) L+1 ); + data[L] = 0; + f.read( 0 , data , (size_t) L ); return exec( data , filename , printResult , reportError , assertOnError, timeoutMs ); } diff --git a/util/mmap.cpp b/util/mmap.cpp index 6b2ee813c33..feedd9645db 100644 --- a/util/mmap.cpp +++ b/util/mmap.cpp @@ -58,7 +58,7 @@ namespace mongo { void* MemoryMappedFile::map(const char *filename) { boost::uintmax_t l = boost::filesystem::file_size( filename ); assert( l <= 0x7fffffff ); - int i = l; + int i = (int) l; return map( filename , i ); } |