diff --git a/v2/engine/pathsys.h b/v2/engine/pathsys.h index 65af6d6fa..6b01acfed 100644 --- a/v2/engine/pathsys.h +++ b/v2/engine/pathsys.h @@ -51,30 +51,21 @@ void path_build( PATHNAME * f, string * file ); void path_parse( char const * file, PATHNAME * f ); void path_parent( PATHNAME * f ); -#ifdef NT - -/* Returns object_new-allocated string with long equivivalent of 'short_name'. - * If none exists, i.e. 'short_path' is already long, it is returned unaltered. - */ -OBJECT * short_path_to_long_path( OBJECT * short_path ); - -#endif - -/* Given a path, returns an object that can be used as a unique key for that - * path. Equivalent paths such as a/b, A\B, and a\B on NT all yield the same - * key. +/* Given a path, returns an object containing an equivalent path in canonical + * format that can be used as a unique key for that path. Equivalent paths such + * as a/b, A\B, and a\B on NT all yield the same key. */ OBJECT * path_as_key( OBJECT * path ); /* Called as an optimization when we know we have a path that is already in its - * long form. Avoids the need for some subsequent path_as_key() call to do a + * long/key form. Avoids the need for some subsequent path_as_key() call to do a * potentially expensive short-->long path conversion. */ void path_key__register_long_path( OBJECT * long_path ); #ifdef USE_PATHUNIX /* Returns a static pointer to the system dependent path to the temporary - * directory. NOTE: *without* a trailing path separator. + * directory. NOTE: Does *not* include a trailing path separator. */ string const * path_tmpdir( void ); diff --git a/v2/engine/pathunix.c b/v2/engine/pathunix.c index f7411a1e2..945ac72b5 100644 --- a/v2/engine/pathunix.c +++ b/v2/engine/pathunix.c @@ -406,12 +406,6 @@ static void ShortPathToLongPath( char const * const path, int const path_length, } -OBJECT * short_path_to_long_path( OBJECT * short_path ) -{ - return path_as_key( short_path ); -} - - static void normalize_path( string * path ) { char * s; diff --git a/v2/engine/pwd.c b/v2/engine/pwd.c index e24347434..ab06a395c 100644 --- a/v2/engine/pwd.c +++ b/v2/engine/pwd.c @@ -46,13 +46,10 @@ LIST * pwd( void ) result_buffer = getcwd( buffer, buffer_size ); if ( result_buffer ) { - #ifdef NT + /* We return the path using its canonical/long/key format. */ OBJECT * const result = object_new( result_buffer ); - pwd_result = short_path_to_long_path( result ); + pwd_result = path_as_key( result ); object_free( result ); - #else - pwd_result = object_new( result_buffer ); - #endif } buffer_size *= 2; BJAM_FREE_RAW( buffer );