summaryrefslogtreecommitdiff
path: root/indra/llcommon/llsys.cpp
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2024-07-27 15:17:57 +0800
committerErik Kundiman <erik@megapahit.org>2024-07-28 08:24:59 +0800
commit96a81b5ecbe3bffb582ded930752c0523df5e80a (patch)
treea87a0bd09fd980562e88150dbfea3819d28d9f12 /indra/llcommon/llsys.cpp
parent06e8f0c443c1ba7858d000c6d695b7e988e02053 (diff)
parented73208eb96b862b97fa285036edea1e792ca3c6 (diff)
Merge remote-tracking branch 'secondlife/release/2024.06-atlasaurus' into 2024.06-atlasaurus
Diffstat (limited to 'indra/llcommon/llsys.cpp')
-rw-r--r--indra/llcommon/llsys.cpp34
1 files changed, 13 insertions, 21 deletions
diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp
index d21afab050..546f35bc81 100644
--- a/indra/llcommon/llsys.cpp
+++ b/indra/llcommon/llsys.cpp
@@ -218,7 +218,7 @@ LLOSInfo::LLOSInfo() :
DWORD cbData(sizeof(DWORD));
DWORD data(0);
HKEY key;
- BOOL ret_code = RegOpenKeyExW(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 0, KEY_READ, &key);
+ LSTATUS ret_code = RegOpenKeyExW(HKEY_LOCAL_MACHINE, TEXT("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion"), 0, KEY_READ, &key);
if (ERROR_SUCCESS == ret_code)
{
ret_code = RegQueryValueExW(key, L"UBR", 0, NULL, reinterpret_cast<LPBYTE>(&data), &cbData);
@@ -231,16 +231,8 @@ LLOSInfo::LLOSInfo() :
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 ";
+ // According to microsoft win 10 won't ever get that far.
+ mOSStringSimple = "Microsoft Windows 11 ";
}
}
@@ -273,9 +265,9 @@ LLOSInfo::LLOSInfo() :
#elif LL_DARWIN
// Initialize mOSStringSimple to something like:
- // "Mac OS X 10.6.7"
+ // "macOS 10.13.1"
{
- const char * DARWIN_PRODUCT_NAME = "Mac OS X";
+ const char * DARWIN_PRODUCT_NAME = "macOS";
int64_t major_version, minor_version, bugfix_version = 0;
@@ -298,7 +290,7 @@ LLOSInfo::LLOSInfo() :
}
// Initialize mOSString to something like:
- // "Mac OS X 10.6.7 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386"
+ // "macOS 10.13.1 Darwin Kernel Version 10.7.0: Sat Jan 29 15:17:16 PST 2011; root:xnu-1504.9.37~1/RELEASE_I386 i386"
struct utsname un;
if(uname(&un) != -1)
{
@@ -575,7 +567,7 @@ bool LLOSInfo::is64Bit()
return true;
#elif defined(_WIN32)
// 32-bit viewer may be run on both 32-bit and 64-bit Windows, need to elaborate
- BOOL f64 = FALSE;
+ bool f64 = false;
return IsWow64Process(GetCurrentProcess(), &f64) && f64;
#else
return false;
@@ -1328,11 +1320,11 @@ private:
// Need an instance of FrameWatcher before it does any good
static FrameWatcher sFrameWatcher;
-BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile)
+bool gunzip_file(const std::string& srcfile, const std::string& dstfile)
{
std::string tmpfile;
const S32 UNCOMPRESS_BUFFER_SIZE = 32768;
- BOOL retval = FALSE;
+ bool retval = false;
gzFile src = NULL;
U8 buffer[UNCOMPRESS_BUFFER_SIZE];
LLFILE *dst = NULL;
@@ -1364,18 +1356,18 @@ BOOL gunzip_file(const std::string& srcfile, const std::string& dstfile)
LLFile::remove(dstfile, ENOENT);
#endif
if (LLFile::rename(tmpfile, dstfile) == -1) goto err; /* Flawfinder: ignore */
- retval = TRUE;
+ retval = true;
err:
if (src != NULL) gzclose(src);
if (dst != NULL) fclose(dst);
return retval;
}
-BOOL gzip_file(const std::string& srcfile, const std::string& dstfile)
+bool gzip_file(const std::string& srcfile, const std::string& dstfile)
{
const S32 COMPRESS_BUFFER_SIZE = 32768;
std::string tmpfile;
- BOOL retval = FALSE;
+ bool retval = false;
U8 buffer[COMPRESS_BUFFER_SIZE];
gzFile dst = NULL;
LLFILE *src = NULL;
@@ -1415,7 +1407,7 @@ BOOL gzip_file(const std::string& srcfile, const std::string& dstfile)
LLFile::remove(dstfile);
#endif
if (LLFile::rename(tmpfile, dstfile) == -1) goto err; /* Flawfinder: ignore */
- retval = TRUE;
+ retval = true;
err:
if (src != NULL) fclose(src);
if (dst != NULL) gzclose(dst);