Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r54653 - sandbox/process/boost/process
From: boris_at_[hidden]
Date: 2009-07-04 17:12:43


Author: bschaeling
Date: 2009-07-04 17:12:43 EDT (Sat, 04 Jul 2009)
New Revision: 54653
URL: http://svn.boost.org/trac/boost/changeset/54653

Log:
applied patch to use _NSGetEnviron() in order to access environment variables on Mac OS X
Text files modified:
   sandbox/process/boost/process/self.hpp | 7 +++++++
   1 files changed, 7 insertions(+), 0 deletions(-)

Modified: sandbox/process/boost/process/self.hpp
==============================================================================
--- sandbox/process/boost/process/self.hpp (original)
+++ sandbox/process/boost/process/self.hpp 2009-07-04 17:12:43 EDT (Sat, 04 Jul 2009)
@@ -22,6 +22,9 @@
 
 #if defined(BOOST_POSIX_API)
 # include <unistd.h>
+# if defined(__APPLE__)
+# include <crt_externs.h>
+# endif
 #elif defined(BOOST_WINDOWS_API)
 # include <windows.h>
 #else
@@ -75,7 +78,11 @@
         environment e;
 
 #if defined(BOOST_POSIX_API)
+# if defined(__APPLE__)
+ char **env = *_NSGetEnviron();
+# else
         char **env = ::environ;
+# endif
         while (*env)
         {
             std::string s = *env;


Boost-Commit list run by bdawes at acm.org, david.abrahams at rcn.com, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk