Bug 1211306 - Replace a use of deprecated GetVersionEx() with its MFBT equivalent. r=jduell.

--HG--
extra : rebase_source : ac72adbb04601860124b3a016edb7ba6608eedd5
This commit is contained in:
Nicholas Nethercote 2015-10-04 19:11:29 -07:00
Родитель be54e0666b
Коммит 465017691b
1 изменённых файлов: 5 добавлений и 9 удалений

Просмотреть файл

@ -13,6 +13,7 @@
#include "nsIScriptSecurityManager.h"
#include "nsITimer.h"
#include "mozilla/net/DNS.h"
#include "mozilla/WindowsVersion.h"
#include "prerror.h"
#define REQUEST 0x68656c6f
@ -338,16 +339,11 @@ main(int32_t argc, char *argv[])
nsRefPtr<MulticastTimerCallback> timerCb = new MulticastTimerCallback();
// The following multicast tests using multiple sockets require a firewall
// exception on Windows XP before they pass. For now, we'll skip them here.
// Later versions of Windows don't seem to have this issue.
// exception on Windows XP (the earliest version of Windows we now support)
// before they pass. For now, we'll skip them here. Later versions of Windows
// (Win2003 and onward) don't seem to have this issue.
#ifdef XP_WIN
OSVERSIONINFO OsVersion;
OsVersion.dwOSVersionInfoSize = sizeof(OSVERSIONINFO);
#pragma warning(push)
#pragma warning(disable:4996) // 'GetVersionExA': was declared deprecated
GetVersionEx(&OsVersion);
#pragma warning(pop)
if (OsVersion.dwMajorVersion == 5 && OsVersion.dwMinorVersion == 1) {
if (!mozilla::IsWin2003OrLater()) { // i.e. if it is WinXP
goto close;
}
#endif