* Copyright 2001-2004 David Abrahams.
* Copyright 2005 Rene Rivera.
* Distributed under the Boost Software License, Version 1.0.
- * (See accompanying file LICENSE_1_0.txt or copy at
- * http://www.boost.org/LICENSE_1_0.txt)
+ * (See accompanying file LICENSE.txt or copy at
+ * https://www.bfgroup.xyz/b2/LICENSE.txt)
*/
/*
*/
#include "jam.h"
+#ifdef USE_PATHNT
+
#include "pathsys.h"
#include "hash.h"
* - path_key_cache path/key mapping cache object already initialized
*/
-static int canonicWindowsPath( char const * const path, int const path_length,
+static int canonicWindowsPath( char const * const path, int32_t path_length,
string * const out )
{
char const * last_element;
- unsigned long saved_size;
+ int32_t saved_size;
char const * p;
int missing_parent;
if ( p >= path )
{
char const * const dir = path;
- int const dir_length = p - path;
+ const int32_t dir_length = int32_t(p - path);
OBJECT * const dir_obj = object_new_range( dir, dir_length );
int found;
path_key_entry * const result = (path_key_entry *)hash_insert(
if ( !missing_parent )
{
char const * const n = last_element;
- int const n_length = path + path_length - n;
+ int32_t n_length = int32_t(path + path_length - n);
if ( !( n_length == 1 && n[ 0 ] == '.' )
&& !( n_length == 2 && n[ 0 ] == '.' && n[ 1 ] == '.' ) )
{
if ( !found )
{
OBJECT * normalized;
- int normalized_size;
+ int32_t normalized_size;
path_key_entry * nresult;
result->path = path;
{
static void free_path_key_entry( void * xentry, void * const data )
{
path_key_entry * const entry = (path_key_entry *)xentry;
- object_free( entry->path );
- object_free( entry->key );
+ if (entry->path) object_free( entry->path );
+ if (entry->key) object_free( entry->key );
}
hashdone( path_key_cache );
}
}
+
+#endif // USE_PATHNT