Mercurial > hg > orthanc
changeset 4009:16978ee28588
print info about cpu architecture
author | Sebastien Jodogne <s.jodogne@gmail.com> |
---|---|
date | Mon, 08 Jun 2020 09:02:08 +0200 |
parents | 2d4427ca4be9 |
children | f0ee3f1db775 |
files | OrthancServer/main.cpp |
diffstat | 1 files changed, 31 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/OrthancServer/main.cpp Mon Jun 08 08:47:43 2020 +0200 +++ b/OrthancServer/main.cpp Mon Jun 08 09:02:08 2020 +0200 @@ -1624,6 +1624,37 @@ LOG(WARNING) << "Orthanc version: " << version; assert(DisplayPerformanceWarning()); + + std::string s = "Architecture: "; + if (sizeof(void*) == 4) + { + s += "32-bit, "; + } + else if (sizeof(void*) == 8) + { + s += "64-bit, "; + } + else + { + s += "unsupported pointer size, "; + } + + switch (Toolbox::DetectEndianness()) + { + case Endianness_Little: + s += "little endian"; + break; + + case Endianness_Big: + s += "big endian"; + break; + + default: + s += "unsupported endianness"; + break; + } + + LOG(INFO) << s; } int status = 0;