Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nodejs/node.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexis Campailla <alexis@janeasystems.com>2016-02-10 18:34:56 +0300
committerAlexis Campailla <alexis@janeasystems.com>2016-03-18 05:00:47 +0300
commit1cf26c036daf438ea50f0d7aa4984f8d67fa792b (patch)
tree27965128666b6043a3354c6b56e6f4cf43952870 /src/node_main.cc
parent55db19074dc35be99a610009f9fe9bb27ec4a5c6 (diff)
win: prevent node from running on Windows Vista or earlier
Ref: https://github.com/nodejs/node/issues/3804 PR-URL: https://github.com/nodejs/node/pull/5167 Reviewed-By: rvagg - Rod Vagg <rod@vagg.org> Reviewed-By: joaocgreis - João Reis <reis@janeasystems.com>
Diffstat (limited to 'src/node_main.cc')
-rw-r--r--src/node_main.cc8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/node_main.cc b/src/node_main.cc
index 58e747e52c4..dce72aff22f 100644
--- a/src/node_main.cc
+++ b/src/node_main.cc
@@ -1,7 +1,15 @@
#include "node.h"
#ifdef _WIN32
+#include <VersionHelpers.h>
+
int wmain(int argc, wchar_t *wargv[]) {
+ if (!IsWindows7OrGreater()) {
+ fprintf(stderr, "This application is only supported on Windows 7, "
+ "Windows Server 2008 R2, or higher.");
+ exit(1);
+ }
+
// Convert argv to to UTF8
char** argv = new char*[argc];
for (int i = 0; i < argc; i++) {