diff options
author | Andrew Morrow <acm@mongodb.com> | 2015-01-03 17:54:10 -0500 |
---|---|---|
committer | Andrew Morrow <acm@mongodb.com> | 2015-01-05 18:27:01 -0500 |
commit | c43d8e0aa47f868a8b3cd7367d2f21c717e2ca3c (patch) | |
tree | 4f043489fbf600565dfb63311762208766702389 /src/mongo/util | |
parent | fe1a1055a60eef0b37ca389a4c516f27a17d04d1 (diff) | |
download | mongo-c43d8e0aa47f868a8b3cd7367d2f21c717e2ca3c.tar.gz |
SERVER-13256 Prohibit new uses of pch.h
Diffstat (limited to 'src/mongo/util')
30 files changed, 94 insertions, 4 deletions
diff --git a/src/mongo/util/alignedbuilder.cpp b/src/mongo/util/alignedbuilder.cpp index 41c0efb8ae9..cf09de9846f 100644 --- a/src/mongo/util/alignedbuilder.cpp +++ b/src/mongo/util/alignedbuilder.cpp @@ -30,7 +30,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/alignedbuilder.h" #include "mongo/util/log.h" diff --git a/src/mongo/util/base64.cpp b/src/mongo/util/base64.cpp index 6e1c7b418d7..cd7218c368f 100644 --- a/src/mongo/util/base64.cpp +++ b/src/mongo/util/base64.cpp @@ -28,7 +28,10 @@ * then also delete it in the license file. */ +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/base64.h" diff --git a/src/mongo/util/bson_util.h b/src/mongo/util/bson_util.h index b4b4bae30b2..b198f5a2798 100644 --- a/src/mongo/util/bson_util.h +++ b/src/mongo/util/bson_util.h @@ -29,7 +29,10 @@ #pragma once +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED namespace mongo { diff --git a/src/mongo/util/checksum.h b/src/mongo/util/checksum.h index cb133c05ba8..606c0eb8220 100644 --- a/src/mongo/util/checksum.h +++ b/src/mongo/util/checksum.h @@ -28,7 +28,10 @@ #pragma once +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED namespace mongo { /** a simple, rather dumb, but very fast checksum. see perftests.cpp for unit tests. */ diff --git a/src/mongo/util/concurrency/spin_lock.cpp b/src/mongo/util/concurrency/spin_lock.cpp index df96fbfd179..f7f897f2140 100644 --- a/src/mongo/util/concurrency/spin_lock.cpp +++ b/src/mongo/util/concurrency/spin_lock.cpp @@ -27,7 +27,10 @@ * then also delete it in the license file. */ -#include "mongo/pch.h" // todo eliminate this include +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" +#include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED // todo eliminate this include #include "mongo/util/concurrency/spin_lock.h" diff --git a/src/mongo/util/concurrency/task.cpp b/src/mongo/util/concurrency/task.cpp index 75e0e85cc87..6f78bee1b16 100644 --- a/src/mongo/util/concurrency/task.cpp +++ b/src/mongo/util/concurrency/task.cpp @@ -29,7 +29,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include <boost/thread/condition.hpp> diff --git a/src/mongo/util/concurrency/thread_pool.cpp b/src/mongo/util/concurrency/thread_pool.cpp index 741b46d34c7..408335ef9a7 100644 --- a/src/mongo/util/concurrency/thread_pool.cpp +++ b/src/mongo/util/concurrency/thread_pool.cpp @@ -30,7 +30,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/concurrency/thread_pool.h" diff --git a/src/mongo/util/file_allocator.h b/src/mongo/util/file_allocator.h index aa59ce18b3d..50f4d023a6d 100644 --- a/src/mongo/util/file_allocator.h +++ b/src/mongo/util/file_allocator.h @@ -27,7 +27,10 @@ * then also delete it in the license file. */ +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include <list> #include <boost/filesystem/path.hpp> diff --git a/src/mongo/util/intrusive_counter.cpp b/src/mongo/util/intrusive_counter.cpp index 1b14cc80cae..4d74f656063 100644 --- a/src/mongo/util/intrusive_counter.cpp +++ b/src/mongo/util/intrusive_counter.cpp @@ -26,7 +26,10 @@ * then also delete it in the license file. */ +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/intrusive_counter.h" diff --git a/src/mongo/util/logfile.cpp b/src/mongo/util/logfile.cpp index bc374f6ff02..37064fba587 100644 --- a/src/mongo/util/logfile.cpp +++ b/src/mongo/util/logfile.cpp @@ -30,7 +30,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/logfile.h" diff --git a/src/mongo/util/md5main.cpp b/src/mongo/util/md5main.cpp index e99de9b4156..d11f35483c8 100644 --- a/src/mongo/util/md5main.cpp +++ b/src/mongo/util/md5main.cpp @@ -40,7 +40,10 @@ 2002-04-13 lpd Splits off main program into a separate file, md5main.c. */ +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include <math.h> #include <stdio.h> diff --git a/src/mongo/util/mmap.cpp b/src/mongo/util/mmap.cpp index a2bef8abe36..917fff03327 100644 --- a/src/mongo/util/mmap.cpp +++ b/src/mongo/util/mmap.cpp @@ -29,7 +29,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/mmap.h" diff --git a/src/mongo/util/mmap_posix.cpp b/src/mongo/util/mmap_posix.cpp index dea51fa7f7f..6b840928f3e 100644 --- a/src/mongo/util/mmap_posix.cpp +++ b/src/mongo/util/mmap_posix.cpp @@ -29,7 +29,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include <errno.h> #include <fcntl.h> diff --git a/src/mongo/util/mmap_win.cpp b/src/mongo/util/mmap_win.cpp index 5d0d0aa1356..c1f6492561e 100644 --- a/src/mongo/util/mmap_win.cpp +++ b/src/mongo/util/mmap_win.cpp @@ -29,7 +29,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/db/concurrency/d_concurrency.h" #include "mongo/db/storage/mmap_v1/durable_mapped_file.h" diff --git a/src/mongo/util/net/httpclient.cpp b/src/mongo/util/net/httpclient.cpp index b72e0135b43..cf64d5f7447 100644 --- a/src/mongo/util/net/httpclient.cpp +++ b/src/mongo/util/net/httpclient.cpp @@ -27,7 +27,10 @@ * then also delete it in the license file. */ +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/net/httpclient.h" diff --git a/src/mongo/util/net/httpclient.h b/src/mongo/util/net/httpclient.h index ade84d03307..233c0ba9e67 100644 --- a/src/mongo/util/net/httpclient.h +++ b/src/mongo/util/net/httpclient.h @@ -30,7 +30,10 @@ #pragma once #include "mongo/client/export_macros.h" +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED namespace mongo { diff --git a/src/mongo/util/net/message.cpp b/src/mongo/util/net/message.cpp index 6712890dbc8..88fa214d169 100644 --- a/src/mongo/util/net/message.cpp +++ b/src/mongo/util/net/message.cpp @@ -27,7 +27,10 @@ * then also delete it in the license file. */ +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/net/message.h" diff --git a/src/mongo/util/net/message_server.h b/src/mongo/util/net/message_server.h index 1f698fede7e..953174db6bc 100644 --- a/src/mongo/util/net/message_server.h +++ b/src/mongo/util/net/message_server.h @@ -34,7 +34,10 @@ #pragma once +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED namespace mongo { diff --git a/src/mongo/util/net/message_server_port.cpp b/src/mongo/util/net/message_server_port.cpp index 1b357782e4d..038394dda90 100644 --- a/src/mongo/util/net/message_server_port.cpp +++ b/src/mongo/util/net/message_server_port.cpp @@ -29,7 +29,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kNetwork +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include <boost/thread/thread.hpp> diff --git a/src/mongo/util/net/miniwebserver.h b/src/mongo/util/net/miniwebserver.h index 645db42746f..c95333371ee 100644 --- a/src/mongo/util/net/miniwebserver.h +++ b/src/mongo/util/net/miniwebserver.h @@ -29,7 +29,10 @@ #pragma once +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/db/jsobj.h" #include "mongo/util/net/listen.h" diff --git a/src/mongo/util/password.cpp b/src/mongo/util/password.cpp index da93ae45fb4..65b7e8579b6 100644 --- a/src/mongo/util/password.cpp +++ b/src/mongo/util/password.cpp @@ -28,7 +28,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/password.h" diff --git a/src/mongo/util/processinfo.cpp b/src/mongo/util/processinfo.cpp index e6b151b7d7a..ef04a6d7afe 100644 --- a/src/mongo/util/processinfo.cpp +++ b/src/mongo/util/processinfo.cpp @@ -29,7 +29,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/base/init.h" #include "mongo/util/processinfo.h" diff --git a/src/mongo/util/processinfo_darwin.cpp b/src/mongo/util/processinfo_darwin.cpp index 4967c88bbeb..98323663f9f 100644 --- a/src/mongo/util/processinfo_darwin.cpp +++ b/src/mongo/util/processinfo_darwin.cpp @@ -29,7 +29,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/processinfo.h" #include "mongo/util/log.h" #include "mongo/db/jsobj.h" diff --git a/src/mongo/util/processinfo_none.cpp b/src/mongo/util/processinfo_none.cpp index 94e98649a0d..0e67f34362f 100644 --- a/src/mongo/util/processinfo_none.cpp +++ b/src/mongo/util/processinfo_none.cpp @@ -27,7 +27,10 @@ * then also delete it in the license file. */ +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include <iostream> diff --git a/src/mongo/util/processinfo_win32.cpp b/src/mongo/util/processinfo_win32.cpp index 0dcc43609ca..edc711e42b4 100644 --- a/src/mongo/util/processinfo_win32.cpp +++ b/src/mongo/util/processinfo_win32.cpp @@ -29,7 +29,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kControl +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include <iostream> #include <psapi.h> diff --git a/src/mongo/util/progress_meter.cpp b/src/mongo/util/progress_meter.cpp index 85594e1ab02..7b57d76f0e0 100644 --- a/src/mongo/util/progress_meter.cpp +++ b/src/mongo/util/progress_meter.cpp @@ -29,7 +29,10 @@ #define MONGO_LOG_DEFAULT_COMPONENT ::mongo::logger::LogComponent::kDefault -#include "mongo/pch.h" // needed for log.h +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" +#include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED // needed for log.h #include "mongo/util/progress_meter.h" diff --git a/src/mongo/util/safe_num.cpp b/src/mongo/util/safe_num.cpp index 7f683a58ce3..437a1818f2c 100644 --- a/src/mongo/util/safe_num.cpp +++ b/src/mongo/util/safe_num.cpp @@ -28,7 +28,10 @@ #include <sstream> #include <boost/static_assert.hpp> -#include "mongo/pch.h" // for malloc/realloc/INFINITY pulled from bson +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" +#include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED // for malloc/realloc/INFINITY pulled from bson #include "mongo/bson/bsontypes.h" #include "mongo/util/safe_num.h" diff --git a/src/mongo/util/safe_num_test.cpp b/src/mongo/util/safe_num_test.cpp index 6bd3915b0e5..f1553262496 100644 --- a/src/mongo/util/safe_num_test.cpp +++ b/src/mongo/util/safe_num_test.cpp @@ -27,7 +27,10 @@ #include <limits> -#include "mongo/pch.h" // for malloc/realloc pulled from bson +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" +#include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED // for malloc/realloc pulled from bson #include "mongo/bson/bsontypes.h" #include "mongo/util/safe_num.h" diff --git a/src/mongo/util/stringutils.cpp b/src/mongo/util/stringutils.cpp index 5b3a9167a7e..ad9e6021424 100644 --- a/src/mongo/util/stringutils.cpp +++ b/src/mongo/util/stringutils.cpp @@ -27,7 +27,10 @@ * then also delete it in the license file. */ +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/stringutils.h" diff --git a/src/mongo/util/text_startuptest.cpp b/src/mongo/util/text_startuptest.cpp index f7bb742b597..a6fd6da4cc8 100644 --- a/src/mongo/util/text_startuptest.cpp +++ b/src/mongo/util/text_startuptest.cpp @@ -25,7 +25,10 @@ * then also delete it in the license file. */ +#define MONGO_PCH_WHITELISTED +#include "mongo/platform/basic.h" #include "mongo/pch.h" +#undef MONGO_PCH_WHITELISTED #include "mongo/util/text.h" |