Boost logo

Boost-Commit :

Subject: [Boost-commit] svn:boost r80034 - trunk/tools/build/v2/engine
From: jurko.gospodnetic_at_[hidden]
Date: 2012-08-14 10:35:44


Author: jurko
Date: 2012-08-14 10:35:44 EDT (Tue, 14 Aug 2012)
New Revision: 80034
URL: http://svn.boost.org/trac/boost/changeset/80034

Log:
Boost Jam cleanup - made one errno global variable usage instance more localized.
Text files modified:
   trunk/tools/build/v2/engine/pwd.c | 4 +++-
   1 files changed, 3 insertions(+), 1 deletions(-)

Modified: trunk/tools/build/v2/engine/pwd.c
==============================================================================
--- trunk/tools/build/v2/engine/pwd.c (original)
+++ trunk/tools/build/v2/engine/pwd.c 2012-08-14 10:35:44 EDT (Tue, 14 Aug 2012)
@@ -40,10 +40,12 @@
     {
         int buffer_size = PATH_MAX;
         char * result_buffer = 0;
+ int error;
         do
         {
             char * const buffer = BJAM_MALLOC_RAW( buffer_size );
             result_buffer = getcwd( buffer, buffer_size );
+ error = errno ;
             if ( result_buffer )
             {
                 /* We return the path using its canonical/long/key format. */
@@ -54,7 +56,7 @@
             buffer_size *= 2;
             BJAM_FREE_RAW( buffer );
         }
- while ( !pwd_result && errno == ERANGE );
+ while ( !pwd_result && error == ERANGE );
 
         if ( !pwd_result )
         {


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