1
// stdafx.h : include file for standard system include files,
2
// or project specific include files that are used frequently, but
3
// are changed infrequently
6
/* Copyright 2009 10gen Inc.
8
* Licensed under the Apache License, Version 2.0 (the "License");
9
* you may not use this file except in compliance with the License.
10
* You may obtain a copy of the License at
12
* http://www.apache.org/licenses/LICENSE-2.0
14
* Unless required by applicable law or agreed to in writing, software
15
* distributed under the License is distributed on an "AS IS" BASIS,
16
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
17
* See the License for the specific language governing permissions and
18
* limitations under the License.
32
const bool debug=true;
34
const bool debug=false;
38
const int VERSION = 4;
39
const int VERSION_MINOR = 5;
42
extern const char versionString[];
47
EXIT_REPLICATION_ERROR = 3 ,
48
EXIT_NEED_UPGRADE = 4 ,
51
EXIT_NTSERVICE_ERROR = 20 ,
53
EXIT_OOM_MALLOC = 42 ,
54
EXIT_OOM_REALLOC = 43 ,
56
EXIT_POSSIBLE_CORRUPTION = 60 , // this means we detected a possible corruption situation, like a buf overflow
57
EXIT_UNCAUGHT = 100 , // top level exception that wasn't caught
62
void dbexit( ExitCode returnCode, const char *whyMsg = "");
65
this is here so you can't just type exit() to quit the program
66
you should either use dbexit to shutdown cleanly, or ::exit to tell the system to quiy
67
if you use this, you'll get a link error since mongo::exit isn't defined
69
void exit( ExitCode returnCode );
86
#include "targetver.h"
91
///using namespace std;
94
#include <boost/archive/iterators/base64_from_binary.hpp>
95
#include <boost/archive/iterators/binary_from_base64.hpp>
96
#include <boost/archive/iterators/transform_width.hpp>
97
#include <boost/filesystem/convenience.hpp>
98
#include <boost/filesystem/operations.hpp>
99
#include <boost/program_options.hpp>
100
#include <boost/shared_ptr.hpp>
101
#include <boost/smart_ptr.hpp>
102
#define BOOST_SPIRIT_THREADSAFE
104
#include <boost/version.hpp>
106
#if BOOST_VERSION >= 103800
107
#define BOOST_SPIRIT_USE_OLD_NAMESPACE
108
#include <boost/spirit/include/classic_core.hpp>
109
#include <boost/spirit/include/classic_loops.hpp>
110
#include <boost/spirit/include/classic_lists.hpp>
112
#include <boost/spirit/core.hpp>
113
#include <boost/spirit/utility/loops.hpp>
114
#include <boost/spirit/utility/lists.hpp>
117
#include <boost/tuple/tuple.hpp>
118
#include <boost/thread/thread.hpp>
119
#include <boost/thread/condition.hpp>
120
#include <boost/thread/recursive_mutex.hpp>
121
#include <boost/thread/xtime.hpp>
123
#define assert xassert
127
using namespace boost::filesystem;
130
#include "util/debug_util.h"
131
#include "util/goodies.h"
132
#include "util/log.h"
133
#include "util/allocator.h"
134
#include "util/assert_util.h"
138
void sayDbContext(const char *msg = 0);
139
void rawOut( const string &s );
145
const char * gitVersion();
146
const char * sysInfo();
147
string mongodVersion();
149
void printGitVersion();