From c82995f3e67ed1947c29fa1d27f1dfe015513ab0 Mon Sep 17 00:00:00 2001 From: Mnikolenko Productengine Date: Tue, 7 Sep 2021 18:46:40 +0300 Subject: SL-15832 Add OS bitness to ViewerStats --- indra/llcommon/llsys.cpp | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'indra/llcommon/llsys.cpp') diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index 4e61fb8a58..b3a93e3254 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -474,6 +474,8 @@ LLOSInfo::LLOSInfo() : dotted_version_string << mMajorVer << "." << mMinorVer << "." << mBuild; mOSVersionString.append(dotted_version_string.str()); + mOSBitness = is64Bit() ? 64 : 32; + LL_INFOS("LLOSInfo") << "OS bitness: " << mOSBitness << LL_ENDL; } #ifndef LL_WINDOWS @@ -529,6 +531,11 @@ const std::string& LLOSInfo::getOSVersionString() const return mOSVersionString; } +const S32 LLOSInfo::getOSBitness() const +{ + return mOSBitness; +} + //static U32 LLOSInfo::getProcessVirtualSizeKB() { @@ -582,6 +589,25 @@ U32 LLOSInfo::getProcessResidentSizeKB() return resident_size; } +//static +bool LLOSInfo::is64Bit() +{ +#if LL_WINDOWS +#if defined(_WIN64) + 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; + return IsWow64Process(GetCurrentProcess(), &f64) && f64; +#else + return false; +#endif +#else // ! LL_WINDOWS + // we only build a 64-bit mac viewer and currently we don't build for linux at all + return true; +#endif +} + LLCPUInfo::LLCPUInfo() { std::ostringstream out; -- cgit v1.2.3 From 5af8f15a0579bc88ca4249324db8b1f19c52bbd5 Mon Sep 17 00:00:00 2001 From: Andrey Kleshchev Date: Wed, 8 Sep 2021 20:53:50 +0300 Subject: SL-14541 Replace zlib with zlib-ng --- indra/llcommon/llsys.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'indra/llcommon/llsys.cpp') diff --git a/indra/llcommon/llsys.cpp b/indra/llcommon/llsys.cpp index b3a93e3254..f710f1b279 100644 --- a/indra/llcommon/llsys.cpp +++ b/indra/llcommon/llsys.cpp @@ -36,7 +36,7 @@ #ifdef LL_USESYSTEMLIBS # include #else -# include "zlib/zlib.h" +# include "zlib-ng/zlib.h" #endif #include "llprocessor.h" -- cgit v1.2.3