From eb537e9f3d526513a5ecc187aaa618994f9f11c4 Mon Sep 17 00:00:00 2001 From: eliot Date: Tue, 12 May 2009 15:49:40 -0400 Subject: [PATCH] windows compile MINOR --- db/db.cpp | 2 +- scripting/engine_spidermonkey.cpp | 6 ++++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/db/db.cpp b/db/db.cpp index fed81c31e69..67c4ca1a76b 100644 --- a/db/db.cpp +++ b/db/db.cpp @@ -574,7 +574,7 @@ int main(int argc, char* argv[], char *envp[] ) assert(opIdMem > 0); } else if ( s == "--deDupMem" ) { - long x = strtoll( argv[ ++i ], 0, 10 ); + long x = strtol( argv[ ++i ], 0, 10 ); uassert("bad arg", x > 0); IdSet::maxSize_ = x; assert(IdSet::maxSize_ > 0); diff --git a/scripting/engine_spidermonkey.cpp b/scripting/engine_spidermonkey.cpp index 08e74469fea..a1eca14ef48 100644 --- a/scripting/engine_spidermonkey.cpp +++ b/scripting/engine_spidermonkey.cpp @@ -1,5 +1,6 @@ // engine_spidermonkey.cpp +#include "stdafx.h" #include "engine_spidermonkey.h" #include "../client/dbclient.h" @@ -682,8 +683,9 @@ namespace mongo { jsval rval; int nargs = args.nFields(); - jsval smargs[nargs]; - + auto_ptr smargsPtr( new jsval[nargs] ); + jsval* smargs = smargsPtr.get(); + BSONObjIterator it( args ); for ( int i=0; itoval( it.next() );