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>
OSVERSIONINFOW info;
info.dwOSVersionInfoSize = sizeof(info);
+
+ // Don't complain that GetVersionEx is deprecated; there is no alternative.
+ #pragma warning(suppress : 4996)
if (GetVersionExW(&info) == 0)
return;