diff options
Diffstat (limited to 'indra/llcommon/llsys.cpp')
-rw-r--r-- | indra/llcommon/llsys.cpp | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 18f4684b49..4f57daf9ec 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -107,7 +107,7 @@ LLOSInfo::LLOSInfo() : #if LL_WINDOWS - if (IsWindowsVersionOrGreater(10, 0, 0)) + if (IsWindows10OrGreater()) { mMajorVer = 10; mMinorVer = 0; @@ -240,6 +240,21 @@ LLOSInfo::LLOSInfo() : ubr = data; } } + + if (mBuild >= 22000) + { + // At release Windows 11 version was 10.0.22000.194 + // Windows 10 version was 10.0.19043.1266 + // There is no warranty that Win10 build won't increase, + // so until better solution is found or Microsoft updates + // SDK with IsWindows11OrGreater(), indicate "10/11" + // + // Current alternatives: + // Query WMI's Win32_OperatingSystem for OS string. Slow + // and likely to return 'compatibility' string. + // Check presence of dlls/libs or may be their version. + mOSStringSimple = "Microsoft Windows 10/11"; + } } mOSString = mOSStringSimple; @@ -1221,7 +1236,12 @@ BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile) LLFILE *dst = NULL; S32 bytes = 0; tmpfile = dstfile + ".t"; - src = gzopen(srcfile.c_str(), "rb"); +#ifdef LL_WINDOWS + llutf16string utf16filename = utf8str_to_utf16str(srcfile); + src = gzopen_w(utf16filename.c_str(), "rb"); +#else + src = gzopen(srcfile.c_str(), "rb"); +#endif if (! src) goto err; dst = LLFile::fopen(tmpfile, "wb"); /* Flawfinder: ignore */ if (! dst) goto err; @@ -1255,7 +1275,14 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile) LLFILE *src = NULL; S32 bytes = 0; tmpfile = dstfile + ".t"; - dst = gzopen(tmpfile.c_str(), "wb"); /* Flawfinder: ignore */ + +#ifdef LL_WINDOWS + llutf16string utf16filename = utf8str_to_utf16str(tmpfile); + dst = gzopen_w(utf16filename.c_str(), "wb"); +#else + dst = gzopen(tmpfile.c_str(), "wb"); +#endif + if (! dst) goto err; src = LLFile::fopen(srcfile, "rb"); /* Flawfinder: ignore */ if (! src) goto err; |