Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r62050 - sandbox/SOC/2010/process/boost/process
From: fotanus_at_[hidden]
Date: 2010-05-16 19:14:09


Author: fotanus
Date: 2010-05-16 19:14:07 EDT (Sun, 16 May 2010)
New Revision: 62050
URL: http://svn.boost.org/trac/boost/changeset/62050

Log:
Implemented the get_work_dir method from self on linux.

Text files modified:
   sandbox/SOC/2010/process/boost/process/self.hpp | 19 ++++++++++---------
   1 files changed, 10 insertions(+), 9 deletions(-)

Modified: sandbox/SOC/2010/process/boost/process/self.hpp
==============================================================================
--- sandbox/SOC/2010/process/boost/process/self.hpp (original)
+++ sandbox/SOC/2010/process/boost/process/self.hpp 2010-05-16 19:14:07 EDT (Sun, 16 May 2010)
@@ -88,7 +88,7 @@
                         while (*env){
                                 std::string s = *env;
                                 std::string::size_type pos = s.find('=');
- e.insert(boost::process::environment::value_type(
+ e.insert(boost::process::environment_t::value_type(
                                         s.substr(0, pos), s.substr(pos + 1)));
                                 ++env;
                         }
@@ -125,20 +125,21 @@
 
         static char * get_work_dir(){
                 #if defined(BOOST_POSIX_API)
-
-
+ int size = pathconf(".",_PC_PATH_MAX);
+ char * buffer = (char *)malloc(size);
+ if(buffer == NULL)
+ BOOST_ASSERT(false);
+ return getcwd(buffer, size);
+
                 #elif defined(BOOST_WINDOWS_API)
-
+
                         char* buffer;
 
                         BOOST_ASSERT( (buffer = _getcwd( NULL, 0 )) != NULL );
                         return buffer;
-
-
-
-
+
                 #endif
-
+
         }
 
 private:


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