summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/mongo/db/extsort.cpp3
-rw-r--r--src/mongo/db/instance.cpp4
-rw-r--r--src/mongo/shell/dbshell.cpp2
-rw-r--r--src/mongo/shell/shell_utils_extended.cpp9
-rw-r--r--src/mongo/util/text.cpp7
5 files changed, 16 insertions, 9 deletions
diff --git a/src/mongo/db/extsort.cpp b/src/mongo/db/extsort.cpp
index cc0637fb216..195b01851a8 100644
--- a/src/mongo/db/extsort.cpp
+++ b/src/mongo/db/extsort.cpp
@@ -270,6 +270,9 @@ namespace mongo {
#ifdef _WIN32
_file = ::_open( file.c_str(), _O_BINARY | _O_RDWR | _O_CREAT , _S_IREAD | _S_IWRITE );
#else
+#ifndef O_NOATIME
+#define O_NOATIME 0
+#endif
_file = ::open( file.c_str(), O_CREAT | O_RDWR | O_NOATIME , S_IRUSR | S_IWUSR );
#endif
massert( 16392,
diff --git a/src/mongo/db/instance.cpp b/src/mongo/db/instance.cpp
index 04991bb968b..0e84e57e019 100644
--- a/src/mongo/db/instance.cpp
+++ b/src/mongo/db/instance.cpp
@@ -21,7 +21,9 @@
#include <boost/thread/thread.hpp>
#include <fstream>
#include <boost/filesystem/operations.hpp>
-#if !defined(_WIN32)
+#if defined(_WIN32)
+#include <io.h>
+#else
#include <sys/file.h>
#endif
diff --git a/src/mongo/shell/dbshell.cpp b/src/mongo/shell/dbshell.cpp
index b333dc8adcd..de68f2a06c7 100644
--- a/src/mongo/shell/dbshell.cpp
+++ b/src/mongo/shell/dbshell.cpp
@@ -35,9 +35,11 @@
#include "mongo/util/password.h"
#include "mongo/util/stacktrace.h"
#include "mongo/util/startup_test.h"
+#include "mongo/util/text.h"
#include "mongo/util/version.h"
#ifdef _WIN32
+#include <io.h>
#define isatty _isatty
#else
#include <unistd.h>
diff --git a/src/mongo/shell/shell_utils_extended.cpp b/src/mongo/shell/shell_utils_extended.cpp
index 59579a8fb59..1e68882a3bc 100644
--- a/src/mongo/shell/shell_utils_extended.cpp
+++ b/src/mongo/shell/shell_utils_extended.cpp
@@ -18,16 +18,15 @@
#include "pch.h"
#include <boost/filesystem/convenience.hpp>
-
#include <fstream>
-#include "mongo/util/net/sock.h"
-
+#include "mongo/scripting/engine.h"
#include "mongo/shell/shell_utils.h"
#include "mongo/shell/shell_utils_launcher.h"
-#include "mongo/util/md5.hpp"
#include "mongo/util/file.h"
-#include "mongo/scripting/engine.h"
+#include "mongo/util/md5.hpp"
+#include "mongo/util/net/sock.h"
+#include "mongo/util/text.h"
namespace mongo {
diff --git a/src/mongo/util/text.cpp b/src/mongo/util/text.cpp
index 9ecca38c18b..1c587b6d303 100644
--- a/src/mongo/util/text.cpp
+++ b/src/mongo/util/text.cpp
@@ -17,14 +17,15 @@
#include "pch.h"
-#include "mongo/util/text.h"
-#include "mongo/util/mongoutils/str.h"
#include <boost/smart_ptr/scoped_array.hpp>
-
#ifdef _WIN32
#include <io.h>
#endif
+#include "mongo/platform/basic.h"
+#include "mongo/util/mongoutils/str.h"
+#include "mongo/util/text.h"
+
using namespace std;
namespace mongo {