Browse Source

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>
process-exit-stdio-flushing
Alexis Campailla 9 years ago
parent
commit
1cf26c036d
  1. 8
      src/node_main.cc

8
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++) {

Loading…
Cancel
Save