summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAlexis Campailla <alexis@janeasystems.com>2016-02-10 16:34:56 +0100
committerAlexis Campailla <alexis@janeasystems.com>2016-03-18 03:00:47 +0100
commit1cf26c036daf438ea50f0d7aa4984f8d67fa792b (patch)
tree27965128666b6043a3354c6b56e6f4cf43952870 /src
parent55db19074dc35be99a610009f9fe9bb27ec4a5c6 (diff)
downloadandroid-node-v8-1cf26c036daf438ea50f0d7aa4984f8d67fa792b.tar.gz
android-node-v8-1cf26c036daf438ea50f0d7aa4984f8d67fa792b.tar.bz2
android-node-v8-1cf26c036daf438ea50f0d7aa4984f8d67fa792b.zip
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')
-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 58e747e52c..dce72aff22 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++) {