summaryrefslogtreecommitdiff
path: root/sal
diff options
context:
space:
mode:
Diffstat (limited to 'sal')
-rw-r--r--sal/cppunittester/cppunittester.cxx7
1 files changed, 4 insertions, 3 deletions
diff --git a/sal/cppunittester/cppunittester.cxx b/sal/cppunittester/cppunittester.cxx
index 9e4c6e2c048b..2002eb0efb2d 100644
--- a/sal/cppunittester/cppunittester.cxx
+++ b/sal/cppunittester/cppunittester.cxx
@@ -271,15 +271,16 @@ public:
manager->load(testlib, args);
} catch (const CppUnit::DynamicLibraryManagerException &e) {
std::cerr << "DynamicLibraryManagerException: \"" << e.what() << "\"\n";
-#ifdef _WIN32
const char *pPath = getenv ("PATH");
- if (pPath && strlen (pPath) > 256)
+ const size_t nPathLen = pPath ? strlen(pPath) : 0;
+#ifdef _WIN32
+ if (nPathLen > 256)
{
std::cerr << "Windows has significant build problems with long PATH variables ";
std::cerr << "please check your PATH variable and re-autogen.\n";
}
#endif
- std::cerr << "Path is '" << getenv("PATH") << "'\n";
+ std::cerr << "Path (length: " << nPathLen << ") is '" << pPath << "'\n";
return false;
}
#endif