0
0
mirror of https://github.com/mongodb/mongo.git synced 2024-12-01 09:32:32 +01:00
This commit is contained in:
dwight 2010-11-20 14:46:28 -05:00
parent 5a49494a9c
commit 43a59f220a
2 changed files with 38 additions and 20 deletions

23
pch.h
View File

@ -1,7 +1,7 @@
// pch.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
/** @file pch.h : include file for standard system include files,
* or project specific include files that are used frequently, but
* are changed infrequently
*/
/* Copyright 2009 10gen Inc.
*
@ -93,14 +93,27 @@
namespace mongo {
/* this likely goes away later. to facilitate testing for a while without impacting other things. */
/** _DURABLE define - this likely goes away later. to facilitate testing for a while without impacting other things. */
#if defined(_DURABLE)
const bool durable = true;
/** Use _TESTINTENT to test write intent declarations by using a read only view for non-declared operations.
We don't do journalling when _TESTINTENT is enabled.
*/
#if defined(_TESTINTENT)
const bool testIntent = true;
#else
const bool testIntent = false;
#endif
#if !defined(_DEBUG)
#error not done - do not use this yet
#endif
#else
const bool durable = false;
#if defined(_TESTINTENT)
#error _TESTINTENT requires _DURABLE
#endif
const bool testIntent = false;
#endif
using namespace std;

View File

@ -1,19 +1,30 @@
#include "pch.h"
// @file version.cpp
/* Copyright 2009 10gen Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
#include "pch.h"
#include <cstdlib>
#include <iostream>
#include <iomanip>
#include <sstream>
#include <string>
#include "version.h"
namespace mongo {
//
// mongo processes version support
//
const char versionString[] = "1.7.4-pre-";
string mongodVersion() {
@ -22,10 +33,6 @@ namespace mongo {
return ss.str();
}
//
// git version support
//
#ifndef _SCONS
// only works in scons
const char * gitVersion(){ return "not-scons"; }
@ -33,10 +40,6 @@ namespace mongo {
void printGitVersion() { log() << "git version: " << gitVersion() << endl; }
//
// sys info support
//
#ifndef _SCONS
#if defined(_WIN32)
string sysInfo(){
@ -59,13 +62,15 @@ namespace mongo {
log() << "sys info: " << sysInfo() << endl;
#if defined(_DURABLE)
log() << "_DURABLE defined, but durable is not finished" << endl;
#endif
#if defined(_TESTINTENT)
log() << "_TESTINTENT defined - this mode is for qa purposes" << endl;
#endif
}
//
// 32 bit systems warning
//
void show_warnings(){
// each message adds a leading but not a trailing newline