Skip to content

Commit

Permalink
Merge branch 'master' of http://github.com/mongodb/mongo
Browse files Browse the repository at this point in the history
Conflicts:
	util/ntservice.cpp

Fixed dbgrid build.
  • Loading branch information
zippy1981 committed Jun 3, 2010
2 parents 423bf67 + 0e0ef60 commit 0e0472d
Show file tree
Hide file tree
Showing 8 changed files with 47 additions and 17 deletions.
24 changes: 19 additions & 5 deletions SConstruct
Expand Up @@ -590,9 +590,10 @@ elif "win32" == os.sys.platform:

boostLibs = []

env.Append( CPPPATH=[ "js/src/" ] )
env.Append(CPPPATH=[ "js/src/" ])
env.Append(CPPPATH=["../js/src/"])
env.Append(LIBPATH=["../js/src"])
env.Append(LIBPATH=["../js/"])
env.Append( CPPDEFINES=[ "OLDJS" ] )

winSDKHome = findVersion( [ "C:/Program Files/Microsoft SDKs/Windows/", "C:/Program Files (x86)/Microsoft SDKs/Windows/" ] ,
Expand Down Expand Up @@ -621,6 +622,7 @@ elif "win32" == os.sys.platform:
env.Append( CPPFLAGS= " /O2 /MT /Gy /Zi /TP /errorReport:none " )
# TODO: this has caused some linking problems :
# /GL whole program optimization
# /LTCG link time code generation
env.Append( CPPFLAGS= " /GL " )
env.Append( LINKFLAGS=" /LTCG " )
else:
Expand All @@ -631,7 +633,7 @@ elif "win32" == os.sys.platform:
# RTC1 /GZ (Enable Stack Frame Run-Time Error Checking)
env.Append( CPPFLAGS=" /Od /RTC1 /MDd /Zi /TP /errorReport:none " )
env.Append( CPPFLAGS=' /Fd"mongod.pdb" ' )
env.Append( LINKFLAGS=" /incremental:yes /debug " )
env.Append( LINKFLAGS=" /debug " )

if force64 and os.path.exists( boostDir + "/lib/vs2010_64" ):
env.Append( LIBPATH=[ boostDir + "/lib/vs2010_64" ] )
Expand All @@ -642,7 +644,7 @@ elif "win32" == os.sys.platform:

if force64:
env.Append( LIBPATH=[ winSDKHome + "/Lib/x64" ] )
env.Append( LINKFLAGS=" /NODEFAULTLIB:MSVCPRT /NODEFAULTLIB:MSVCRT " )
#env.Append( LINKFLAGS=" /NODEFAULTLIB:MSVCPRT /NODEFAULTLIB:MSVCRT " )
else:
env.Append( LIBPATH=[ winSDKHome + "/Lib" ] )

Expand All @@ -669,7 +671,10 @@ elif "win32" == os.sys.platform:
winLibString = "ws2_32.lib kernel32.lib advapi32.lib Psapi.lib"

if force64:
winLibString += " LIBCMT LIBCPMT "

winLibString += ""
#winLibString += " LIBCMT LIBCPMT "

else:
winLibString += " user32.lib gdi32.lib winspool.lib comdlg32.lib shell32.lib ole32.lib oleaut32.lib "
winLibString += " odbc32.lib odbccp32.lib uuid.lib "
Expand Down Expand Up @@ -930,7 +935,16 @@ def doConfigure( myenv , needPcre=True , shell=False ):

if usesm:

myCheckLib( [ "mozjs" , "js", "js_static" ] , True )
# see http://www.mongodb.org/pages/viewpageattachments.action?pageId=12157032
J = [ "mozjs" , "js", "js_static" ]
if windows and msarch == "amd64":
if release:
J = [ "js64r", "js", "mozjs" , "js_static" ]
else:
J = "js64d"
print( "will use js64d.lib for spidermonkey. (available at mongodb.org prebuilt.)" );

myCheckLib( J , True )
mozHeader = "js"
if bigLibString(myenv).find( "mozjs" ) >= 0:
mozHeader = "mozjs"
Expand Down
2 changes: 1 addition & 1 deletion buildscripts/cleanbb.py
Expand Up @@ -14,7 +14,7 @@ def shouldKill( c ):
if c.find( cwd ) >= 0:
return True

if c.find( "buildbot" ) >= 0 and c.find( "/mongo/" ) >= 0:
if ( c.find( "buildbot" ) >= 0 or c.find( "slave" ) ) and c.find( "/mongo/" ) >= 0:
return True

return False
Expand Down
4 changes: 4 additions & 0 deletions pch.h
Expand Up @@ -20,6 +20,10 @@

#pragma once

#if defined(MONGO_EXPOSE_MACROS)
#define JS_C_STRINGS_ARE_UTF8
#endif

#if defined(_WIN32)
# define NOMINMAX
# include <winsock2.h> //this must be included before the first windows.h include
Expand Down
4 changes: 2 additions & 2 deletions s/commands_admin.cpp
Expand Up @@ -802,7 +802,7 @@ namespace mongo {
conn.done();

// hit other machines just to block
for ( set<string>::iterator i=client->sinceLastGetError().begin(); i!=client->sinceLastGetError().end(); ++i ){
for ( set<string>::const_iterator i=client->sinceLastGetError().begin(); i!=client->sinceLastGetError().end(); ++i ){
string temp = *i;
if ( temp == theShard )
continue;
Expand All @@ -829,7 +829,7 @@ namespace mongo {
}

// hit other machines just to block
for ( set<string>::iterator i=client->sinceLastGetError().begin(); i!=client->sinceLastGetError().end(); ++i ){
for ( set<string>::const_iterator i=client->sinceLastGetError().begin(); i!=client->sinceLastGetError().end(); ++i ){
string temp = *i;
if ( shards->count( temp ) )
continue;
Expand Down
8 changes: 8 additions & 0 deletions s/dbgrid.vcproj
Expand Up @@ -1004,6 +1004,14 @@
RelativePath="..\client\syncclusterconnection.cpp"
>
</File>
<File
RelativePath="..\util\text.cpp"
>
</File>
<File
RelativePath="..\util\text.h"
>
</File>
<File
RelativePath="..\util\concurrency\thread_pool.cpp"
>
Expand Down
2 changes: 1 addition & 1 deletion scripting/engine_spidermonkey.h
Expand Up @@ -37,7 +37,7 @@
#include "jstypes.h"
#undef JS_PUBLIC_API
#undef JS_PUBLIC_DATA
#define JS_PUBLIC_API(t) t
#define JS_PUBLIC_API(t) t __cdecl
#define JS_PUBLIC_DATA(t) t
#endif

Expand Down
10 changes: 4 additions & 6 deletions tools/import.cpp
Expand Up @@ -224,10 +224,12 @@ class Import : public Tool {
ProgressMeter pm( fileSize );
const int BUF_SIZE = 1024 * 1024 * 4;
boost::scoped_array<char> line(new char[BUF_SIZE+2]);
while ( *in ){
while ( in->rdstate() == 0 ){
char * buf = line.get();
in->getline( buf , BUF_SIZE );
uassert( 10263 , "unknown error reading file" , ( in->rdstate() & ios_base::badbit ) == 0 );
uassert( 10263 , "unknown error reading file" ,
(!(in->rdstate() & ios_base::badbit)) &&
(!(in->rdstate() & ios_base::failbit) || (in->rdstate() & ios_base::eofbit)) );
log(1) << "got line:" << buf << endl;

while( isspace( buf[0] ) ) buf++;
Expand All @@ -238,10 +240,6 @@ class Import : public Tool {

buf[len+1] = 0;

if ( in->rdstate() == ios_base::eofbit )
break;
assert( in->rdstate() == 0 );

try {
BSONObj o = parseLine( buf );
if ( _headerLine ){
Expand Down
10 changes: 8 additions & 2 deletions tools/stat.cpp
Expand Up @@ -136,7 +136,6 @@ namespace mongo {
ss << setw(width) << val << " ";
}


string doRow( const BSONObj& a , const BSONObj& b ){
stringstream ss;

Expand All @@ -150,7 +149,14 @@ namespace mongo {
}
}

if ( b.getFieldDotted("mem.supported").trueValue() ){
if ( b["backgroundFlushing"].type() == Object ){
BSONObj ax = a["backgroundFlushing"].embeddedObject();
BSONObj bx = b["backgroundFlushing"].embeddedObject();
BSONObjIterator i( bx );
cell( ss , "flushes/s" , 6 , (int)diff( "flushes" , ax , bx ) );
}

if ( b.getFieldDotted("mem.supported").trueValue() ){
BSONObj bx = b["mem"].embeddedObject();
BSONObjIterator i( bx );
cell( ss , "mapped" , 6 , bx["mapped"].numberInt() );
Expand Down

0 comments on commit 0e0472d

Please sign in to comment.