[Libreoffice-commits] .: sal/qa
Caolán McNamara
caolan at kemper.freedesktop.org
Wed Feb 23 08:34:59 PST 2011
sal/qa/osl/process/osl_process.cxx | 10 +++++++++-
sal/qa/osl/process/osl_process_child.cxx | 11 +++++++++--
2 files changed, 18 insertions(+), 3 deletions(-)
New commits:
commit f70ac89fa387ea8f0cba6663de6fccb4146a028a
Author: Caolán McNamara <caolanm at redhat.com>
Date: Wed Feb 23 16:34:22 2011 +0000
Likely workaround for busted environ on MacOSX
diff --git a/sal/qa/osl/process/osl_process.cxx b/sal/qa/osl/process/osl_process.cxx
index dc9a8e3..5d16e3f 100644
--- a/sal/qa/osl/process/osl_process.cxx
+++ b/sal/qa/osl/process/osl_process.cxx
@@ -62,6 +62,15 @@
#include <iterator>
#include <string>
+#ifdef UNX
+#if defined( MACOSX )
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+# else
+ extern char** environ;
+# endif
+#endif
+
#if defined(WNT) || defined(OS2)
const rtl::OUString EXECUTABLE_NAME (RTL_CONSTASCII_USTRINGPARAM("osl_process_child.exe"));
#else
@@ -365,7 +374,6 @@ private:
FreeEnvironmentStrings(env);
}
#else
- extern char** environ;
void read_parent_environment(string_container_t* env_container)
{
for (int i = 0; NULL != environ[i]; i++)
diff --git a/sal/qa/osl/process/osl_process_child.cxx b/sal/qa/osl/process/osl_process_child.cxx
index 0417874..015a48d 100644
--- a/sal/qa/osl/process/osl_process_child.cxx
+++ b/sal/qa/osl/process/osl_process_child.cxx
@@ -52,6 +52,15 @@
#include <rtl/ustring.hxx>
+#ifdef UNX
+#if defined( MACOSX )
+# include <crt_externs.h>
+# define environ (*_NSGetEnviron())
+# else
+ extern char** environ;
+# endif
+#endif
+
//########################################
// defines
@@ -95,8 +104,6 @@ void w_to_a(LPCTSTR _strW, LPSTR strA, DWORD size)
FreeEnvironmentStrings(env);
}
#else
- extern char** environ;
-
void dump_env(char* file_path)
{
std::ofstream file(file_path);
More information about the Libreoffice-commits
mailing list