Mercurial > ecos
diff host/tools/ecostest/common/eCosTest.cpp @ 101:c37d3a9e1b28 ecos-sw-2000-06-16
Merge from eCos master repository on 2000-06-16-07:47:03-BST
| author | jlarmour |
|---|---|
| date | Fri, 16 Jun 2000 16:43:59 +0000 |
| parents | 489eb5632bc3 |
| children | 518f42066aba |
line wrap: on
line diff
--- a/host/tools/ecostest/common/eCosTest.cpp +++ b/host/tools/ecostest/common/eCosTest.cpp @@ -97,10 +97,22 @@ CeCosTest::CeCosTest(const ExecutionPara // By recording the path now, we ensure processes are always run in the context in which the test instance // is created (important for the ConfigTool to be able to call PrepareEnvironment). + +#ifdef _WIN32 + // for some reason _tgetenv() doesn't return the PATH set + // by PrepareEnvironment() so use GetEnvironmentVariable() instead + // JLD - 2000-06-09 + String strPath; + int nSize=GetEnvironmentVariable(_T("PATH"), NULL, 0); + GetEnvironmentVariable(_T("PATH"), strPath.GetBuffer(nSize), nSize); + strPath.ReleaseBuffer(); + m_strPath=strPath; +#else LPCTSTR pszPath=_tgetenv(_T("PATH")); if(pszPath){ m_strPath=pszPath; } +#endif ENTERCRITICAL; InstanceCount++;
