Browse Source

win: suppress GetVersionEx deprecation warning

There is no other way to retrieve the Windows version. The stated reason
this API is deprecated is that applications are not supposed to check
whether the Windows it's running on is recent enough. But that's not
what we use it for.

PR-URL: https://github.com/iojs/io.js/pull/261
Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl>
v1.8.0-commit
Bert Belder 10 years ago
parent
commit
09fe6fe153
  1. 3
      src/node_os.cc

3
src/node_os.cc

@ -111,6 +111,9 @@ static void GetOSRelease(const FunctionCallbackInfo<Value>& args) {
OSVERSIONINFOW info; OSVERSIONINFOW info;
info.dwOSVersionInfoSize = sizeof(info); info.dwOSVersionInfoSize = sizeof(info);
// Don't complain that GetVersionEx is deprecated; there is no alternative.
#pragma warning(suppress : 4996)
if (GetVersionExW(&info) == 0) if (GetVersionExW(&info) == 0)
return; return;

Loading…
Cancel
Save