summaryrefslogtreecommitdiff
path: root/src/mongo
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2015-04-02 13:17:17 -0400
committerAndrew Morrow <acm@mongodb.com>2015-04-03 11:40:52 -0400
commitb74866fd077c878a37045c50de75467cf93310da (patch)
treeaa12f88fb0367967e93d2d5781ec5aa97e34d7d2 /src/mongo
parent7060c72b30a836b3052f7890ea8c4b592014adf4 (diff)
downloadmongo-b74866fd077c878a37045c50de75467cf93310da.tar.gz
SERVER-17863 Sort in config.h header when possible
Diffstat (limited to 'src/mongo')
-rw-r--r--src/mongo/base/data_view.h3
-rw-r--r--src/mongo/client/dbclient.cpp3
-rw-r--r--src/mongo/client/dbclientinterface.h3
-rw-r--r--src/mongo/crypto/crypto_openssl.cpp4
-rw-r--r--src/mongo/crypto/crypto_tom.cpp4
-rw-r--r--src/mongo/db/commands/authentication_commands.cpp3
-rw-r--r--src/mongo/db/commands/parameters.cpp3
-rw-r--r--src/mongo/db/commands/server_status.cpp3
-rw-r--r--src/mongo/db/commands/user_management_commands.cpp3
-rw-r--r--src/mongo/db/concurrency/lock_manager.cpp3
-rw-r--r--src/mongo/db/concurrency/lock_manager.h3
-rw-r--r--src/mongo/db/concurrency/lock_manager_defs.h3
-rw-r--r--src/mongo/db/concurrency/lock_state_test.cpp3
-rw-r--r--src/mongo/db/db.cpp3
-rw-r--r--src/mongo/db/initialize_server_global_state.cpp3
-rw-r--r--src/mongo/db/mongod_options.cpp3
-rw-r--r--src/mongo/db/server_options_helpers.cpp3
-rw-r--r--src/mongo/db/sorter/sorter.cpp3
-rw-r--r--src/mongo/db/sorter/sorter_test.cpp3
-rw-r--r--src/mongo/db/storage/key_string_test.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/dur_journal.cpp3
-rw-r--r--src/mongo/db/storage/mmap_v1/record_access_tracker.cpp3
-rw-r--r--src/mongo/dbtests/perftests.cpp3
-rw-r--r--src/mongo/dbtests/threadedtests.cpp3
-rw-r--r--src/mongo/platform/endian.h4
-rw-r--r--src/mongo/platform/endian_test.cpp3
-rw-r--r--src/mongo/s/chunk.cpp3
-rw-r--r--src/mongo/s/mongos_options.cpp3
-rw-r--r--src/mongo/s/server.cpp3
-rw-r--r--src/mongo/shell/shell_options.cpp3
-rw-r--r--src/mongo/util/assert_util.cpp3
-rw-r--r--src/mongo/util/background.cpp3
-rw-r--r--src/mongo/util/concurrency/rwlockimpl.cpp3
-rw-r--r--src/mongo/util/concurrency/simplerwlock.h3
-rw-r--r--src/mongo/util/concurrency/threadlocal.h4
-rw-r--r--src/mongo/util/debug_util.h1
-rw-r--r--src/mongo/util/exception_filter_win32.cpp6
-rw-r--r--src/mongo/util/net/httpclient.cpp3
-rw-r--r--src/mongo/util/net/listen.cpp3
-rw-r--r--src/mongo/util/net/listen.h3
-rw-r--r--src/mongo/util/net/message_port.cpp3
-rw-r--r--src/mongo/util/net/message_port.h3
-rw-r--r--src/mongo/util/net/message_server_port.cpp3
-rw-r--r--src/mongo/util/net/miniwebserver.cpp3
-rw-r--r--src/mongo/util/net/sock.cpp3
-rw-r--r--src/mongo/util/net/sock.h3
-rw-r--r--src/mongo/util/net/ssl_manager.cpp3
-rw-r--r--src/mongo/util/net/ssl_manager.h4
-rw-r--r--src/mongo/util/quick_exit.cpp4
-rw-r--r--src/mongo/util/timer.cpp4
-rw-r--r--src/mongo/util/version_reporting.cpp3
51 files changed, 60 insertions, 101 deletions
diff --git a/src/mongo/base/data_view.h b/src/mongo/base/data_view.h
index 5801ca26635..bb19b561fae 100644
--- a/src/mongo/base/data_view.h
+++ b/src/mongo/base/data_view.h
@@ -27,11 +27,10 @@
#pragma once
-#include "mongo/config.h"
-
#include <cstring>
#include <type_traits>
+#include "mongo/config.h"
#include "mongo/platform/endian.h"
namespace mongo {
diff --git a/src/mongo/client/dbclient.cpp b/src/mongo/client/dbclient.cpp
index bca7e7f348b..be4f1653811 100644
--- a/src/mongo/client/dbclient.cpp
+++ b/src/mongo/client/dbclient.cpp
@@ -29,8 +29,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kNetwork
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/bson/util/bson_extract.h"
@@ -40,6 +38,7 @@
#include "mongo/client/dbclientcursor.h"
#include "mongo/client/sasl_client_authenticate.h"
#include "mongo/client/syncclusterconnection.h"
+#include "mongo/config.h"
#include "mongo/db/auth/internal_user_auth.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/json.h"
diff --git a/src/mongo/client/dbclientinterface.h b/src/mongo/client/dbclientinterface.h
index a5873454d79..87c7f69f37d 100644
--- a/src/mongo/client/dbclientinterface.h
+++ b/src/mongo/client/dbclientinterface.h
@@ -32,13 +32,12 @@
#pragma once
-#include "mongo/config.h"
-
#include <boost/noncopyable.hpp>
#include <boost/scoped_ptr.hpp>
#include "mongo/base/string_data.h"
#include "mongo/bson/bson_field.h"
+#include "mongo/config.h"
#include "mongo/db/jsobj.h"
#include "mongo/logger/log_severity.h"
#include "mongo/platform/atomic_word.h"
diff --git a/src/mongo/crypto/crypto_openssl.cpp b/src/mongo/crypto/crypto_openssl.cpp
index 3d22ad406a6..dd4da542572 100644
--- a/src/mongo/crypto/crypto_openssl.cpp
+++ b/src/mongo/crypto/crypto_openssl.cpp
@@ -26,10 +26,10 @@
* it in the license file.
*/
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
+#include "mongo/config.h"
+
#ifndef MONGO_CONFIG_SSL
#error This file should only be included in SSL-enabled builds
#endif
diff --git a/src/mongo/crypto/crypto_tom.cpp b/src/mongo/crypto/crypto_tom.cpp
index ff739d57365..54472b37087 100644
--- a/src/mongo/crypto/crypto_tom.cpp
+++ b/src/mongo/crypto/crypto_tom.cpp
@@ -26,10 +26,10 @@
* it in the license file.
*/
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
+#include "mongo/config.h"
+
#ifdef MONGO_CONFIG_SSL
#error This file should not be included if compiling with SSL support
#endif
diff --git a/src/mongo/db/commands/authentication_commands.cpp b/src/mongo/db/commands/authentication_commands.cpp
index b260fd483cd..14211985e65 100644
--- a/src/mongo/db/commands/authentication_commands.cpp
+++ b/src/mongo/db/commands/authentication_commands.cpp
@@ -28,8 +28,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kAccessControl
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/db/commands/authentication_commands.h"
@@ -43,6 +41,7 @@
#include "mongo/bson/mutable/algorithm.h"
#include "mongo/bson/mutable/document.h"
#include "mongo/client/sasl_client_authenticate.h"
+#include "mongo/config.h"
#include "mongo/db/audit.h"
#include "mongo/db/auth/action_set.h"
#include "mongo/db/auth/action_type.h"
diff --git a/src/mongo/db/commands/parameters.cpp b/src/mongo/db/commands/parameters.cpp
index 168a981d1fc..5ee17f6c962 100644
--- a/src/mongo/db/commands/parameters.cpp
+++ b/src/mongo/db/commands/parameters.cpp
@@ -28,8 +28,6 @@
* it in the license file.
*/
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include <set>
@@ -37,6 +35,7 @@
#include "mongo/bson/mutable/document.h"
#include "mongo/client/replica_set_monitor.h"
#include "mongo/client/sasl_client_authenticate.h"
+#include "mongo/config.h"
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/internal_user_auth.h"
#include "mongo/db/commands.h"
diff --git a/src/mongo/db/commands/server_status.cpp b/src/mongo/db/commands/server_status.cpp
index 37084cc2e28..175105a3490 100644
--- a/src/mongo/db/commands/server_status.cpp
+++ b/src/mongo/db/commands/server_status.cpp
@@ -30,8 +30,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kCommand
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/db/auth/action_set.h"
@@ -40,6 +38,7 @@
#include "mongo/db/auth/authorization_session.h"
#include "mongo/db/auth/privilege.h"
#include "mongo/db/client_basic.h"
+#include "mongo/config.h"
#include "mongo/db/commands.h"
#include "mongo/db/commands/server_status.h"
#include "mongo/db/commands/server_status_internal.h"
diff --git a/src/mongo/db/commands/user_management_commands.cpp b/src/mongo/db/commands/user_management_commands.cpp
index 47b6cc43cf5..cecd41fb447 100644
--- a/src/mongo/db/commands/user_management_commands.cpp
+++ b/src/mongo/db/commands/user_management_commands.cpp
@@ -28,8 +28,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kAccessControl
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include <string>
@@ -41,6 +39,7 @@
#include "mongo/bson/mutable/element.h"
#include "mongo/bson/util/bson_extract.h"
#include "mongo/client/dbclientinterface.h"
+#include "mongo/config.h"
#include "mongo/crypto/mechanism_scram.h"
#include "mongo/db/audit.h"
#include "mongo/db/auth/action_set.h"
diff --git a/src/mongo/db/concurrency/lock_manager.cpp b/src/mongo/db/concurrency/lock_manager.cpp
index 506d057b9fd..0a7ff17cba5 100644
--- a/src/mongo/db/concurrency/lock_manager.cpp
+++ b/src/mongo/db/concurrency/lock_manager.cpp
@@ -28,14 +28,13 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include <vector>
#include "mongo/db/concurrency/lock_manager.h"
+#include "mongo/config.h"
#include "mongo/db/concurrency/locker.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/db/concurrency/lock_manager.h b/src/mongo/db/concurrency/lock_manager.h
index fbc45652ec1..991fe8fbd77 100644
--- a/src/mongo/db/concurrency/lock_manager.h
+++ b/src/mongo/db/concurrency/lock_manager.h
@@ -28,8 +28,6 @@
#pragma once
-#include "mongo/config.h"
-
#include <boost/thread/condition_variable.hpp>
#include <boost/thread/mutex.hpp>
@@ -37,6 +35,7 @@
#include "mongo/db/concurrency/lock_manager_defs.h"
#include "mongo/db/concurrency/lock_request_list.h"
+#include "mongo/config.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/platform/compiler.h"
#include "mongo/platform/cstdint.h"
diff --git a/src/mongo/db/concurrency/lock_manager_defs.h b/src/mongo/db/concurrency/lock_manager_defs.h
index 6ad64e3ab07..9c646fafd47 100644
--- a/src/mongo/db/concurrency/lock_manager_defs.h
+++ b/src/mongo/db/concurrency/lock_manager_defs.h
@@ -28,13 +28,12 @@
#pragma once
-#include "mongo/config.h"
-
#include <boost/static_assert.hpp>
#include <string>
#include <limits>
#include "mongo/base/string_data.h"
+#include "mongo/config.h"
#include "mongo/platform/cstdint.h"
#include "mongo/platform/hash_namespace.h"
diff --git a/src/mongo/db/concurrency/lock_state_test.cpp b/src/mongo/db/concurrency/lock_state_test.cpp
index cfdbbbd4590..fd0042fc12c 100644
--- a/src/mongo/db/concurrency/lock_state_test.cpp
+++ b/src/mongo/db/concurrency/lock_state_test.cpp
@@ -28,13 +28,12 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include <boost/shared_ptr.hpp>
#include <vector>
+#include "mongo/config.h"
#include "mongo/db/concurrency/lock_manager_test_help.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/db/db.cpp b/src/mongo/db/db.cpp
index 37d5839db93..8f4480d5ef0 100644
--- a/src/mongo/db/db.cpp
+++ b/src/mongo/db/db.cpp
@@ -30,8 +30,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kStorage
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include <boost/thread/thread.hpp>
@@ -46,6 +44,7 @@
#include "mongo/base/init.h"
#include "mongo/base/initializer.h"
#include "mongo/base/status.h"
+#include "mongo/config.h"
#include "mongo/db/auth/auth_index_d.h"
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/authorization_manager_global.h"
diff --git a/src/mongo/db/initialize_server_global_state.cpp b/src/mongo/db/initialize_server_global_state.cpp
index 3f2b8444edb..474b29ea7c1 100644
--- a/src/mongo/db/initialize_server_global_state.cpp
+++ b/src/mongo/db/initialize_server_global_state.cpp
@@ -28,8 +28,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/db/initialize_server_global_state.h"
@@ -47,6 +45,7 @@
#include "mongo/base/init.h"
#include "mongo/client/sasl_client_authenticate.h"
+#include "mongo/config.h"
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/authorization_manager_global.h"
#include "mongo/db/auth/internal_user_auth.h"
diff --git a/src/mongo/db/mongod_options.cpp b/src/mongo/db/mongod_options.cpp
index 7a14ebbfc3d..37f6bc8e225 100644
--- a/src/mongo/db/mongod_options.cpp
+++ b/src/mongo/db/mongod_options.cpp
@@ -28,8 +28,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl
-#include "mongo/config.h"
-
#include "mongo/db/mongod_options.h"
#include <boost/filesystem.hpp>
@@ -39,6 +37,7 @@
#include "mongo/base/status.h"
#include "mongo/bson/util/builder.h"
+#include "mongo/config.h"
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/authorization_manager_global.h"
#include "mongo/db/db.h"
diff --git a/src/mongo/db/server_options_helpers.cpp b/src/mongo/db/server_options_helpers.cpp
index 1a66900842d..2645c01ce4a 100644
--- a/src/mongo/db/server_options_helpers.cpp
+++ b/src/mongo/db/server_options_helpers.cpp
@@ -28,8 +28,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl
-#include "mongo/config.h"
-
#include "mongo/db/server_options_helpers.h"
#ifdef _WIN32
@@ -45,6 +43,7 @@
#include "mongo/base/status.h"
#include "mongo/bson/util/builder.h"
+#include "mongo/config.h"
#include "mongo/db/server_options.h"
#include "mongo/db/server_parameters.h"
#include "mongo/logger/log_component.h"
diff --git a/src/mongo/db/sorter/sorter.cpp b/src/mongo/db/sorter/sorter.cpp
index f4c3301a1ae..fe95f54c4a1 100644
--- a/src/mongo/db/sorter/sorter.cpp
+++ b/src/mongo/db/sorter/sorter.cpp
@@ -45,8 +45,6 @@
* Do this once for each unique set of parameters to MONGO_CREATE_SORTER.
*/
-#include "mongo/config.h"
-
#include "mongo/db/sorter/sorter.h"
#include <boost/filesystem/operations.hpp>
@@ -55,6 +53,7 @@
#include <snappy.h>
#include "mongo/base/string_data.h"
+#include "mongo/config.h"
#include "mongo/db/jsobj.h"
#include "mongo/db/storage_options.h"
#include "mongo/platform/atomic_word.h"
diff --git a/src/mongo/db/sorter/sorter_test.cpp b/src/mongo/db/sorter/sorter_test.cpp
index 8deba56ac0e..e87c15efb6e 100644
--- a/src/mongo/db/sorter/sorter_test.cpp
+++ b/src/mongo/db/sorter/sorter_test.cpp
@@ -26,8 +26,6 @@
* then also delete it in the license file.
*/
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/db/sorter/sorter.h"
@@ -37,6 +35,7 @@
#include <boost/shared_ptr.hpp>
#include <boost/thread.hpp>
+#include "mongo/config.h"
#include "mongo/unittest/temp_dir.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/mongoutils/str.h"
diff --git a/src/mongo/db/storage/key_string_test.cpp b/src/mongo/db/storage/key_string_test.cpp
index 161e0d6f2cc..5d122844aeb 100644
--- a/src/mongo/db/storage/key_string_test.cpp
+++ b/src/mongo/db/storage/key_string_test.cpp
@@ -30,11 +30,10 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kStorage
-#include "mongo/config.h"
-
#include <cmath>
#include "mongo/platform/basic.h"
+#include "mongo/config.h"
#include "mongo/db/storage/key_string.h"
#include "mongo/unittest/unittest.h"
#include "mongo/util/hex.h"
diff --git a/src/mongo/db/storage/mmap_v1/dur_journal.cpp b/src/mongo/db/storage/mmap_v1/dur_journal.cpp
index 894fa1707c1..50cb5ee3d22 100644
--- a/src/mongo/db/storage/mmap_v1/dur_journal.cpp
+++ b/src/mongo/db/storage/mmap_v1/dur_journal.cpp
@@ -30,8 +30,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kJournal
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/db/storage/mmap_v1/dur_journal.h"
@@ -41,6 +39,7 @@
#include <boost/filesystem/operations.hpp>
#include "mongo/base/init.h"
+#include "mongo/config.h"
#include "mongo/db/client.h"
#include "mongo/db/storage/mmap_v1/aligned_builder.h"
#include "mongo/db/storage/mmap_v1/dur_journalformat.h"
diff --git a/src/mongo/db/storage/mmap_v1/record_access_tracker.cpp b/src/mongo/db/storage/mmap_v1/record_access_tracker.cpp
index 0ad32346977..d0ca6887127 100644
--- a/src/mongo/db/storage/mmap_v1/record_access_tracker.cpp
+++ b/src/mongo/db/storage/mmap_v1/record_access_tracker.cpp
@@ -26,8 +26,6 @@
* it in the license file.
*/
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/db/storage/mmap_v1/record_access_tracker.h"
@@ -35,6 +33,7 @@
#include <cstring>
#include "mongo/base/init.h"
+#include "mongo/config.h"
#include "mongo/db/storage/mmap_v1/record.h"
#include "mongo/platform/bits.h"
#include "mongo/util/debug_util.h"
diff --git a/src/mongo/dbtests/perftests.cpp b/src/mongo/dbtests/perftests.cpp
index 9fac2024ca7..22a59967385 100644
--- a/src/mongo/dbtests/perftests.cpp
+++ b/src/mongo/dbtests/perftests.cpp
@@ -36,8 +36,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include <boost/filesystem/operations.hpp>
@@ -49,6 +47,7 @@
#include <fstream>
#include <mutex>
+#include "mongo/config.h"
#include "mongo/db/db.h"
#include "mongo/db/dbdirectclient.h"
#include "mongo/db/json.h"
diff --git a/src/mongo/dbtests/threadedtests.cpp b/src/mongo/dbtests/threadedtests.cpp
index 74044046855..4d959ace021 100644
--- a/src/mongo/dbtests/threadedtests.cpp
+++ b/src/mongo/dbtests/threadedtests.cpp
@@ -31,14 +31,13 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kCommand
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include <boost/thread.hpp>
#include <boost/version.hpp>
#include <iostream>
+#include "mongo/config.h"
#include "mongo/db/concurrency/d_concurrency.h"
#include "mongo/db/concurrency/lock_state.h"
#include "mongo/db/operation_context_impl.h"
diff --git a/src/mongo/platform/endian.h b/src/mongo/platform/endian.h
index 86a5e55b157..c4b5547c920 100644
--- a/src/mongo/platform/endian.h
+++ b/src/mongo/platform/endian.h
@@ -27,13 +27,13 @@
#pragma once
-#include "mongo/config.h"
-
#include <climits>
#include <cstring>
#include <boost/static_assert.hpp>
#include <boost/mpl/if.hpp>
#include <boost/type_traits/is_signed.hpp>
+
+#include "mongo/config.h"
#include "mongo/platform/cstdint.h"
#pragma push_macro("MONGO_UINT16_SWAB")
diff --git a/src/mongo/platform/endian_test.cpp b/src/mongo/platform/endian_test.cpp
index ca6ae2a5ce4..0188b438dd7 100644
--- a/src/mongo/platform/endian_test.cpp
+++ b/src/mongo/platform/endian_test.cpp
@@ -25,12 +25,11 @@
* then also delete it in the license file.
*/
-#include "mongo/config.h"
-
#include "mongo/platform/endian.h"
#include <cstring>
+#include "mongo/config.h"
#include "mongo/unittest/unittest.h"
namespace mongo {
diff --git a/src/mongo/s/chunk.cpp b/src/mongo/s/chunk.cpp
index a8e62442bf1..8e077a411aa 100644
--- a/src/mongo/s/chunk.cpp
+++ b/src/mongo/s/chunk.cpp
@@ -30,8 +30,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kSharding
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/s/chunk.h"
@@ -39,6 +37,7 @@
#include <iostream>
#include "mongo/base/owned_pointer_map.h"
+#include "mongo/config.h"
#include "mongo/client/connpool.h"
#include "mongo/client/dbclientcursor.h"
#include "mongo/db/lasterror.h"
diff --git a/src/mongo/s/mongos_options.cpp b/src/mongo/s/mongos_options.cpp
index 592e3ba9f49..05d2ecf9f07 100644
--- a/src/mongo/s/mongos_options.cpp
+++ b/src/mongo/s/mongos_options.cpp
@@ -28,8 +28,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kSharding
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/s/mongos_options.h"
@@ -40,6 +38,7 @@
#include "mongo/base/status.h"
#include "mongo/bson/util/builder.h"
+#include "mongo/config.h"
#include "mongo/db/server_options.h"
#include "mongo/db/server_options_helpers.h"
#include "mongo/s/chunk.h"
diff --git a/src/mongo/s/server.cpp b/src/mongo/s/server.cpp
index 3a4fd229ac7..18b7b5d156d 100644
--- a/src/mongo/s/server.cpp
+++ b/src/mongo/s/server.cpp
@@ -30,8 +30,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kSharding
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/s/server.h"
@@ -45,6 +43,7 @@
#include "mongo/base/status.h"
#include "mongo/client/connpool.h"
#include "mongo/client/replica_set_monitor.h"
+#include "mongo/config.h"
#include "mongo/db/audit.h"
#include "mongo/db/auth/authorization_manager.h"
#include "mongo/db/auth/authorization_manager_global.h"
diff --git a/src/mongo/shell/shell_options.cpp b/src/mongo/shell/shell_options.cpp
index 65f26fe7182..38a69a60c90 100644
--- a/src/mongo/shell/shell_options.cpp
+++ b/src/mongo/shell/shell_options.cpp
@@ -26,8 +26,6 @@
* then also delete it in the license file.
*/
-#include "mongo/config.h"
-
#include "mongo/shell/shell_options.h"
#include <boost/filesystem/operations.hpp>
@@ -36,6 +34,7 @@
#include "mongo/base/status.h"
#include "mongo/bson/util/builder.h"
+#include "mongo/config.h"
#include "mongo/client/sasl_client_authenticate.h"
#include "mongo/db/server_options.h"
#include "mongo/shell/shell_utils.h"
diff --git a/src/mongo/util/assert_util.cpp b/src/mongo/util/assert_util.cpp
index 198ea4722f0..99a594a85b5 100644
--- a/src/mongo/util/assert_util.cpp
+++ b/src/mongo/util/assert_util.cpp
@@ -29,8 +29,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/util/assert_util.h"
@@ -43,6 +41,7 @@ using namespace std;
#endif
#include "mongo/bson/bsonobjbuilder.h"
+#include "mongo/config.h"
#include "mongo/util/debug_util.h"
#include "mongo/util/debugger.h"
#include "mongo/util/exit.h"
diff --git a/src/mongo/util/background.cpp b/src/mongo/util/background.cpp
index 4d484dc82b9..cad78c9ddc7 100644
--- a/src/mongo/util/background.cpp
+++ b/src/mongo/util/background.cpp
@@ -29,8 +29,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kCommand
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/util/background.h"
@@ -40,6 +38,7 @@
#include <boost/thread/once.hpp>
#include <boost/thread/thread.hpp>
+#include "mongo/config.h"
#include "mongo/stdx/functional.h"
#include "mongo/util/concurrency/mutex.h"
#include "mongo/util/concurrency/spin_lock.h"
diff --git a/src/mongo/util/concurrency/rwlockimpl.cpp b/src/mongo/util/concurrency/rwlockimpl.cpp
index c184f03a6dc..b2b6dd5dbcb 100644
--- a/src/mongo/util/concurrency/rwlockimpl.cpp
+++ b/src/mongo/util/concurrency/rwlockimpl.cpp
@@ -29,8 +29,6 @@
*/
-#include "mongo/config.h"
-
#if defined(_WIN32)
#define WIN32_LEAN_AND_MEAN
#define NOMINMAX
@@ -45,6 +43,7 @@
using namespace std;
+#include "mongo/config.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/time_support.h"
#include "rwlockimpl.h"
diff --git a/src/mongo/util/concurrency/simplerwlock.h b/src/mongo/util/concurrency/simplerwlock.h
index e37450ca7f6..821150e7add 100644
--- a/src/mongo/util/concurrency/simplerwlock.h
+++ b/src/mongo/util/concurrency/simplerwlock.h
@@ -28,11 +28,10 @@
#pragma once
-#include "mongo/config.h"
-
#include <boost/noncopyable.hpp>
#include "mongo/base/string_data.h"
+#include "mongo/config.h"
#include "mongo/platform/atomic_word.h"
namespace mongo {
diff --git a/src/mongo/util/concurrency/threadlocal.h b/src/mongo/util/concurrency/threadlocal.h
index 3d8b9326a70..4530ab9aa6d 100644
--- a/src/mongo/util/concurrency/threadlocal.h
+++ b/src/mongo/util/concurrency/threadlocal.h
@@ -28,10 +28,10 @@
* then also delete it in the license file.
*/
-#include "mongo/config.h"
-
#include <boost/thread/tss.hpp>
+#include "mongo/config.h"
+
namespace mongo {
using boost::thread_specific_ptr;
diff --git a/src/mongo/util/debug_util.h b/src/mongo/util/debug_util.h
index 5a31385ba42..2b1ae82b72b 100644
--- a/src/mongo/util/debug_util.h
+++ b/src/mongo/util/debug_util.h
@@ -29,6 +29,7 @@
#pragma once
+#include "mongo/config.h"
namespace mongo {
diff --git a/src/mongo/util/exception_filter_win32.cpp b/src/mongo/util/exception_filter_win32.cpp
index a53c8fa739f..cedb1b9d3dd 100644
--- a/src/mongo/util/exception_filter_win32.cpp
+++ b/src/mongo/util/exception_filter_win32.cpp
@@ -30,12 +30,12 @@
#ifdef _WIN32
-#include "mongo/config.h"
+#include "mongo/platform/basic.h"
#include <ostream>
-
-#include "mongo/platform/basic.h"
#include <DbgHelp.h>
+
+#include "mongo/config.h"
#include "mongo/util/assert_util.h"
#include "mongo/util/exit_code.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/util/net/httpclient.cpp b/src/mongo/util/net/httpclient.cpp
index b96fae5029e..4f7e9260555 100644
--- a/src/mongo/util/net/httpclient.cpp
+++ b/src/mongo/util/net/httpclient.cpp
@@ -27,13 +27,12 @@
* then also delete it in the license file.
*/
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/util/net/httpclient.h"
#include "mongo/bson/util/builder.h"
+#include "mongo/config.h"
#include "mongo/util/mongoutils/str.h"
#include "mongo/util/net/message.h"
#include "mongo/util/net/message_port.h"
diff --git a/src/mongo/util/net/listen.cpp b/src/mongo/util/net/listen.cpp
index 6bc9e1ace30..2a8e366e105 100644
--- a/src/mongo/util/net/listen.cpp
+++ b/src/mongo/util/net/listen.cpp
@@ -30,8 +30,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kNetwork
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/util/net/listen.h"
@@ -39,6 +37,7 @@
#include <boost/scoped_array.hpp>
#include <boost/shared_ptr.hpp>
+#include "mongo/config.h"
#include "mongo/db/server_options.h"
#include "mongo/base/owned_pointer_vector.h"
#include "mongo/util/exit.h"
diff --git a/src/mongo/util/net/listen.h b/src/mongo/util/net/listen.h
index 614e5956a38..f2b336c3a7e 100644
--- a/src/mongo/util/net/listen.h
+++ b/src/mongo/util/net/listen.h
@@ -29,8 +29,6 @@
#pragma once
-#include "mongo/config.h"
-
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <boost/thread/mutex.hpp>
@@ -39,6 +37,7 @@
#include <string>
#include <vector>
+#include "mongo/config.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/util/concurrency/ticketholder.h"
#include "mongo/util/net/sock.h"
diff --git a/src/mongo/util/net/message_port.cpp b/src/mongo/util/net/message_port.cpp
index 4a502d53280..3d7829d2300 100644
--- a/src/mongo/util/net/message_port.cpp
+++ b/src/mongo/util/net/message_port.cpp
@@ -29,8 +29,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kNetwork
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/util/net/message_port.h"
@@ -39,6 +37,7 @@
#include <fcntl.h>
#include <time.h>
+#include "mongo/config.h"
#include "mongo/util/allocator.h"
#include "mongo/util/background.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/util/net/message_port.h b/src/mongo/util/net/message_port.h
index 34b0f8250ad..45f8eae4d62 100644
--- a/src/mongo/util/net/message_port.h
+++ b/src/mongo/util/net/message_port.h
@@ -29,12 +29,11 @@
#pragma once
-#include "mongo/config.h"
-
#include <boost/noncopyable.hpp>
#include <boost/shared_ptr.hpp>
#include <vector>
+#include "mongo/config.h"
#include "mongo/util/net/message.h"
#include "mongo/util/net/sock.h"
diff --git a/src/mongo/util/net/message_server_port.cpp b/src/mongo/util/net/message_server_port.cpp
index 8b769e683f4..f84192f8cd8 100644
--- a/src/mongo/util/net/message_server_port.cpp
+++ b/src/mongo/util/net/message_server_port.cpp
@@ -29,8 +29,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kNetwork
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include <boost/scoped_ptr.hpp>
@@ -38,6 +36,7 @@
#include <memory>
#include "mongo/base/disallow_copying.h"
+#include "mongo/config.h"
#include "mongo/db/lasterror.h"
#include "mongo/db/server_options.h"
#include "mongo/db/stats/counters.h"
diff --git a/src/mongo/util/net/miniwebserver.cpp b/src/mongo/util/net/miniwebserver.cpp
index 7cc95cd150a..2dbf68b6d6f 100644
--- a/src/mongo/util/net/miniwebserver.cpp
+++ b/src/mongo/util/net/miniwebserver.cpp
@@ -29,8 +29,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kNetwork
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/util/net/miniwebserver.h"
@@ -38,6 +36,7 @@
#include <boost/shared_ptr.hpp>
#include <pcrecpp.h>
+#include "mongo/config.h"
#include "mongo/util/hex.h"
#include "mongo/util/log.h"
diff --git a/src/mongo/util/net/sock.cpp b/src/mongo/util/net/sock.cpp
index 4ee54137a8f..42a5dcdba04 100644
--- a/src/mongo/util/net/sock.cpp
+++ b/src/mongo/util/net/sock.cpp
@@ -29,8 +29,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kNetwork
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/util/net/sock.h"
@@ -49,6 +47,7 @@
# endif
#endif
+#include "mongo/config.h"
#include "mongo/db/server_options.h"
#include "mongo/util/background.h"
#include "mongo/util/concurrency/value.h"
diff --git a/src/mongo/util/net/sock.h b/src/mongo/util/net/sock.h
index b0d5059d362..f1da6144d3e 100644
--- a/src/mongo/util/net/sock.h
+++ b/src/mongo/util/net/sock.h
@@ -29,8 +29,6 @@
#pragma once
-#include "mongo/config.h"
-
#include <stdio.h>
#ifndef _WIN32
@@ -52,6 +50,7 @@
#include <vector>
#include "mongo/base/disallow_copying.h"
+#include "mongo/config.h"
#include "mongo/logger/log_severity.h"
#include "mongo/platform/compiler.h"
#include "mongo/platform/cstdint.h"
diff --git a/src/mongo/util/net/ssl_manager.cpp b/src/mongo/util/net/ssl_manager.cpp
index 748ca80f5de..730c506f991 100644
--- a/src/mongo/util/net/ssl_manager.cpp
+++ b/src/mongo/util/net/ssl_manager.cpp
@@ -27,8 +27,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kNetwork
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/util/net/ssl_manager.h"
@@ -43,6 +41,7 @@
#include "mongo/base/init.h"
#include "mongo/bson/bsonobjbuilder.h"
+#include "mongo/config.h"
#include "mongo/platform/atomic_word.h"
#include "mongo/util/concurrency/mutex.h"
#include "mongo/util/exit.h"
diff --git a/src/mongo/util/net/ssl_manager.h b/src/mongo/util/net/ssl_manager.h
index b5a29cb1272..d5cefff5e89 100644
--- a/src/mongo/util/net/ssl_manager.h
+++ b/src/mongo/util/net/ssl_manager.h
@@ -27,10 +27,10 @@
#pragma once
-#include "mongo/config.h"
-
#include <string>
+#include "mongo/config.h"
+
#ifdef MONGO_CONFIG_SSL
#include "mongo/base/disallow_copying.h"
diff --git a/src/mongo/util/quick_exit.cpp b/src/mongo/util/quick_exit.cpp
index 0f90570e344..f103dc58413 100644
--- a/src/mongo/util/quick_exit.cpp
+++ b/src/mongo/util/quick_exit.cpp
@@ -26,10 +26,10 @@
* it in the license file.
*/
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
+#include "mongo/config.h"
+
#if defined(MONGO_CONFIG_HAVE_HEADER_UNISTD_H)
#include <unistd.h>
#endif
diff --git a/src/mongo/util/timer.cpp b/src/mongo/util/timer.cpp
index 5936f00c1f6..d2fd49b5b0c 100644
--- a/src/mongo/util/timer.cpp
+++ b/src/mongo/util/timer.cpp
@@ -27,12 +27,12 @@
* then also delete it in the license file.
*/
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/util/timer.h"
+#include "mongo/config.h"
+
#include <ctime>
#include <limits>
#if defined(MONGO_CONFIG_HAVE_HEADER_UNISTD_H)
diff --git a/src/mongo/util/version_reporting.cpp b/src/mongo/util/version_reporting.cpp
index 104522bec77..f0dadcaa7ce 100644
--- a/src/mongo/util/version_reporting.cpp
+++ b/src/mongo/util/version_reporting.cpp
@@ -29,8 +29,6 @@
#define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl
-#include "mongo/config.h"
-
#include "mongo/platform/basic.h"
#include "mongo/util/version_reporting.h"
@@ -40,6 +38,7 @@
#include <string>
#include "mongo/bson/bsonobjbuilder.h"
+#include "mongo/config.h"
#include "mongo/db/global_environment_experiment.h"
#include "mongo/db/jsobj.h"
#include "mongo/util/debug_util.h"