Bug 474296 - Remove UA define of "WinNT3.51" and "WinNT4.0" due to out of support; (Av2) WNTv4 and (all) older; r=cbiesinger

This commit is contained in:
Serge Gautherie 2009-08-20 17:30:25 +02:00
parent ca9d43d4d7
commit f5b93c930a

View File

@ -637,10 +637,10 @@ nsHttpHandler::InitUserAgentComponents()
"Macintosh" "Macintosh"
#elif defined(XP_BEOS) #elif defined(XP_BEOS)
"BeOS" "BeOS"
#elif !defined(MOZ_X11) #elif defined(MOZ_X11)
"?"
#else
"X11" "X11"
#else
"?"
#endif #endif
); );
@ -658,10 +658,15 @@ nsHttpHandler::InitUserAgentComponents()
else if (os2ver == 45) else if (os2ver == 45)
mOscpu.AssignLiteral("Warp 4.5"); mOscpu.AssignLiteral("Warp 4.5");
#elif defined(WINCE) #elif defined(WINCE) || defined(XP_WIN)
OSVERSIONINFO info = { sizeof(OSVERSIONINFO) }; OSVERSIONINFO info = { sizeof(OSVERSIONINFO) };
if (GetVersionEx(&info)) { if (GetVersionEx(&info)) {
char *buf = PR_smprintf("WindowsCE %ld.%ld", char *buf = PR_smprintf(
#if defined(WINCE)
"WindowsCE %ld.%ld",
#else
"Windows NT %ld.%ld",
#endif
info.dwMajorVersion, info.dwMajorVersion,
info.dwMinorVersion); info.dwMinorVersion);
if (buf) { if (buf) {
@ -669,33 +674,6 @@ nsHttpHandler::InitUserAgentComponents()
PR_smprintf_free(buf); PR_smprintf_free(buf);
} }
} }
#elif defined(XP_WIN)
OSVERSIONINFO info = { sizeof(OSVERSIONINFO) };
if (GetVersionEx(&info)) {
if (info.dwPlatformId == VER_PLATFORM_WIN32_NT) {
if (info.dwMajorVersion == 3)
mOscpu.AssignLiteral("WinNT3.51");
else if (info.dwMajorVersion == 4)
mOscpu.AssignLiteral("WinNT4.0");
else {
char *buf = PR_smprintf("Windows NT %ld.%ld",
info.dwMajorVersion,
info.dwMinorVersion);
if (buf) {
mOscpu = buf;
PR_smprintf_free(buf);
}
}
} else {
char *buf = PR_smprintf("Windows %ld.%ld",
info.dwMajorVersion,
info.dwMinorVersion);
if (buf) {
mOscpu = buf;
PR_smprintf_free(buf);
}
}
}
#elif defined (XP_MACOSX) #elif defined (XP_MACOSX)
#if defined(__ppc__) #if defined(__ppc__)
mOscpu.AssignLiteral("PPC Mac OS X"); mOscpu.AssignLiteral("PPC Mac OS X");