MCPcopy Create free account
hub / github.com/Xtra-Computing/thundersvm / currentHost

Method currentHost

src/thundersvm/util/log.cpp:1051–1062  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1049 }
1050
1051 std::string OS::currentHost(void) {
1052#if ELPP_OS_UNIX && !ELPP_OS_ANDROID
1053 return getEnvironmentVariable("HOSTNAME", base::consts::kUnknownHost, "hostname");
1054#elif ELPP_OS_WINDOWS
1055 return getEnvironmentVariable("COMPUTERNAME", base::consts::kUnknownHost);
1056#elif ELPP_OS_ANDROID
1057 ELPP_UNUSED(base::consts::kUnknownHost);
1058 return getDeviceName();
1059#else
1060 return std::string();
1061#endif // ELPP_OS_UNIX && !ELPP_OS_ANDROID
1062 }
1063
1064 bool OS::termSupportsColor(void) {
1065 std::string term = getEnvironmentVariable("TERM", "");

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected