mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-28 05:10:49 +00:00
Fix for bug #4930; calculate Win version properly
This commit is contained in:
parent
a3825da6dd
commit
7486db5985
@ -199,7 +199,17 @@ nsNetlibService::nsNetlibService()
|
||||
*/
|
||||
XP_AppLanguage = PL_strdup("en");
|
||||
#ifdef XP_WIN
|
||||
XP_AppPlatform = PL_strdup("Win95");
|
||||
{
|
||||
OSVERSIONINFO info = { sizeof OSVERSIONINFO };
|
||||
GetVersionEx( &info );
|
||||
if ( info.dwPlatformId == VER_PLATFORM_WIN32_NT ) {
|
||||
XP_AppPlatform = PL_strdup("WinNT");
|
||||
} else if ( info.dwMinorVersion > 0 ) {
|
||||
XP_AppPlatform = PL_strdup("Win98");
|
||||
} else {
|
||||
XP_AppPlatform = PL_strdup("Win95");
|
||||
}
|
||||
}
|
||||
#elif defined(XP_MAC)
|
||||
XP_AppPlatform = PL_strdup("MacPPC");
|
||||
#elif defined(XP_BEOS)
|
||||
|
Loading…
x
Reference in New Issue
Block a user