| 2351 | inline const char* StrError(int errnum) { return strerror(errnum); } |
| 2352 | #endif |
| 2353 | inline const char* GetEnv(const char* name) { |
| 2354 | #if GTEST_OS_WINDOWS_MOBILE || GTEST_OS_WINDOWS_PHONE || GTEST_OS_WINDOWS_RT |
| 2355 | // We are on Windows CE, which has no environment variables. |
| 2356 | static_cast<void>(name); // To prevent 'unused argument' warning. |
| 2357 | return nullptr; |
| 2358 | #elif defined(__BORLANDC__) || defined(__SunOS_5_8) || defined(__SunOS_5_9) |
| 2359 | // Environment variables which we programmatically clear will be set to the |
| 2360 | // empty string rather than unset (NULL). Handle that case. |
| 2361 | const char* const env = getenv(name); |
| 2362 | return (env != nullptr && env[0] != '\0') ? env : nullptr; |
| 2363 | #else |
| 2364 | return getenv(name); |
| 2365 | #endif |
| 2366 | } |
| 2367 | |
| 2368 | GTEST_DISABLE_MSC_DEPRECATED_POP_() |
| 2369 |
no outgoing calls
no test coverage detected