From 7486db59853a20d312c97eb7793732065628c4b5 Mon Sep 17 00:00:00 2001 From: "law%netscape.com" Date: Thu, 1 Jul 1999 23:09:17 +0000 Subject: [PATCH] Fix for bug #4930; calculate Win version properly --- network/module/nsNetService.cpp | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/network/module/nsNetService.cpp b/network/module/nsNetService.cpp index 21fd4d3c7581..a520dac8060f 100644 --- a/network/module/nsNetService.cpp +++ b/network/module/nsNetService.cpp @@ -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)