summaryrefslogtreecommitdiff
path: root/sal/qa/osl/process/osl_process.cxx
diff options
context:
space:
mode:
Diffstat (limited to 'sal/qa/osl/process/osl_process.cxx')
-rw-r--r--sal/qa/osl/process/osl_process.cxx24
1 files changed, 8 insertions, 16 deletions
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index 2320fd6197f2..475b09750826 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -39,7 +39,7 @@
#if defined HAVE_VALGRIND_HEADERS
#include <valgrind/valgrind.h>
-#else
+#elif !defined _WIN32
#define RUNNING_ON_VALGRIND false
#endif
@@ -95,6 +95,8 @@ inline ::rtl::OUString getExecutablePath()
typedef std::vector<OString> string_container_t;
+#if !defined _WIN32
+
class exclude : public std::unary_function<OString, bool>
{
public:
@@ -154,27 +156,13 @@ namespace
}
}
-#ifdef _WIN32
- void read_parent_environment(string_container_t* env_container)
- {
- LPTSTR env = reinterpret_cast<LPTSTR>(GetEnvironmentStrings());
- LPTSTR p = env;
-
- while (size_t l = _tcslen(p))
- {
- env_container->push_back(OString(p));
- p += l + 1;
- }
- FreeEnvironmentStrings(env);
- tidy_container(*env_container);
- }
-#else
void read_parent_environment(string_container_t* env_container)
{
for (int i = 0; nullptr != environ[i]; i++)
env_container->push_back(OString(environ[i]));
tidy_container(*env_container);
}
+
#endif
class Test_osl_executeProcess : public CppUnit::TestFixture
@@ -222,6 +210,8 @@ public:
return temp_file_path;
}
+#if !defined _WIN32
+
void read_child_environment(string_container_t* env_container)
{
OString temp_file_name = OUStringToOString(OUString(
@@ -419,6 +409,8 @@ public:
);
}
+#endif
+
void osl_execProc_test_batch()
{
oslProcess process;