summaryrefslogtreecommitdiff
path: root/src/mongo/platform
diff options
context:
space:
mode:
authorAndrew Morrow <acm@mongodb.com>2014-05-18 09:08:34 -0400
committerAndrew Morrow <acm@mongodb.com>2014-05-19 19:50:53 -0400
commit2bff086f3290a662736330a0c03c988a70411ebc (patch)
treeac20e27ed94b10c28a697878f9a3a339d513c325 /src/mongo/platform
parent9a404af6d545d8e2352342bea6a78b5d675a6950 (diff)
downloadmongo-2bff086f3290a662736330a0c03c988a70411ebc.tar.gz
SERVER-13978 Error out if NTDDI_VERSION is set but _WIN32_WINNT is not
Diffstat (limited to 'src/mongo/platform')
-rw-r--r--src/mongo/platform/windows_basic.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/mongo/platform/windows_basic.h b/src/mongo/platform/windows_basic.h
index 490130dddaf..2a282d9d8fc 100644
--- a/src/mongo/platform/windows_basic.h
+++ b/src/mongo/platform/windows_basic.h
@@ -34,6 +34,12 @@
#error "windows_basic included but _WIN32 is not defined"
#endif
+// "If you define NTDDI_VERSION, you must also define _WIN32_WINNT":
+// http://msdn.microsoft.com/en-us/library/windows/desktop/aa383745(v=vs.85).aspx
+#if defined(NTDDI_VERSION) && !defined(_WIN32_WINNT)
+#error NTDDI_VERSION defined but _WIN32_WINNT is undefined
+#endif
+
// Ensure that _WIN32_WINNT is set to something before we include windows.h. For server builds
// both _WIN32_WINNT and NTDDI_VERSION are set as defines on the command line, but we need
// these here for things like client driver builds, where they may not already be set.